'type CurrentDeptEmp {
  dept_no: String!
  emp_no: Int!
  from_date: DateTime
  to_date: DateTime
}

input CurrentDeptEmpSearchInput {
  dept_no: String
  emp_no: Int
  from_date: DateTime
  to_date: DateTime
}

type Department {
  dept_emps: [DeptEmp]
  dept_managers: [DeptManager]
  dept_name: String!
  dept_no: String!
}

input DepartmentCreateInput {
  dept_name: String!
}

input DepartmentIDInput {
  dept_no: String!
}

input DepartmentSearchInput {
  dept_name: String
}

input DepartmentUpdateInput {
  id: DepartmentIDInput!
  payload: DepartmentSearchInput!
}

type DeptEmp {
  dept_no: Department!
  emp_no: Employee!
  from_date: DateTime!
  to_date: DateTime!
}

input DeptEmpCreateInput {
  dept_no: DepartmentIDInput!
  emp_no: EmployeeIDInput!
  from_date: DateTime!
  to_date: DateTime!
}

input DeptEmpIDInput {
}

type DeptEmpLatestDate {
  emp_no: Int!
  from_date: DateTime
  to_date: DateTime
}

input DeptEmpLatestDateSearchInput {
  emp_no: Int
  from_date: DateTime
  to_date: DateTime
}

input DeptEmpSearchInput {
  from_date: DateTime
  to_date: DateTime
}

input DeptEmpUpdateInput {
  id: DeptEmpIDInput!
  payload: DeptEmpSearchInput!
}

type DeptManager {
  dept_no: Department!
  emp_no: Employee!
  from_date: DateTime!
  to_date: DateTime!
}

input DeptManagerCreateInput {
  dept_no: DepartmentIDInput!
  emp_no: EmployeeIDInput!
  from_date: DateTime!
  to_date: DateTime!
}

input DeptManagerIDInput {
}

input DeptManagerSearchInput {
  from_date: DateTime
  to_date: DateTime
}

input DeptManagerUpdateInput {
  id: DeptManagerIDInput!
  payload: DeptManagerSearchInput!
}

type Employee {
  birth_date: DateTime!
  dept_emps: [DeptEmp]
  dept_managers: [DeptManager]
  emp_no: Int!
  first_name: String!
  gender: EmployeeGender!
  hire_date: DateTime!
  last_name: String!
  salaries: [Salary]
  titles: [Title]
}

input EmployeeCreateInput {
  birth_date: DateTime!
  first_name: String!
  gender: EmployeeGender!
  hire_date: DateTime!
  last_name: String!
}

enum EmployeeGender {
  F
  M
}

input EmployeeIDInput {
  emp_no: Int!
}

input EmployeeSearchInput {
  birth_date: DateTime
  first_name: String
  gender: EmployeeGender
  hire_date: DateTime
  last_name: String
}

input EmployeeUpdateInput {
  id: EmployeeIDInput!
  payload: EmployeeSearchInput!
}

type Mutation {
  createDepartment(input: [DepartmentCreateInput!]!): [Department]
  createDeptEmp(input: [DeptEmpCreateInput!]!): [DeptEmp]
  createDeptManager(input: [DeptManagerCreateInput!]!): [DeptManager]
  createEmployee(input: [EmployeeCreateInput!]!): [Employee]
  createSalary(input: [SalaryCreateInput!]!): [Salary]
  createTitle(input: [TitleCreateInput!]!): [Title]
  deleteDepartment(input: [DepartmentIDInput!]!): [Boolean]
  deleteDeptEmp(input: [DeptEmpIDInput!]!): [Boolean]
  deleteDeptManager(input: [DeptManagerIDInput!]!): [Boolean]
  deleteEmployee(input: [EmployeeIDInput!]!): [Boolean]
  deleteSalary(input: [SalaryIDInput!]!): [Boolean]
  deleteTitle(input: [TitleIDInput!]!): [Boolean]
  updateDepartment(input: [DepartmentUpdateInput!]!): [Department]
  updateDeptEmp(input: [DeptEmpUpdateInput!]!): [DeptEmp]
  updateDeptManager(input: [DeptManagerUpdateInput!]!): [DeptManager]
  updateEmployee(input: [EmployeeUpdateInput!]!): [Employee]
  updateSalary(input: [SalaryUpdateInput!]!): [Salary]
  updateTitle(input: [TitleUpdateInput!]!): [Title]
}

type Query {
  department(dept_no: String!): Department
  departments(dept_no: [String!]!): [Department]
  employee(emp_no: Int!): Employee
  employees(emp_no: [Int!]!): [Employee]
  salaries(from_date: [DateTime!]!): [Salary]
  salary(from_date: DateTime!): Salary
  searchCurrentDeptEmp(input: CurrentDeptEmpSearchInput!): [CurrentDeptEmp]
  searchDepartment(input: DepartmentSearchInput!): [Department]
  searchDeptEmp(input: DeptEmpSearchInput!): [DeptEmp]
  searchDeptEmpLatestDate(input: DeptEmpLatestDateSearchInput!): [DeptEmpLatestDate]
  searchDeptManager(input: DeptManagerSearchInput!): [DeptManager]
  searchEmployee(input: EmployeeSearchInput!): [Employee]
  searchSalary(input: SalarySearchInput!): [Salary]
  searchTitle(input: TitleSearchInput!): [Title]
  title(from_date: DateTime!, title: String!): Title
  titles(from_date: [DateTime!]!, title: [String!]!): [Title]
}

type Salary {
  emp_no: Employee!
  from_date: DateTime!
  salary: Int!
  to_date: DateTime!
}

input SalaryCreateInput {
  emp_no: EmployeeIDInput!
  salary: Int!
  to_date: DateTime!
}

input SalaryIDInput {
  from_date: DateTime!
}

input SalarySearchInput {
  salary: Int
  to_date: DateTime
}

input SalaryUpdateInput {
  id: SalaryIDInput!
  payload: SalarySearchInput!
}

type Title {
  emp_no: Employee!
  from_date: DateTime!
  title: String!
  to_date: DateTime
}

input TitleCreateInput {
  emp_no: EmployeeIDInput!
  to_date: DateTime
}

input TitleIDInput {
  from_date: DateTime!
  title: String!
}

input TitleSearchInput {
  to_date: DateTime
}

input TitleUpdateInput {
  id: TitleIDInput!
  payload: TitleSearchInput!
}
'
