//response api เกี่ยวกับ status code กับ error
interface RequestHistoryObject {
  message: String;
  result: ResultHistoryObject;
  status: number;
}

//rusult แนบ id version mongo
interface ResultHistoryObject {
  id: String;
  items: RequestPrefixHistoryObject;
  version: String;
}

//ข้อมูล คำนำหน้าชื่อ
interface RequestPrefixHistoryObject {
  createdAt?: Date;
  createdFullName: String;
  createdUserId: String;
  id: String;
  isActive: Boolean;
  lastUpdateFullName: String;
  lastUpdateUserId: String;
  lastUpdatedAt?: Date;
  name: String;
}

//columns
interface PrefixColumns {
  [index: number]: {
    name: String;
    align: String;
    label: String;
    sortable: Boolean;
    field: String;
    headerStyle: String;
    style: String;
  };
}

export type {
  RequestHistoryObject,
  ResultHistoryObject,
  RequestPrefixHistoryObject,
  PrefixColumns,
};
