export type CertificateType = 
  | 'CE'
  | 'FCC'
  | 'ROHS'
  | 'ISO9001'
  | 'ISO14001'
  | 'FDA'
  | 'UL'
  | 'CCC'
  | 'EXPORT_LICENSE'
  | 'ORIGIN'
  | 'OTHER';

export type CertificateStatus = 
  | 'PENDING_REVIEW'
  | 'APPROVED'
  | 'REJECTED'
  | 'EXPIRED'
  | 'REVOKED';

export interface Certificate {
  id?: string;
  tenantId: string;
  shopId: string;
  taskId?: string;
  traceId: string;
  businessType: 'TOC' | 'TOB';
  certificateName: string;
  certificateType: CertificateType;
  certificateNo: string;
  productId?: string;
  productName?: string;
  issuer: string;
  issueDate: Date;
  expiryDate: Date;
  status: CertificateStatus;
  fileUrl?: string;
  fileHash?: string;
  remarks?: string;
  createdAt?: Date;
  updatedAt?: Date;
}

export interface CertificateCreateInput {
  tenantId: string;
  shopId: string;
  taskId?: string;
  traceId: string;
  businessType: 'TOC' | 'TOB';
  certificateName: string;
  certificateType: CertificateType;
  certificateNo: string;
  productId?: string;
  productName?: string;
  issuer: string;
  issueDate: Date;
  expiryDate: Date;
  fileUrl?: string;
  fileHash?: string;
  remarks?: string;
}

export interface CertificateUpdateInput {
  certificateName?: string;
  certificateType?: CertificateType;
  certificateNo?: string;
  productId?: string;
  productName?: string;
  issuer?: string;
  issueDate?: Date;
  expiryDate?: Date;
  status?: CertificateStatus;
  fileUrl?: string;
  fileHash?: string;
  remarks?: string;
}

export interface CertificateQueryOptions {
  tenantId: string;
  shopId?: string;
  productId?: string;
  certificateType?: CertificateType;
  status?: CertificateStatus;
  expiryFrom?: Date;
  expiryTo?: Date;
  page?: number;
  pageSize?: number;
}
