Frontend first draft
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import 'package:pshared/data/dto/permissions/action_effect.dart';
|
||||
import 'package:pshared/models/permissions/action_effect.dart';
|
||||
import 'package:pshared/models/permissions/action.dart';
|
||||
import 'package:pshared/models/permissions/effect.dart';
|
||||
|
||||
|
||||
extension ActionEffectMapper on ActionEffect {
|
||||
ActionEffectDTO toDTO() {
|
||||
return ActionEffectDTO(
|
||||
action: action.toShortString(),
|
||||
effect: effect.toShortString(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension ActionEffectDTOMapper on ActionEffectDTO {
|
||||
ActionEffect toDomain() {
|
||||
return ActionEffect(
|
||||
action: ActionExtension.fromString(action),
|
||||
effect: EffectExtension.fromString(effect),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user