import 'package:json_annotation/json_annotation.dart';

import 'package:pshared/data/dto/date_time.dart';
import 'package:pshared/data/dto/permissions/bound.dart';

part 'recipient.g.dart';


@JsonSerializable()
class RecipientDTO extends PermissionBoundDTO {
  final String name;
  final String? description;
  final String email;
  final String? avatarUrl;
  final String status;
  final String type;

  @JsonKey(defaultValue: false)
  final bool isArchived;

  const RecipientDTO({
    required super.id,
    required super.createdAt,
    required super.updatedAt,
    required super.permissionRef,
    required super.organizationRef,
    required this.name,
    required this.email,
    required this.status,
    required this.type,
    this.description,
    this.avatarUrl,
    this.isArchived = false,
  });

  factory RecipientDTO.fromJson(Map<String, dynamic> json) => _$RecipientDTOFromJson(json);
  @override
  Map<String, dynamic> toJson() => _$RecipientDTOToJson(this);
}
