feat(contract): added the contact model in the schema.prisma and base setup for the contracts module. moved the columns daily_expected_hours and applicable_overtime of the employees table to the new contract table.
This commit is contained in:
parent
2b04c3151d
commit
10b51f5ae6
|
|
@ -37,6 +37,11 @@ export type userModuleAccess = Prisma.userModuleAccessModel
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Employees = Prisma.EmployeesModel
|
export type Employees = Prisma.EmployeesModel
|
||||||
|
/**
|
||||||
|
* Model Contracts
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Contracts = Prisma.ContractsModel
|
||||||
/**
|
/**
|
||||||
* Model LeaveRequests
|
* Model LeaveRequests
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,11 @@ export type userModuleAccess = Prisma.userModuleAccessModel
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Employees = Prisma.EmployeesModel
|
export type Employees = Prisma.EmployeesModel
|
||||||
|
/**
|
||||||
|
* Model Contracts
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Contracts = Prisma.ContractsModel
|
||||||
/**
|
/**
|
||||||
* Model LeaveRequests
|
* Model LeaveRequests
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -314,6 +314,33 @@ export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type DecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type EnumLeaveTypesFilter<$PrismaModel = never> = {
|
export type EnumLeaveTypesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.LeaveTypes | Prisma.EnumLeaveTypesFieldRefInput<$PrismaModel>
|
equals?: $Enums.LeaveTypes | Prisma.EnumLeaveTypesFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.LeaveTypes[] | Prisma.ListEnumLeaveTypesFieldRefInput<$PrismaModel>
|
in?: $Enums.LeaveTypes[] | Prisma.ListEnumLeaveTypesFieldRefInput<$PrismaModel>
|
||||||
|
|
@ -432,33 +459,6 @@ export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedUuidFilter<$PrismaModel = never> = {
|
export type NestedUuidFilter<$PrismaModel = never> = {
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
||||||
|
|
@ -743,6 +743,33 @@ export type NestedFloatNullableFilter<$PrismaModel = never> = {
|
||||||
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedEnumLeaveTypesFilter<$PrismaModel = never> = {
|
export type NestedEnumLeaveTypesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.LeaveTypes | Prisma.EnumLeaveTypesFieldRefInput<$PrismaModel>
|
equals?: $Enums.LeaveTypes | Prisma.EnumLeaveTypesFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.LeaveTypes[] | Prisma.ListEnumLeaveTypesFieldRefInput<$PrismaModel>
|
in?: $Enums.LeaveTypes[] | Prisma.ListEnumLeaveTypesFieldRefInput<$PrismaModel>
|
||||||
|
|
@ -850,31 +877,4 @@ export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | Prisma.ListDecimalFieldRefInput<$PrismaModel>
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -388,6 +388,7 @@ export const ModelName = {
|
||||||
Notifications: 'Notifications',
|
Notifications: 'Notifications',
|
||||||
userModuleAccess: 'userModuleAccess',
|
userModuleAccess: 'userModuleAccess',
|
||||||
Employees: 'Employees',
|
Employees: 'Employees',
|
||||||
|
Contracts: 'Contracts',
|
||||||
LeaveRequests: 'LeaveRequests',
|
LeaveRequests: 'LeaveRequests',
|
||||||
LeaveRequestsArchive: 'LeaveRequestsArchive',
|
LeaveRequestsArchive: 'LeaveRequestsArchive',
|
||||||
Timesheets: 'Timesheets',
|
Timesheets: 'Timesheets',
|
||||||
|
|
@ -419,7 +420,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||||
omit: GlobalOmitOptions
|
omit: GlobalOmitOptions
|
||||||
}
|
}
|
||||||
meta: {
|
meta: {
|
||||||
modelProps: "users" | "notifications" | "userModuleAccess" | "employees" | "leaveRequests" | "leaveRequestsArchive" | "timesheets" | "timesheetsArchive" | "schedulePresets" | "schedulePresetShifts" | "shifts" | "shiftsArchive" | "bankCodes" | "expenses" | "expensesArchive" | "oAuthSessions" | "sessions" | "preferences" | "paidTimeOff" | "payPeriods"
|
modelProps: "users" | "notifications" | "userModuleAccess" | "employees" | "contracts" | "leaveRequests" | "leaveRequestsArchive" | "timesheets" | "timesheetsArchive" | "schedulePresets" | "schedulePresetShifts" | "shifts" | "shiftsArchive" | "bankCodes" | "expenses" | "expensesArchive" | "oAuthSessions" | "sessions" | "preferences" | "paidTimeOff" | "payPeriods"
|
||||||
txIsolationLevel: TransactionIsolationLevel
|
txIsolationLevel: TransactionIsolationLevel
|
||||||
}
|
}
|
||||||
model: {
|
model: {
|
||||||
|
|
@ -719,6 +720,80 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Contracts: {
|
||||||
|
payload: Prisma.$ContractsPayload<ExtArgs>
|
||||||
|
fields: Prisma.ContractsFieldRefs
|
||||||
|
operations: {
|
||||||
|
findUnique: {
|
||||||
|
args: Prisma.ContractsFindUniqueArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload> | null
|
||||||
|
}
|
||||||
|
findUniqueOrThrow: {
|
||||||
|
args: Prisma.ContractsFindUniqueOrThrowArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>
|
||||||
|
}
|
||||||
|
findFirst: {
|
||||||
|
args: Prisma.ContractsFindFirstArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload> | null
|
||||||
|
}
|
||||||
|
findFirstOrThrow: {
|
||||||
|
args: Prisma.ContractsFindFirstOrThrowArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>
|
||||||
|
}
|
||||||
|
findMany: {
|
||||||
|
args: Prisma.ContractsFindManyArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>[]
|
||||||
|
}
|
||||||
|
create: {
|
||||||
|
args: Prisma.ContractsCreateArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>
|
||||||
|
}
|
||||||
|
createMany: {
|
||||||
|
args: Prisma.ContractsCreateManyArgs<ExtArgs>
|
||||||
|
result: BatchPayload
|
||||||
|
}
|
||||||
|
createManyAndReturn: {
|
||||||
|
args: Prisma.ContractsCreateManyAndReturnArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>[]
|
||||||
|
}
|
||||||
|
delete: {
|
||||||
|
args: Prisma.ContractsDeleteArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>
|
||||||
|
}
|
||||||
|
update: {
|
||||||
|
args: Prisma.ContractsUpdateArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>
|
||||||
|
}
|
||||||
|
deleteMany: {
|
||||||
|
args: Prisma.ContractsDeleteManyArgs<ExtArgs>
|
||||||
|
result: BatchPayload
|
||||||
|
}
|
||||||
|
updateMany: {
|
||||||
|
args: Prisma.ContractsUpdateManyArgs<ExtArgs>
|
||||||
|
result: BatchPayload
|
||||||
|
}
|
||||||
|
updateManyAndReturn: {
|
||||||
|
args: Prisma.ContractsUpdateManyAndReturnArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>[]
|
||||||
|
}
|
||||||
|
upsert: {
|
||||||
|
args: Prisma.ContractsUpsertArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.PayloadToResult<Prisma.$ContractsPayload>
|
||||||
|
}
|
||||||
|
aggregate: {
|
||||||
|
args: Prisma.ContractsAggregateArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.Optional<Prisma.AggregateContracts>
|
||||||
|
}
|
||||||
|
groupBy: {
|
||||||
|
args: Prisma.ContractsGroupByArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.Optional<Prisma.ContractsGroupByOutputType>[]
|
||||||
|
}
|
||||||
|
count: {
|
||||||
|
args: Prisma.ContractsCountArgs<ExtArgs>
|
||||||
|
result: runtime.Types.Utils.Optional<Prisma.ContractsCountAggregateOutputType> | number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
LeaveRequests: {
|
LeaveRequests: {
|
||||||
payload: Prisma.$LeaveRequestsPayload<ExtArgs>
|
payload: Prisma.$LeaveRequestsPayload<ExtArgs>
|
||||||
fields: Prisma.LeaveRequestsFieldRefs
|
fields: Prisma.LeaveRequestsFieldRefs
|
||||||
|
|
@ -1947,19 +2022,30 @@ export const EmployeesScalarFieldEnum = {
|
||||||
user_id: 'user_id',
|
user_id: 'user_id',
|
||||||
external_payroll_id: 'external_payroll_id',
|
external_payroll_id: 'external_payroll_id',
|
||||||
company_code: 'company_code',
|
company_code: 'company_code',
|
||||||
daily_expected_hours: 'daily_expected_hours',
|
|
||||||
first_work_day: 'first_work_day',
|
first_work_day: 'first_work_day',
|
||||||
last_work_day: 'last_work_day',
|
last_work_day: 'last_work_day',
|
||||||
supervisor_id: 'supervisor_id',
|
supervisor_id: 'supervisor_id',
|
||||||
job_title: 'job_title',
|
job_title: 'job_title',
|
||||||
is_supervisor: 'is_supervisor',
|
is_supervisor: 'is_supervisor',
|
||||||
applicable_overtime: 'applicable_overtime',
|
|
||||||
schedule_preset_id: 'schedule_preset_id'
|
schedule_preset_id: 'schedule_preset_id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type EmployeesScalarFieldEnum = (typeof EmployeesScalarFieldEnum)[keyof typeof EmployeesScalarFieldEnum]
|
export type EmployeesScalarFieldEnum = (typeof EmployeesScalarFieldEnum)[keyof typeof EmployeesScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const ContractsScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
employee_id: 'employee_id',
|
||||||
|
daily_expected_hours: 'daily_expected_hours',
|
||||||
|
applicable_overtime: 'applicable_overtime',
|
||||||
|
phone_allocation: 'phone_allocation',
|
||||||
|
on_call_allocation: 'on_call_allocation',
|
||||||
|
weekend_on_call_allocation: 'weekend_on_call_allocation'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ContractsScalarFieldEnum = (typeof ContractsScalarFieldEnum)[keyof typeof ContractsScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const LeaveRequestsScalarFieldEnum = {
|
export const LeaveRequestsScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
employee_id: 'employee_id',
|
employee_id: 'employee_id',
|
||||||
|
|
@ -2326,6 +2412,20 @@ export type EnumApplicableOvertimeFieldRefInput<$PrismaModel> = FieldRefInputTyp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference to a field of type 'Decimal'
|
||||||
|
*/
|
||||||
|
export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference to a field of type 'Decimal[]'
|
||||||
|
*/
|
||||||
|
export type ListDecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal[]'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'LeaveTypes'
|
* Reference to a field of type 'LeaveTypes'
|
||||||
*/
|
*/
|
||||||
|
|
@ -2354,20 +2454,6 @@ export type ListEnumLeaveApprovalStatusFieldRefInput<$PrismaModel> = FieldRefInp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to a field of type 'Decimal'
|
|
||||||
*/
|
|
||||||
export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to a field of type 'Decimal[]'
|
|
||||||
*/
|
|
||||||
export type ListDecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal[]'>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to a field of type 'Weekday'
|
* Reference to a field of type 'Weekday'
|
||||||
*/
|
*/
|
||||||
|
|
@ -2494,6 +2580,7 @@ export type GlobalOmitConfig = {
|
||||||
notifications?: Prisma.NotificationsOmit
|
notifications?: Prisma.NotificationsOmit
|
||||||
userModuleAccess?: Prisma.userModuleAccessOmit
|
userModuleAccess?: Prisma.userModuleAccessOmit
|
||||||
employees?: Prisma.EmployeesOmit
|
employees?: Prisma.EmployeesOmit
|
||||||
|
contracts?: Prisma.ContractsOmit
|
||||||
leaveRequests?: Prisma.LeaveRequestsOmit
|
leaveRequests?: Prisma.LeaveRequestsOmit
|
||||||
leaveRequestsArchive?: Prisma.LeaveRequestsArchiveOmit
|
leaveRequestsArchive?: Prisma.LeaveRequestsArchiveOmit
|
||||||
timesheets?: Prisma.TimesheetsOmit
|
timesheets?: Prisma.TimesheetsOmit
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ export const ModelName = {
|
||||||
Notifications: 'Notifications',
|
Notifications: 'Notifications',
|
||||||
userModuleAccess: 'userModuleAccess',
|
userModuleAccess: 'userModuleAccess',
|
||||||
Employees: 'Employees',
|
Employees: 'Employees',
|
||||||
|
Contracts: 'Contracts',
|
||||||
LeaveRequests: 'LeaveRequests',
|
LeaveRequests: 'LeaveRequests',
|
||||||
LeaveRequestsArchive: 'LeaveRequestsArchive',
|
LeaveRequestsArchive: 'LeaveRequestsArchive',
|
||||||
Timesheets: 'Timesheets',
|
Timesheets: 'Timesheets',
|
||||||
|
|
@ -138,19 +139,30 @@ export const EmployeesScalarFieldEnum = {
|
||||||
user_id: 'user_id',
|
user_id: 'user_id',
|
||||||
external_payroll_id: 'external_payroll_id',
|
external_payroll_id: 'external_payroll_id',
|
||||||
company_code: 'company_code',
|
company_code: 'company_code',
|
||||||
daily_expected_hours: 'daily_expected_hours',
|
|
||||||
first_work_day: 'first_work_day',
|
first_work_day: 'first_work_day',
|
||||||
last_work_day: 'last_work_day',
|
last_work_day: 'last_work_day',
|
||||||
supervisor_id: 'supervisor_id',
|
supervisor_id: 'supervisor_id',
|
||||||
job_title: 'job_title',
|
job_title: 'job_title',
|
||||||
is_supervisor: 'is_supervisor',
|
is_supervisor: 'is_supervisor',
|
||||||
applicable_overtime: 'applicable_overtime',
|
|
||||||
schedule_preset_id: 'schedule_preset_id'
|
schedule_preset_id: 'schedule_preset_id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type EmployeesScalarFieldEnum = (typeof EmployeesScalarFieldEnum)[keyof typeof EmployeesScalarFieldEnum]
|
export type EmployeesScalarFieldEnum = (typeof EmployeesScalarFieldEnum)[keyof typeof EmployeesScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const ContractsScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
employee_id: 'employee_id',
|
||||||
|
daily_expected_hours: 'daily_expected_hours',
|
||||||
|
applicable_overtime: 'applicable_overtime',
|
||||||
|
phone_allocation: 'phone_allocation',
|
||||||
|
on_call_allocation: 'on_call_allocation',
|
||||||
|
weekend_on_call_allocation: 'weekend_on_call_allocation'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ContractsScalarFieldEnum = (typeof ContractsScalarFieldEnum)[keyof typeof ContractsScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const LeaveRequestsScalarFieldEnum = {
|
export const LeaveRequestsScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
employee_id: 'employee_id',
|
employee_id: 'employee_id',
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export type * from './models/Users'
|
||||||
export type * from './models/Notifications'
|
export type * from './models/Notifications'
|
||||||
export type * from './models/userModuleAccess'
|
export type * from './models/userModuleAccess'
|
||||||
export type * from './models/Employees'
|
export type * from './models/Employees'
|
||||||
|
export type * from './models/Contracts'
|
||||||
export type * from './models/LeaveRequests'
|
export type * from './models/LeaveRequests'
|
||||||
export type * from './models/LeaveRequestsArchive'
|
export type * from './models/LeaveRequestsArchive'
|
||||||
export type * from './models/Timesheets'
|
export type * from './models/Timesheets'
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -431,14 +431,6 @@ export type PaidTimeOffUncheckedUpdateOneWithoutEmployeeNestedInput = {
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.PaidTimeOffUpdateToOneWithWhereWithoutEmployeeInput, Prisma.PaidTimeOffUpdateWithoutEmployeeInput>, Prisma.PaidTimeOffUncheckedUpdateWithoutEmployeeInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.PaidTimeOffUpdateToOneWithWhereWithoutEmployeeInput, Prisma.PaidTimeOffUpdateWithoutEmployeeInput>, Prisma.PaidTimeOffUncheckedUpdateWithoutEmployeeInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalFieldUpdateOperationsInput = {
|
|
||||||
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PaidTimeOffCreateWithoutEmployeeInput = {
|
export type PaidTimeOffCreateWithoutEmployeeInput = {
|
||||||
vacation_hours?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
vacation_hours?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
banked_hours?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
banked_hours?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,14 @@ datasource db {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Users {
|
model Users {
|
||||||
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
||||||
first_name String
|
first_name String
|
||||||
last_name String
|
last_name String
|
||||||
email String @unique
|
email String @unique
|
||||||
phone_number String
|
phone_number String
|
||||||
residence String?
|
residence String?
|
||||||
role Roles @default(EMPLOYEE)
|
role Roles @default(EMPLOYEE)
|
||||||
|
|
||||||
notifications Notifications? @relation("UserNotification")
|
notifications Notifications? @relation("UserNotification")
|
||||||
employee Employees? @relation("UserEmployee")
|
employee Employees? @relation("UserEmployee")
|
||||||
oauth_sessions OAuthSessions[] @relation("UserOAuthSessions")
|
oauth_sessions OAuthSessions[] @relation("UserOAuthSessions")
|
||||||
|
|
@ -34,7 +35,8 @@ model Notifications {
|
||||||
metadata Json @db.JsonB
|
metadata Json @db.JsonB
|
||||||
created_at DateTime @default(now())
|
created_at DateTime @default(now())
|
||||||
viewed_at DateTime?
|
viewed_at DateTime?
|
||||||
user Users @relation("UserNotification", fields: [user_id], references: [id])
|
|
||||||
|
user Users @relation("UserNotification", fields: [user_id], references: [id])
|
||||||
|
|
||||||
@@map("notifications")
|
@@map("notifications")
|
||||||
}
|
}
|
||||||
|
|
@ -51,48 +53,64 @@ model userModuleAccess {
|
||||||
chatbot Boolean @default(false)
|
chatbot Boolean @default(false)
|
||||||
ticket Boolean @default(false)
|
ticket Boolean @default(false)
|
||||||
ticket_management Boolean @default(false)
|
ticket_management Boolean @default(false)
|
||||||
user Users @relation("UserModuleAccess", fields: [user_id], references: [id])
|
|
||||||
|
user Users @relation("UserModuleAccess", fields: [user_id], references: [id])
|
||||||
|
|
||||||
@@map("user_module_access")
|
@@map("user_module_access")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Employees {
|
model Employees {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
user_id String @unique @db.Uuid
|
user_id String @unique @db.Uuid
|
||||||
external_payroll_id Int
|
external_payroll_id Int
|
||||||
company_code Int
|
company_code Int
|
||||||
daily_expected_hours Int @default(24)
|
first_work_day DateTime @db.Date
|
||||||
first_work_day DateTime @db.Date
|
last_work_day DateTime? @db.Date
|
||||||
last_work_day DateTime? @db.Date
|
supervisor_id Int?
|
||||||
supervisor_id Int?
|
job_title String?
|
||||||
job_title String?
|
is_supervisor Boolean @default(false)
|
||||||
is_supervisor Boolean @default(false)
|
schedule_preset_id Int?
|
||||||
applicable_overtime ApplicableOvertime[] @default([WEEKLY])
|
|
||||||
schedule_preset_id Int?
|
schedule_preset SchedulePresets? @relation("EmployeesSchedulePreset", fields: [schedule_preset_id], references: [id])
|
||||||
schedule_preset SchedulePresets? @relation("EmployeesSchedulePreset", fields: [schedule_preset_id], references: [id])
|
supervisor Employees? @relation("EmployeeSupervisor", fields: [supervisor_id], references: [id])
|
||||||
supervisor Employees? @relation("EmployeeSupervisor", fields: [supervisor_id], references: [id])
|
crew Employees[] @relation("EmployeeSupervisor")
|
||||||
crew Employees[] @relation("EmployeeSupervisor")
|
user Users @relation("UserEmployee", fields: [user_id], references: [id])
|
||||||
user Users @relation("UserEmployee", fields: [user_id], references: [id])
|
leave_request LeaveRequests[] @relation("LeaveRequestEmployee")
|
||||||
leave_request LeaveRequests[] @relation("LeaveRequestEmployee")
|
timesheet Timesheets[] @relation("TimesheetEmployee")
|
||||||
timesheet Timesheets[] @relation("TimesheetEmployee")
|
paid_time_off PaidTimeOff? @relation("EmployeePaidTimeOff")
|
||||||
paid_time_off PaidTimeOff? @relation("EmployeePaidTimeOff")
|
contracts Contracts? @relation("EmployeeContract")
|
||||||
|
|
||||||
@@map("employees")
|
@@map("employees")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model Contracts {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
employee_id Int @unique
|
||||||
|
daily_expected_hours Int @default(24)
|
||||||
|
applicable_overtime ApplicableOvertime[] @default([WEEKLY])
|
||||||
|
phone_allocation Decimal @default(0.00)
|
||||||
|
on_call_allocation Decimal @default(0.00)
|
||||||
|
weekend_on_call_allocation Decimal @default(0.00)
|
||||||
|
|
||||||
|
employee Employees @relation("EmployeeContract", fields: [employee_id], references: [id])
|
||||||
|
|
||||||
|
@@map("contracts")
|
||||||
|
}
|
||||||
|
|
||||||
model LeaveRequests {
|
model LeaveRequests {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
employee_id Int
|
employee_id Int
|
||||||
leave_type LeaveTypes
|
leave_type LeaveTypes
|
||||||
comment String
|
comment String
|
||||||
approval_status LeaveApprovalStatus @default(PENDING)
|
approval_status LeaveApprovalStatus @default(PENDING)
|
||||||
bank_code_id Int
|
bank_code_id Int
|
||||||
payable_hours Decimal? @db.Decimal(5, 2)
|
payable_hours Decimal? @db.Decimal(5, 2)
|
||||||
requested_hours Decimal? @db.Decimal(5, 2)
|
requested_hours Decimal? @db.Decimal(5, 2)
|
||||||
dates DateTime[] @db.Date
|
dates DateTime[] @db.Date
|
||||||
bank_code BankCodes @relation("LeaveRequestBankCodes", fields: [bank_code_id], references: [id])
|
|
||||||
employee Employees @relation("LeaveRequestEmployee", fields: [employee_id], references: [id])
|
bank_code BankCodes @relation("LeaveRequestBankCodes", fields: [bank_code_id], references: [id])
|
||||||
archive LeaveRequestsArchive? @relation("LeaveRequestToArchive")
|
employee Employees @relation("LeaveRequestEmployee", fields: [employee_id], references: [id])
|
||||||
|
archive LeaveRequestsArchive? @relation("LeaveRequestToArchive")
|
||||||
|
|
||||||
@@unique([employee_id, leave_type, dates], name: "leave_per_employee_date")
|
@@unique([employee_id, leave_type, dates], name: "leave_per_employee_date")
|
||||||
@@index([employee_id, dates])
|
@@index([employee_id, dates])
|
||||||
|
|
@ -110,22 +128,24 @@ model LeaveRequestsArchive {
|
||||||
date DateTime @db.Date
|
date DateTime @db.Date
|
||||||
payable_hours Decimal? @db.Decimal(5, 2)
|
payable_hours Decimal? @db.Decimal(5, 2)
|
||||||
requested_hours Decimal? @db.Decimal(5, 2)
|
requested_hours Decimal? @db.Decimal(5, 2)
|
||||||
leave_request LeaveRequests @relation("LeaveRequestToArchive", fields: [leave_request_id], references: [id])
|
|
||||||
|
leave_request LeaveRequests @relation("LeaveRequestToArchive", fields: [leave_request_id], references: [id])
|
||||||
|
|
||||||
@@index([employee_id, date])
|
@@index([employee_id, date])
|
||||||
@@map("leave_requests_archive")
|
@@map("leave_requests_archive")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Timesheets {
|
model Timesheets {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
employee_id Int
|
employee_id Int
|
||||||
is_approved Boolean @default(false)
|
is_approved Boolean @default(false)
|
||||||
start_date DateTime @db.Date
|
start_date DateTime @db.Date
|
||||||
// hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future
|
// hours_to_bank Decimal? @db.Decimal(5, 2) //will need to be implemented in the future
|
||||||
expense Expenses[] @relation("ExpensesTimesheet")
|
|
||||||
shift Shifts[] @relation("ShiftTimesheet")
|
expense Expenses[] @relation("ExpensesTimesheet")
|
||||||
employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id])
|
shift Shifts[] @relation("ShiftTimesheet")
|
||||||
archive TimesheetsArchive[] @relation("TimesheetsToArchive")
|
employee Employees @relation("TimesheetEmployee", fields: [employee_id], references: [id])
|
||||||
|
archive TimesheetsArchive[] @relation("TimesheetsToArchive")
|
||||||
|
|
||||||
// @@unique([employee_id, start_date], name: "employee_id_start_date")
|
// @@unique([employee_id, start_date], name: "employee_id_start_date")
|
||||||
@@map("timesheets")
|
@@map("timesheets")
|
||||||
|
|
|
||||||
10
src/identity-and-account/contract/contract.controller.ts
Normal file
10
src/identity-and-account/contract/contract.controller.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { Controller } from "@nestjs/common";
|
||||||
|
import { ContractService } from "src/identity-and-account/contract/services/contract.service";
|
||||||
|
|
||||||
|
@Controller()
|
||||||
|
export class ContractController {
|
||||||
|
constructor(private readonly getService: ContractService) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
12
src/identity-and-account/contract/contract.dto.ts
Normal file
12
src/identity-and-account/contract/contract.dto.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Type } from "class-transformer";
|
||||||
|
import { IsInt, IsString } from "class-validator";
|
||||||
|
import { ApplicableOvertime } from "prisma/postgres/generated/prisma/client/postgres/enums";
|
||||||
|
|
||||||
|
export class Contract {
|
||||||
|
@IsInt() employee_id: number;
|
||||||
|
@IsInt() daily_expected_hours: number;
|
||||||
|
@IsString() applicable_overtime: ApplicableOvertime;
|
||||||
|
@Type(() => Number) phone_allocation: number;
|
||||||
|
@Type(() => Number) on_call_allocation: number;
|
||||||
|
@Type(() => Number) weekend_on_call_allocation: number;
|
||||||
|
}
|
||||||
12
src/identity-and-account/contract/contract.module.ts
Normal file
12
src/identity-and-account/contract/contract.module.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Module } from "@nestjs/common";
|
||||||
|
import { ContractController } from "src/identity-and-account/contract/contract.controller";
|
||||||
|
import { ContractService } from "src/identity-and-account/contract/services/contract.service";
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [
|
||||||
|
ContractService,
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
ContractController,
|
||||||
|
]
|
||||||
|
}) export class ContractModule { }
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { Injectable } from "@nestjs/common";
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class ContractService {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user