import 'package:json_annotation/json_annotation.dart';
import 'package:krow/features/profile/certificates/data/models/certificate_model.dart';

part 'staff_certificate.g.dart';

enum CertificateStatus {
  verified,
  pending,
  declined,
}

@JsonSerializable(fieldRename: FieldRename.snake)
class StaffCertificate {
  final String id;
  CertificateModel certificate;
  final String expirationDate;
  final CertificateStatus status;
  final String file;

  StaffCertificate(
      {required this.id,
      required this.certificate,
      required this.expirationDate,
      required this.status,
      required this.file});

  factory StaffCertificate.fromJson(Map<String, dynamic> json) {
    return _$StaffCertificateFromJson(json);
  }

  Map<String, dynamic> toJson() => _$StaffCertificateToJson(this);
}
