// Auto-generated types

// ─── Base ───────────────────────────────────────────
export interface User {
  id: string;
  username: string;
  nickname?: string;
  role: string;
  createdAt: string;
  updatedAt: string;
}

export interface Board {
  id: string;
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Task {
  id: string;
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Member {
  id: string;
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Item {
  id: string;
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface ActivityLog {
  id: string;
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Stat {
  id: string;
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Note {
  id: string;
  userId?: string;
  title?: string;
  content?: string;
  isMarkdown?: boolean;
  folderId?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Tag {
  id: string;
  name: string;
  color?: string;
}

export interface NoteTag {
  noteId?: string;
  tagId?: string;
}

export interface CreateUserInput {
  phone?: string;
  nickname?: string;
  avatarUrl?: string;
}

export interface CreateBoardInput {
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface CreateTaskInput {
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface CreateMemberInput {
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface CreateItemInput {
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface CreateActivityLogInput {
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface CreateStatInput {
  userId?: string;
  title: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface CreateNoteInput {
  userId?: string;
  title?: string;
  content?: string;
  isMarkdown?: boolean;
  folderId?: string;
}

export interface CreateTagInput {
  name: string;
  color?: string;
}

export interface CreateNoteTagInput {
  noteId?: string;
  tagId?: string;
}

export interface UpdateUserInput {
  phone?: string;
  nickname?: string;
  avatarUrl?: string;
}

export interface UpdateBoardInput {
  userId?: string;
  title?: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface UpdateTaskInput {
  userId?: string;
  title?: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface UpdateMemberInput {
  userId?: string;
  title?: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface UpdateItemInput {
  userId?: string;
  title?: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface UpdateActivityLogInput {
  userId?: string;
  title?: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface UpdateStatInput {
  userId?: string;
  title?: string;
  description?: string;
  status?: string;
  data?: string;
}

export interface UpdateNoteInput {
  userId?: string;
  title?: string;
  content?: string;
  isMarkdown?: boolean;
  folderId?: string;
}

export interface UpdateTagInput {
  name?: string;
  color?: string;
}

export interface UpdateNoteTagInput {
  noteId?: string;
  tagId?: string;
}

// ─── Auth ───────────────────────────────────────────
export interface LoginInput {
  username: string;
  password: string;
}

export interface RegisterInput {
  username: string;
  password: string;
  nickname?: string;
}

export interface AuthResponse {
  token: string;
  user: User;
}

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

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

export interface ErrorResponse {
  error: string;
  message: string;
  statusCode: number;
}

// ─── JWT ────────────────────────────────────────────
export interface JwtPayload {
  userId: string;
  username: string;
  role: string;
  iat?: number;
  exp?: number;
}
