declare interface ISearchWorkOrder {
  page?: number;
  limit?: number;
  search?: string;
  startDate?: any;
  endDate?: any;
  date?: any;
  status?: string;
  organization?: string;
  site?: string;
  provider?: string;
  providerService?: string;
  service?: string;
}

declare type TWorkOrder = {
  _id?: string;
  description: string;
  service: string;
  subject: string | null;
  provider: string | null;
  providerName?: string;
  status?: string;
  assignee?: string | TUser;
  assigneeName?: string;
  assigneeInfo?: Record<string, any>;
  attachments?: string[];
  createdBy?: string | TUser;
  createdByName?: string;
  site: string;
  organization: string;
  location?: string;
  comments?: TComment[];
  createdAt?: string | Date;
  updatedAt?: string | Date;
  feedback?: string;
  prefix?: string;
  noOfDigits?: any;
  number?: number;
  version?: number;
  isHighPriority?: boolean;
};

declare type TWorkOrderResponse = {
  items: TWorkOrder[];
  pageRange: string;
  pages: number;
};

declare type TWorkOrderCreate = Pick<
  TWorkOrder,
  | "subject"
  | "description"
  | "attachments"
  | "location"
  | "organization"
  | "site"
  | "block"
  | "level"
  | "unit"
  | "highPriority"
  | "assignee"
  | "feedback"
  | "category"
  | "serviceProvider"
>;

declare type TComment = {
  seenByNames: any;
  justify: string;
  _id?: string;
  comment: string;
  attachments?: TAttachment[];
  createdBy: string;
  workOrder: string;
  updatedAt?: string;
  createdByName?: string;
  createdByType?: string;
};
