export type MembershipLevel = 0 | 1 | 2
export type CourseAccessState = 'closed' | 'free' | 'paid'

export interface Expert {
  id: string
  slug: string
  name: string
  title: string
  organization: string
  bio: string
  specialties: string[]
  directions?: string[]
  projectExperience?: string
  representativeAchievements?: string
  homepageIntro?: string
  pricePerHour: number
  shareRatio?: number
  acceptingOrders?: boolean
  availabilityStatus: 'this-week' | 'next-week' | 'unavailable'
  rating: number
  consultationCount: number
  photoUrl?: string
}

export interface Course {
  id: string
  slug: string
  title: string
  instructor: string
  coverUrl?: string
  courseType: 'free' | 'paid' | 'junior' | 'senior'
  price: number
  memberLevelRequired: MembershipLevel
  lessonCount: number
  startsAt: string | null
  status: 'upcoming' | 'ongoing' | 'completed' | 'anytime'
  summary: string
  location?: string
  direction?: string
  courseFormat?: string
  accessPolicy?: 'free_all' | 'paid_all' | 'member_free_guest_paid' | 'members_only_free' | 'junior_paid_senior_free' | 'senior_only_free'
  registeredAccess?: CourseAccessState
  juniorAccess?: CourseAccessState
  seniorAccess?: CourseAccessState
  registeredPriceAmount?: number
  juniorPriceAmount?: number
  seniorPriceAmount?: number
  liveUrl?: string
  replayUrl?: string
  coverLabel?: string
  capacity?: number
  registeredCount?: number
  checkinRequired?: boolean
  recommended?: boolean
  audience?: string
  outcomes?: string[]
  modules?: string[]
  lessonModules?: {
    id: string
    title: string
    description: string
    videoUrl: string
    materialUrl: string
    durationMinutes: number
    sortOrder: number
    status: string
  }[]
  accessNote?: string
  productStatus?: 'draft' | 'published' | 'offline'
}

export interface Event {
  id: string
  slug: string
  title: string
  eventType: 'public' | 'pro' | 'max' | 'free'
  price: number
  memberLevelRequired: MembershipLevel
  productStatus?: 'draft' | 'published' | 'offline'
  status?: 'draft' | 'published' | 'registration_closed' | 'offline' | 'deleted'
  topic?: '峰会论坛' | '政策研讨' | 'AI应用' | '数据安全' | '企业参访'
  eventFormat?: '线下活动' | '线上活动' | '工作坊' | '参访交流'
  startsAt: string
  endsAt: string
  location: string
  isOnline: boolean
  onlineUrl?: string
  capacity: number
  registeredCount: number
  realRegisteredCount?: number
  registrationStatus?: 'not_started' | 'open' | 'closed' | 'full' | 'finished'
  initialRegisteredCount?: number
  summary: string
  coverUrl?: string
  coverLabel?: string
  audience?: string
  highlights?: string[]
  agenda?: string[]
  registeredAccess?: CourseAccessState
  juniorAccess?: CourseAccessState
  seniorAccess?: CourseAccessState
  registeredPriceAmount?: number
  juniorPriceAmount?: number
  seniorPriceAmount?: number
  recommended?: boolean
  sortOrder?: number
}

export interface DataProduct {
  id: string
  slug: string
  title: string
  category?: '研究报告' | '表格数据' | '政策数据库' | '资料包'
  fileFormat: 'Excel' | 'CSV' | 'PDF' | 'ZIP'
  price: number
  summary: string
  dataRange?: string
  updateFrequency?: string
  coverUrl?: string
  fileUrl?: string
  fileName?: string
  fileSize?: number
  tags?: string[]
  caseGoal?: string
  requestOutline?: string
  deliveryOutline?: string
  serviceNote?: string
}

export interface AgentProduct {
  id: string
  slug: string
  title: string
  scenarioTags: string[]
  registeredAccess?: CourseAccessState
  juniorAccess?: CourseAccessState
  seniorAccess?: CourseAccessState
  registeredPriceAmount?: number
  juniorPriceAmount?: number
  seniorPriceAmount?: number
  price: number
  detailDescription: string
  summary: string
  deliveryNote: string
  coverUrl?: string
}

export interface AgentCatalogCategory {
  id: string
  name: string
  sortOrder: number
}

export interface AgentWorkflowNode {
  id: string
  label: string
  title: string
  detail: string
  x: number
  y: number
  size: string
}

export interface AgentWorkflow {
  id: string
  title: string
  scene: string
  result: string
  imageUrl?: string
  nodes: AgentWorkflowNode[]
}

export interface NewsArticle {
  id: string
  slug: string
  title: string
  categoryCode?: string
  category: string
  summary: string
  content?: string
  authorName?: string
  publishedAt: string
  coverUrl?: string
  featuredPosition?: number | null
  relatedArticleIds?: string[]
  status?: 'draft' | 'published' | 'offline'
  createdAt?: string
  updatedAt?: string
}

export interface ConsultingDirection {
  id: string
  slug: string
  title: string
  summary: string
  description: string
  coverUrl?: string
}

export interface TeamMember {
  id: string
  name: string
  title: string
  bio: string
  photoUrl?: string
}
