23 lines
748 B
Dart
23 lines
748 B
Dart
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,
|
|
);
|
|
}
|