// 类型定义文件

export interface DrawRecord {
  id: string;
  student_id: string;
  prize_id: string;
  prize_name: string;
  prize_level: number;
  draw_time: string;
  is_winner: boolean;
  is_synced: number;
  cache_data: string;
}

export interface Prize {
  id: string;
  prize_name: string;
  prize_level: number;
  total_quantity: number;
  remaining_quantity: number;
  probability: number;
  is_active: number;
  created_at: string;
}

export interface SystemConfig {
  id: string;
  admin_password: string;
  login_password: string;
  max_draw_times: number;
  background_config: string;
  hide_positions: string;
  created_at: string;
  updated_at: string;
}

export interface Student {
  student_id: string;
  draw_count: number;
  first_draw_at?: string;
  last_draw_at?: string;
}

export interface LotteryRecord {
  id: string;
  student_id: string;
  prize_id: string;
  prize_name: string;
  prize_level: number;
  draw_time: string;
  is_synced: number;
  cache_data: string;
}

export interface DrawResult {
  success: boolean;
  prize?: Prize;
  message: string;
  student_id: string;
  draw_time: string;
}