import { AreaLevel } from '@/server/modules/areas/area.entity';

export interface AreaResponse {
  id: number;
  parentId: number;
  name: string;
  level: AreaLevel;
  code: string;
  isDisabled: number;
  isDeleted: number;
  createdBy: number | null;
  updatedBy: number | null;
  createdAt: string;
  updatedAt: string;
  parent?: AreaResponse | null;
  children?: AreaResponse[];
}

export interface AreaTreeResponse extends AreaResponse {
  children?: AreaTreeResponse[];
}

export interface AreaPathResponse {
  province: AreaResponse;
  city: AreaResponse;
  district: AreaResponse;
}

export interface CreateAreaRequest {
  parentId: number;
  name: string;
  level: AreaLevel;
  code: string;
  isDisabled?: number;
}

export interface UpdateAreaRequest {
  parentId?: number;
  name?: string;
  level?: AreaLevel;
  code?: string;
  isDisabled?: number;
}

export interface AreaListQuery {
  page?: number;
  pageSize?: number;
  keyword?: string;
  level?: AreaLevel;
  parentId?: number;
}