export type TaskPriority = 0 | 1 | 2;

export interface Task {
  id: number;
  title: string;
  priority: TaskPriority;
  isCompleted: boolean;
  createdAt: string;
  updatedAt: string;
  parentTaskId?: number;
  subTasks: Task[];
}

export interface CreateTaskDto {
  title: string;
  priority: TaskPriority;
  parentTaskId?: number;
}

export interface UpdateTaskDto {
  id: number;
  title?: string;
  priority?: TaskPriority;
}

export interface ApiResponse<T> {
  success: boolean;
  data?: T;
  message: string;
  errors?: string[];
}
