// ignore_for_file: invalid_annotation_target

import 'package:freezed_annotation/freezed_annotation.dart';

part 'notification_recipient.freezed.dart';
part 'notification_recipient.g.dart';

@freezed
abstract class Recipient with _$Recipient {
  const factory Recipient({
    required String? id,
    @JsonKey(name: 'full_name') required String? fullName,
    required String? username,
    required String? email,
    required String? status,
    required String? type,
    required String? role,
    required String? phone,
    @JsonKey(name: 'updated_at') required int? updatedAt,
    @JsonKey(name: 'created_at') required int? createdAt,
    @JsonKey(name: 'last_login_at') required int? lastLoginAt,
    required List<Company>? companies,
  }) = _Recipient;

  factory Recipient.fromJson(Map<String, Object?> json) =>
      _$RecipientFromJson(json);
}

@freezed
abstract class Company with _$Company {
  const factory Company({
    required String? id,
    required String? name,
  }) = _Company;

  factory Company.fromJson(Map<String, Object?> json) =>
      _$CompanyFromJson(json);
}
