export type CustomerType = 'enterprise' | 'personal' | 'government'
export type CustomerLevel = 'A' | 'B' | 'C' | 'D'
export type CustomerStatus = 'active' | 'inactive' | 'blacklist'
export type FollowUpType = 'phone' | 'visit' | 'wechat' | 'email' | 'other'
export type FollowUpIntent = 'high' | 'medium' | 'low'

export interface CustomerContact {
  id: string
  name: string
  phone: string
  role?: string
  isPrimary?: boolean
}

export interface CustomerFinance {
  bankName?: string
  bankAccount?: string
  taxNo?: string
  invoiceTitle?: string
}

export interface Customer {
  id: string
  name: string
  type: CustomerType
  level: CustomerLevel
  industry?: string
  scale?: string
  source?: string
  address?: string
  remark?: string
  status: CustomerStatus
  contacts: CustomerContact[]
  finance?: CustomerFinance
  projectCount: number
  contractAmount: number
  followUpCount: number
  lastFollowUpTime?: string
  createTime: string
  updateTime: string
}

export interface FollowUpRecord {
  id: string
  customerId: string
  customerName?: string
  type: FollowUpType
  content: string
  intent: FollowUpIntent
  nextPlan?: string
  nextTime?: string
  operatorName?: string
  createTime: string
}

export interface CustomerSearchParams {
  keyword?: string
  type?: CustomerType | ''
  level?: CustomerLevel | ''
  status?: CustomerStatus | ''
  pageNum?: number
  pageSize?: number
}

export interface CustomerFormData {
  id?: string
  name: string
  type: CustomerType
  level: CustomerLevel
  industry?: string
  scale?: string
  source?: string
  address?: string
  remark?: string
  status: CustomerStatus
  contacts: CustomerContact[]
  finance: CustomerFinance
}
