mutation CreateCertificate(
  $name: String!
  $description: String
  $expiry: Timestamp
  $status: CertificateStatus!
  $fileUrl: String
  $icon: String
  $certificationType: ComplianceType
  $issuer: String
  $staffId: UUID!
  $validationStatus: ValidationStatus
  $certificateNumber: String 
) @auth(level: USER) {
  certificate_insert(
    data: {
      name: $name
      description: $description
      expiry: $expiry
      status: $status
      fileUrl: $fileUrl
      icon: $icon
      staffId: $staffId
      certificationType: $certificationType
      issuer: $issuer
      validationStatus: $validationStatus
      certificateNumber: $certificateNumber
    }
  ) 
}

mutation UpdateCertificate(
  $id: UUID!
  $name: String
  $description: String
  $expiry: Timestamp
  $status: CertificateStatus
  $fileUrl: String
  $icon: String
  $staffId: UUID
  $certificationType: ComplianceType
  $issuer: String
  $validationStatus: ValidationStatus
  $certificateNumber: String 
) @auth(level: USER) {
  certificate_update(
    id: $id
    data: {
      name: $name
      description: $description
      expiry: $expiry
      status: $status
      fileUrl: $fileUrl
      icon: $icon
      staffId: $staffId
      certificationType: $certificationType
      issuer: $issuer
      validationStatus: $validationStatus
      certificateNumber: $certificateNumber
    }
  ) 
}

mutation DeleteCertificate($id: UUID!) @auth(level: USER) {
  certificate_delete(id: $id) 
}
