Frontend first draft
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import 'package:pshared/data/dto/permissions/description/policy.dart';
|
||||
import 'package:pshared/models/permissions/descriptions/policy.dart';
|
||||
import 'package:pshared/models/storable.dart';
|
||||
|
||||
|
||||
extension PolicyDescriptionMapper on PolicyDescription {
|
||||
PolicyDescriptionDTO toDTO() => PolicyDescriptionDTO(
|
||||
id: storable.id,
|
||||
createdAt: storable.createdAt,
|
||||
updatedAt: storable.updatedAt,
|
||||
resourceTypes: resourceTypes,
|
||||
organizationRef: organizationRef,
|
||||
);
|
||||
}
|
||||
|
||||
extension PolicyDescriptionDTOMapper on PolicyDescriptionDTO {
|
||||
PolicyDescription toDomain() => PolicyDescription(
|
||||
storable: newStorable(id: id, createdAt: createdAt, updatedAt: createdAt),
|
||||
resourceTypes: resourceTypes,
|
||||
organizationRef: organizationRef,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user