// Auto-generated types

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

export interface Pet {
  id: string;
  ownerId?: string;
  name: string;
  species?: string;
  breed?: string;
  birthDate?: string;
  weightKg?: number;
  avatarUrl?: string;
  createdAt?: string;
}

export interface Schedule {
  id: string;
  petId?: string;
  type: string;
  title: string;
  scheduledAt?: string;
  completed?: boolean;
}

export interface DailyLog {
  id: string;
  petId?: string;
  category: string;
  value?: string;
  loggedAt?: string;
}

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

export interface CreatePetInput {
  ownerId?: string;
  name: string;
  species?: string;
  breed?: string;
  birthDate?: string;
  weightKg?: number;
  avatarUrl?: string;
}

export interface CreateScheduleInput {
  petId?: string;
  type: string;
  title: string;
  scheduledAt?: string;
  completed?: boolean;
}

export interface CreateDailyLogInput {
  petId?: string;
  category: string;
  value?: string;
  loggedAt?: string;
}

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

export interface UpdatePetInput {
  ownerId?: string;
  name?: string;
  species?: string;
  breed?: string;
  birthDate?: string;
  weightKg?: number;
  avatarUrl?: string;
}

export interface UpdateScheduleInput {
  petId?: string;
  type?: string;
  title?: string;
  scheduledAt?: string;
  completed?: boolean;
}

export interface UpdateDailyLogInput {
  petId?: string;
  category?: string;
  value?: string;
  loggedAt?: 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;
}
