export type TicketPriority = 'low' | 'normal' | 'high' | 'urgent'
export type TicketStatus = 'pending' | 'assigned' | 'processing' | 'resolved' | 'closed' | 'rejected'
export type TicketCategory = 'bug' | 'feature' | 'consultation' | 'complaint' | 'other'

export interface Ticket {
  ticketId?: number
  ticketNo?: string
  title?: string
  content?: string
  productId?: number
  productName?: string
  category?: TicketCategory
  priority?: TicketPriority
  status?: TicketStatus
  attachments?: string[]
  submitUserId?: number
  submitUserName?: string
  submitUserAvatar?: string
  assigneeId?: number
  assigneeName?: string
  assigneeAvatar?: string
  createTime?: string
  updateTime?: string
  resolvedTime?: string
  closedTime?: string
  replyCount?: number
  hasUnread?: boolean
}

export interface TicketReply {
  replyId?: number
  ticketId?: number
  content?: string
  attachments?: string[]
  userId?: number
  userName?: string
  userAvatar?: string
  isStaff?: boolean
  createTime?: string
}

export interface TicketSubmitForm {
  title: string
  content: string
  productId?: number
  category: TicketCategory
  priority: TicketPriority
}

export interface TicketQueryParams {
  status?: TicketStatus
  category?: TicketCategory
  keywords?: string
  page?: number
  limit?: number
}

export interface TicketStats {
  total?: number
  pending?: number
  processing?: number
  resolved?: number
  closed?: number
}
