import 'package:pshared/data/dto/organization/bound.dart';
import 'package:pshared/models/organization/bound.dart';


extension OrganizationBoundMapper on OrganizationBound {
  OrganizationBoundDTO toDTO() => OrganizationBoundDTO(
    id: '', // OrganizationBound doesn't have storable fields, so we need to provide defaults
    createdAt: DateTime.now(),
    updatedAt: DateTime.now(),
    organizationRef: organizationRef,
  );
}

extension OrganizationBoundDTOMapper on OrganizationBoundDTO {
  OrganizationBound toDomain() => newOrganizationBound(
    organizationRef: organizationRef,
  );
}
