// Project File types for the frontend

export interface ProjectFileBase {
  id: string;
  name: string;
  category: string;
  description?: string;
  fileUrl: string;
  fileType: string;
  size: string;
  status: string;
}

export interface ProjectFile extends ProjectFileBase {
  project: {
    id: string;
    name?: string;
  };
  createdBy?: {
    id: string;
    firstName?: string;
    lastName?: string;
  };
  updatedBy?: {
    id: string;
    firstName?: string;
    lastName?: string;
  };
  createdAt?: string | Date;
  updatedAt?: string | Date;
}

// Request and response types
export interface CreateProjectFileRequest {
  name: string;
  category: string;
  description?: string;
  fileUrl: string;
  fileType: string;
  size: string;
  project: string;
  status?: string;
}

export type UpdateProjectFileRequest = Partial<CreateProjectFileRequest>;

export interface ProjectFileFilterParams {
  page?: number;
  limit?: number;
  search?: string;
  sortBy?: string;
  populate?: string;
  includeTimeStamps?: boolean;
  project?: string;
  category?: string;
  size?: string;
  createdBy?: string;
  status?: string;
}

export interface ProjectFileListResponse {
  results: ProjectFile[];
  page: number;
  limit: number;
  totalPages: number;
  totalResults: number;
}

export interface GetProjectFileListResponse {
  code: number;
  message: string;
  success: boolean;
  data: ProjectFileListResponse;
  error?: object;
}

export interface GetProjectFileByIdResponse {
  code: number;
  message: string;
  success: boolean;
  data: ProjectFile;
  error?: object;
}