// Auto-generated types for EduPlatform

// ─── Base ───────────────────────────────────────────


// ─── Base ───────────────────────────────────────────
export interface User {
  id: string;
  phone: string;
  nickname: string;
  avatarUrl: string;
  createdAt: string;
  updatedAt: string;
}
export interface Courses {
  id: string;
  userId?: string;
  title: string;
  description?: string;
  instructor?: string;
  price?: number;
  coverUrl?: string;
  category?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Chapters {
  id: string;
  userId?: string;
  courseId?: string;
  title: string;
  sortOrder?: number;
  durationMin?: number;
  createdAt?: string;
  updatedAt?: string;
}

export interface Students {
  id: string;
  userId?: string;
  name: string;
  email?: string;
  enrolledAt?: string;
  progress?: number;
  createdAt?: string;
  updatedAt?: string;
}

export interface Assignments {
  id: string;
  userId?: string;
  courseId?: string;
  title: string;
  description?: string;
  dueDate?: string;
  maxScore?: number;
  createdAt?: string;
  updatedAt?: string;
}


// ─── API Responses ──────────────────────────────────
export interface ApiResponse<T> {
  data: T;
  message: string;
}

export interface PaginatedResponse<T> extends ApiResponse<T[]> {
  total: number;
  page: number;
  pageSize: number;
}

export interface ApiError {
  code: string;
  message: string;
  details?: Record<string, string[]>;
}