interface ResGroup {
  id: string;
  posLevels: ResLevel[];
  posTypeName: string;
  posTypeRank: number;
  posTypeShortName: string;
}

interface ResLevel {
  id: string;
  posLevelName: number;
  posTypeName: string;
  posTypeId: string;
  posLevelAuthority: string;
}

interface ResListProject {
  id: string;
  projectName: string;
  year: number;
}

interface ResDataProject {
  year: number;
  projectName: string;
  reason: string;
  objective: string;
  metricType: string;
  indicators: string;
  target: string;
  calculation: string;
  measuRement: string;
  results: string;
  obstacles: string;
  suggestions: string;
  project: string;
  isPassAllocate: boolean;
  isPassNoAllocate: boolean;
  isNoPass: boolean;
  isBudget: boolean;
  isOutBudget: boolean;
  dateStart: Date | null;
  dateEnd: Date | null;
  totalDate: number | null;
  address: string;
  provinces: any;
  budget: string;
  accept: number | string | null;
  receive: number | string | null;
  approved: number | string | null;
  budgetPay: number | string | null;
  issues: string;
  chance: string;
  effects: string;
  riskLevel: string;
  riskManagement: string;
  expect: string;
  topicAcademic: string;
  addressAcademic: string;
  provinceActualId: string;
  actualPeoples: ResPeople[];
  plannedPeoples: ResPeople[];
  actualGoals: ResActualGoals[];
  plannedGoals: ResPlannedGoals[];
  projectType: string;
  projectCharacteristics: string;
  projectDay: number | null;
  projectNigth: number | null;
  projectTechniques: string;
  projectModal: number | null;
  status?: string;
}

interface ResPeople {
  groupTarget: string;
  amount: number | null;
}

interface ResActualGoals {
  groupTarget: string;
  groupTargetSub: string;
  position: string;
  posTypeActualId: string | null;
  posLevelActualId: string | null;
  type: string | null;
  amount: number | null;
}

interface ResPlannedGoals {
  groupTarget: string;
  groupTargetSub: string;
  plannedGoalPositions?: [
    {
      position: string;
      posTypePlannedId: string;
      posLevelPlannedId: string;
    }
  ];
  position: PositionsType[];
  posTypePlannedId: string;
  posLevelPlannedId: string;
  type: string | null;
  amount: number | null;
}

interface PositionsType {
  id: string;
  posLevel: string;
  posLevelId: string;
  posType: string;
  posTypeId: string;
  position: string;
}
interface ResRecord {
  commandDate: Date | null;
  commandNumber: string | null;
  firstName: string;
  fullName: string;
  id: string;
  idcard: string;
  isDone: boolean;
  lastName: string;
  org: string;
  posExecutive: string | null;
  posLevelName: string;
  posTypeName: string;
  position: string;
  prefix: string;
  trainingDays: number | null;
  type: string;
  isProfile: boolean;
  idDoneIDP: boolean;
}

interface DataStrategic {
  id: string;
  name: string;
  level: number;
  children: DataStrategic;
}

interface DataTree {
  labelName: string;
  orgCode: string;
  orgLevel: number | null;
  orgName: string;
  orgRevisionId: string;
  orgRootName: string;
  orgTreeCode: string;
  orgTreeFax: string;
  orgTreeId: string;
  orgTreeName: string;
  orgTreeOrder: number | null;
  orgTreePhoneEx: string;
  orgTreePhoneIn: string;
  orgTreeRank: string;
  orgTreeRankSub: string | null;
  orgTreeShortName: string;
  totalPosition: number | null;
  totalPositionCurrentUse: number | null;
  totalPositionCurrentVacant: number | null;
  totalPositionNextUse: number | null;
  totalPositionNextVacant: number | null;
  totalRootPosition: number | null;
  totalRootPositionCurrentUse: number | null;
  totalRootPositionCurrentVacant: number | null;
  totalRootPositionNextUse: number | null;
  totalRootPositionNextVacant: number | null;
  children: DataTree;
  orgTreeDnaId: string;
}

interface ResHistory {
  citizenId: string;
  fullName: string;
  id: string;
  posExecutive: string;
  posLevel: string;
  posType: string;
  position: string;
  projectName: string;
  root: string;
  year: number;
}

interface ResPrefix {
  createdAt: string;
  createdFullName: string;
  id: string;
  lastUpdateFullName: string;
  lastUpdatedAt: string;
  name: string;
}

interface ResRisk {
  chance: number;
  createdAt: string;
  createdFullName: string;
  createdUserId: string;
  developmentId: string;
  effects: number;
  id: string;
  issues: string;
  lastUpdateFullName: string;
  lastUpdateUserId: string;
  lastUpdatedAt: string;
  riskLevel: string;
  riskManagement: string;
}

export type {
  ResGroup,
  ResLevel,
  ResListProject,
  ResDataProject,
  ResPeople,
  ResActualGoals,
  ResPlannedGoals,
  ResRecord,
  DataStrategic,
  DataTree,
  ResHistory,
  ResPrefix,
  ResRisk,
  PositionsType,
};
