21 lines
660 B
Dart
21 lines
660 B
Dart
import 'package:pshared/data/dto/permissions/description/role.dart';
|
|
import 'package:pshared/models/permissions/descriptions/role.dart';
|
|
import 'package:pshared/models/storable.dart';
|
|
|
|
|
|
extension RoleDescriptionMapper on RoleDescription {
|
|
RoleDescriptionDTO toDTO() => RoleDescriptionDTO(
|
|
id: storable.id,
|
|
createdAt: storable.createdAt,
|
|
updatedAt: storable.updatedAt,
|
|
organizationRef: organizationRef,
|
|
);
|
|
}
|
|
|
|
extension RoleDescriptionDTOMapper on RoleDescriptionDTO {
|
|
RoleDescription toDomain() => RoleDescription(
|
|
storable: newStorable(id: id, createdAt: createdAt, updatedAt: updatedAt),
|
|
organizationRef: organizationRef,
|
|
);
|
|
}
|