export type MerchantStatus = 'PENDING' | 'ACTIVE' | 'SUSPENDED' | 'TERMINATED';
export type MerchantTier = 'BASIC' | 'PRO' | 'ENTERPRISE';

export interface Merchant {
  id: string;
  tenantId: string;
  companyName: string;
  businessLicense?: string;
  contactEmail: string;
  contactPhone?: string;
  status: MerchantStatus;
  tier: MerchantTier;
  traceId: string;
  createdAt: Date;
  updatedAt: Date;
}

export interface MerchantInfo {
  companyName: string;
  businessLicense?: string;
  contactEmail: string;
  contactPhone?: string;
  tier?: MerchantTier;
}

export interface VerifyResult {
  success: boolean;
  merchantId: string;
  status: MerchantStatus;
  message: string;
}

export interface MerchantDocument {
  id: string;
  merchantId: string;
  docType: 'BUSINESS_LICENSE' | 'TAX_CERTIFICATE' | 'IDENTITY_PROOF' | 'BANK_STATEMENT';
  docUrl: string;
  status: 'PENDING' | 'APPROVED' | 'REJECTED';
  reviewedAt?: Date;
  reviewedBy?: string;
  traceId: string;
  createdAt: Date;
}

export interface MerchantFeature {
  id: string;
  merchantId: string;
  featureId: string;
  status: 'ACTIVE' | 'EXPIRED' | 'SUSPENDED';
  expireAt?: Date;
  traceId: string;
  createdAt: Date;
  updatedAt: Date;
}

export interface FeatureModule {
  id: string;
  name: string;
  code: string;
  description?: string;
  priceMonthly: number;
  priceYearly: number;
  isActive: boolean;
  createdAt: Date;
}

export interface Settlement {
  id: string;
  merchantId: string;
  periodStart: Date;
  periodEnd: Date;
  totalAmount: number;
  status: 'PENDING' | 'PROCESSING' | 'COMPLETED';
  traceId: string;
  createdAt: Date;
  updatedAt: Date;
}

export interface FeeDetail {
  merchantId: string;
  periodStart: Date;
  periodEnd: Date;
  baseFee: number;
  usageFee: number;
  featureFees: Array<{
    featureName: string;
    amount: number;
  }>;
  totalAmount: number;
}
