interface DataPosition {
  id: string;
  orgRootId: string;
  orgChild1Id: string | null;
  orgChild2Id: string | null;
  orgChild3Id: string | null;
  orgChild4Id: string | null;
  posMasterNoPrefix: string;
  posMasterNo: string;
  posMasterNoSuffix: string;
  orgShortname: string;
  positions: Position[];
  positionName: string;
  positionField: string;
  posTypeId: string;
  posTypeName: string;
  posLevelId: string;
  posLevelName: string;
  posExecutiveId: string;
  posExecutiveName: string;
  positionExecutiveField: string;
  positionArea: string;
  positionIsSelected: string | boolean;
}

interface Position {
  id: string;
  positionName: string;
  positionField: string;
  posTypeId: string;
  posTypeName: string;
  posLevelId: string;
  posLevelName: string;
  posExecutiveId: string;
  posExecutiveName: string;
  positionExecutiveField: string;
  positionArea: string;
  positionIsSelected: boolean;
}

interface FormDetailPosition {
  positionNo: string;
  positionType: string;
  positionPathSide: string;
  positionLine: string;
  positionSide: string;
  positionLevel: string;
  positionExecutive: string;
  positionExecutiveSide: string;
  status: string;
}

interface DataTree {
  orgTreeId: string;
  orgRootId?: string;
  orgLevel: number;
  orgName: string;
  orgTreeName: string;
  orgTreeShortName: string;
  orgTreeCode: string;
  orgCode: string;
  orgTreeRank: string;
  orgTreeOrder: number;
  orgRootCode?: string;
  orgTreePhoneEx: string;
  orgTreePhoneIn: string;
  orgTreeFax: string;
  orgRevisionId: string;
  orgRootName: string;
  totalPosition: number;
  totalPositionCurrentUse: number;
  totalPositionCurrentVacant: number;
  totalPositionNextUse: number;
  totalPositionNextVacant: number;
  totalRootPosition: number;
  totalRootPositionCurrentUse: number;
  totalRootPositionCurrentVacant: number;
  totalRootPositionNextUse: number;
  totalRootPositionNextVacant: number;

  children?: DataTree[];
}

interface SeaechResult {
  id: string;
  citizenId: string;
  name: string;
  posTypeName: string;
  posLevelName: string;
}
interface FormPositionFilter {
  positionNo: string;
  positionType: string;
  positionLevel: string;
  personal: string;
  position: string;
  status: string;
}

interface DataSortPos {
  id: string;
  name: string;
  posMasterNo: number;
  posMasterNoPrefix: string;
  posMasterNoSuffix: string;
}

interface DataSortAgency {
  name: string;
  orgLevel: number;
  orgRevisionId: string;
  orgRootId: string;
  orgTreeId: string;
  orgTreeName: string;
  orgTreeShortName: string;
}

export type {
  DataPosition,
  Position,
  FormDetailPosition,
  DataTree,
  SeaechResult,
  FormPositionFilter,
  DataSortPos,
  DataSortAgency,
};
