(dc): move types.ts to database module

This commit is contained in:
Marcel Arndt 2024-07-18 13:43:53 +02:00
parent 62eafe44dd
commit fd8b230fa4
3 changed files with 460 additions and 990 deletions

View File

@ -1,535 +0,0 @@
import type { ColumnType } from "kysely";
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
? ColumnType<S, I | undefined, U>
: ColumnType<T, T | undefined, T>;
export type Timestamp = ColumnType<Date, Date | string, Date | string>;
export const TicketState = {
CREATED: "CREATED",
APPROVAL_REQUIRED: "APPROVAL_REQUIRED",
READY: "READY",
DONE: "DONE",
BILLABLE: "BILLABLE",
ARCHIVED: "ARCHIVED"
} as const;
export type TicketState = (typeof TicketState)[keyof typeof TicketState];
export const TicketValidationState = {
CREATED: "CREATED",
USER_INTERACTION_REQUIRED: "USER_INTERACTION_REQUIRED",
TD_UNCERTAIN: "TD_UNCERTAIN",
DOCUMENTS_MISSING: "DOCUMENTS_MISSING",
ARCHIVED: "ARCHIVED"
} as const;
export type TicketValidationState = (typeof TicketValidationState)[keyof typeof TicketValidationState];
export const ApprovalState = {
UNKNOWN: "UNKNOWN",
FREE: "FREE",
REQUIRED: "REQUIRED",
REQUESTED: "REQUESTED",
APPROVED: "APPROVED"
} as const;
export type ApprovalState = (typeof ApprovalState)[keyof typeof ApprovalState];
export const CostTypeVariant = {
NACHTZUSCHLAG: "NACHTZUSCHLAG",
WOCHENENDZUSCHLAG: "WOCHENENDZUSCHLAG",
FEIERTAGSZUSCHLAG: "FEIERTAGSZUSCHLAG",
DESINFEKTIONSZUSCHLAG: "DESINFEKTIONSZUSCHLAG",
KILOMETERZUSCHLAG: "KILOMETERZUSCHLAG",
FAHRZEUGZUSCHLAG: "FAHRZEUGZUSCHLAG",
TSWDIFFERENZIERUNG: "TSWDIFFERENZIERUNG",
GRUNDPREIS: "GRUNDPREIS"
} as const;
export type CostTypeVariant = (typeof CostTypeVariant)[keyof typeof CostTypeVariant];
export type Anomaly = {
id: string;
type: string;
description: string;
groupKey: string;
groupDescription: string;
workedOnBy: string;
sleepTimer: number;
sleepSince: Timestamp | null;
resolvedAt: Timestamp | null;
manuallyResolved: Generated<boolean>;
createdAt: Generated<Timestamp>;
};
export type AttendanceRegistration = {
attendanceRegistrationId: number;
employeeId: number;
personnelNumber: string;
dateTime: Timestamp;
event: string;
};
export type AttendanceRegistrationSource = {
internalId: Generated<string>;
insertedAt: Generated<Timestamp>;
jobId: string;
attendanceRegistrationId: string | null;
employeeId: string | null;
personnelNumber: string | null;
dateTime: string | null;
event: string | null;
};
export type AttendanceRegistrationStaging = {
internalId: Generated<string>;
attendanceRegistrationId: number;
employeeId: number;
dateTime: Timestamp;
event: string;
};
export type AvicennaTenant = {
id: Generated<string>;
healthInsuranceNumber: string;
name: string;
};
export type AvicennaTenantToTariffGroup = {
A: string;
B: string;
};
export type CostType = {
id: Generated<string>;
description: string;
variant: CostTypeVariant;
costAmount: number;
timeRange: string | null;
kmInclusive: number | null;
excludeCarNames: string[];
infectionType: string | null;
tariffId: string | null;
};
export type DyflexisEmployee = {
id: number;
firstname: string;
surname: string;
contractStart: Timestamp;
contractEnd: Timestamp | null;
contractHoursWeek: number;
contractSalaryHour: number;
};
export type Employee = {
id: string;
name: string;
surname: string;
personnelNumber: string | null;
mobile: string | null;
qualification: string | null;
occuptationalHealthExamination: Timestamp | null;
personTransportCertificate: Timestamp | null;
};
export type EmployeeDispoLiveSource = {
internalId: Generated<string>;
insertedAt: Generated<Timestamp>;
jobId: string;
id: string | null;
pScheinAblaufDatum: string | null;
name: string | null;
surname: string | null;
persId: string | null;
importPersId: string | null;
qualifikation: string | null;
};
export type EmployeeDispoLiveStaging = {
internalId: Generated<string>;
id: string;
name: string | null;
surname: string | null;
personnelNumber: string | null;
qualification: string | null;
personTransportCertificate: Timestamp | null;
};
export type EmployeeDyflexisSource = {
internalId: Generated<string>;
insertedAt: Generated<Timestamp>;
jobId: string;
id: string | null;
firstname: string | null;
surname: string | null;
contract_id: string | null;
contract_start: string | null;
contract_end: string | null;
contract_hours_week: string | null;
contract_salary_hour: string | null;
};
export type EmployeeDyflexisStaging = {
internalId: Generated<string>;
id: number;
firstname: string;
surname: string;
contractStart: Timestamp;
contractEnd: Timestamp;
contractHoursWeek: number;
contractSalaryHour: number;
};
export type Patient = {
id: string;
surname: string | null;
name: string | null;
street: string | null;
zip: string | null;
city: string | null;
birthday: Timestamp | null;
healthinsuranceId: string | null;
healthinsurance: string | null;
careDegree: string | null;
disabilityMark1: string | null;
disabilityMark2: string | null;
};
export type PatientSource = {
internalId: Generated<string>;
insertedAt: Generated<Timestamp>;
jobId: string;
id: string | null;
surname: string | null;
name: string | null;
street: string | null;
zip: string | null;
city: string | null;
birthday: string | null;
kkId: string | null;
krankenkasse: string | null;
pflegestufe: string | null;
behinderung1: string | null;
behinderung2: string | null;
};
export type PatientStaging = {
internalId: Generated<string>;
id: string | null;
surname: string | null;
name: string | null;
street: string | null;
zip: string | null;
city: string | null;
birthday: Timestamp | null;
healthinsuranceId: string | null;
healthinsurance: string | null;
careDegree: string | null;
disabilityMark1: string | null;
disabilityMark2: string | null;
};
export type PlannedTime = {
id: string;
userId: string;
firstname: string | null;
surname: string | null;
startDate: Timestamp | null;
endDate: Timestamp | null;
department: string | null;
pause: number;
duration: number;
note: string | null;
};
export type PlannedTimeSource = {
internalId: Generated<string>;
insertedAt: Generated<Timestamp>;
jobId: string;
id: string | null;
user_id: string | null;
firstname: string | null;
surname: string | null;
department_id: string | null;
department_name: string | null;
start_date: string | null;
end_date: string | null;
pauze: string | null;
duration: string | null;
deleted: string | null;
mark: string | null;
};
export type PlannedTimeStaging = {
internalId: Generated<string>;
id: number;
employeeId: number;
firstname: string | null;
surname: string | null;
departmentName: string | null;
startDate: Timestamp;
endDate: Timestamp;
deleted: boolean;
mark: string | null;
};
export type SolutionTarget = {
id: Generated<string>;
name: string;
anomalyId: string | null;
};
export type SolutionTargetStep = {
id: Generated<string>;
description: string;
solutionTargetId: string | null;
};
export type Tariff = {
id: Generated<string>;
validFrom: Timestamp | null;
validTo: Timestamp | null;
tariffGroupId: string | null;
};
export type TariffGroup = {
id: Generated<string>;
description: string;
ordinanceType: string;
};
export type Ticket = {
id: Generated<string>;
currentState: TicketValidationState;
notes: string[];
errors: string[];
isUrgent: Generated<boolean>;
urgency: Generated<Timestamp>;
approvalState: ApprovalState | null;
documentInfo: Generated<unknown | null>;
createdAt: Generated<Timestamp>;
};
export type TicketStateHistory = {
id: Generated<string>;
state: TicketValidationState;
createdAt: Generated<Timestamp>;
ticketId: string;
};
export type Tour = {
id: Generated<string>;
done: boolean;
direction: string;
carName: string | null;
operationId: string;
driverId: string | null;
driverName: string | null;
codriverId: string | null;
codriverName: string | null;
patientId: string | null;
patientName: string | null;
patientSurname: string | null;
patientStreet: string | null;
patientZip: string | null;
patientCity: string | null;
healthInsurance: string | null;
healthInsuranceNumber: string | null;
type: string | null;
category: string | null;
transportType: string | null;
ordinanceType: string | null;
rangeEndDate: Timestamp | null;
startInstitution: string | null;
startStreet: string | null;
startZip: string | null;
startCity: string | null;
targetInstitution: string | null;
targetStreet: string | null;
targetZip: string | null;
targetCity: string | null;
startDate: Timestamp;
check: Generated<number>;
occupiedKm: number | null;
totalKm: number | null;
startBegin: string | null;
startEnd: string | null;
target: string | null;
targetBegin: string | null;
empty: string | null;
hasInfection: Generated<boolean>;
infectionName: string | null;
revenueDispoLive: number | null;
billDate: Timestamp | null;
billNumber: string | null;
revenue: Generated<number>;
consumptionCosts: Generated<number>;
revenueDeviation: Generated<number>;
createdAt: Timestamp | null;
deletedAt: Timestamp | null;
ticketId: string | null;
};
export type TourSource = {
internalId: Generated<string>;
insertedAt: Generated<Timestamp>;
jobId: string;
id: string | null;
check: string | null;
createTime: string | null;
empfangenVonId: string | null;
endgen: string | null;
serienId: string | null;
serienKategorName: string | null;
serienKategorie: string | null;
zadStatus: string | null;
abrDate: string | null;
abrNum: string | null;
abrTime: string | null;
ausrueckZeit: string | null;
startTime: string | null;
startDate: string | null;
date: string | null;
date_iso: string | null;
dauergenehmigung: string | null;
direction: string | null;
distanceValue: string | null;
besetztKm: string | null;
gefahren: string | null;
gesamtPreis: string | null;
infektion: string | null;
itDesc: string | null;
itKrz: string | null;
itName: string | null;
kkId: string | null;
krankenkasse: string | null;
patId: string | null;
patName: string | null;
patSurname: string | null;
patStreet: string | null;
patZip: string | null;
patCity: string | null;
startInstitution: string | null;
startStreet: string | null;
startZip: string | null;
startCity: string | null;
targetInstitution: string | null;
targetStreet: string | null;
targetZip: string | null;
targetCity: string | null;
transportKrz: string | null;
transportName: string | null;
transportart: string | null;
verordnungsId: string | null;
verordnungsName: string | null;
type: string | null;
startBegin: string | null;
startEnd: string | null;
frei: string | null;
ziel: string | null;
zielBegin: string | null;
endTime: string | null;
endDate: string | null;
einsatzNummer: string | null;
carName: string | null;
carNo: string | null;
beifahrerName: string | null;
beifahrer: string | null;
fahrerName: string | null;
fahrer: string | null;
color: string | null;
};
export type TourStaging = {
internalId: Generated<string>;
id: string | null;
done: boolean | null;
direction: string | null;
carName: string | null;
operationId: string | null;
driverId: string | null;
driverName: string | null;
codriverId: string | null;
codriverName: string | null;
patientId: string | null;
patientName: string | null;
patientSurname: string | null;
patientStreet: string | null;
patientZip: string | null;
patientCity: string | null;
healthInsurance: string | null;
healthInsuranceNumber: string | null;
type: string | null;
category: string | null;
transportType: string | null;
ordinanceType: string | null;
rangeEndDate: Timestamp | null;
startInstitution: string | null;
startStreet: string | null;
startZip: string | null;
startCity: string | null;
targetInstitution: string | null;
targetStreet: string | null;
targetZip: string | null;
targetCity: string | null;
startDate: Timestamp | null;
check: Generated<number>;
occupiedKm: number | null;
totalKm: number | null;
startBegin: string | null;
startEnd: string | null;
target: string | null;
targetBegin: string | null;
empty: string | null;
hasInfection: Generated<boolean>;
infectionName: string | null;
revenueDispoLive: number | null;
billDate: Timestamp | null;
billNumber: string | null;
revenue: Generated<number>;
revenueDeviation: Generated<number>;
consumptionCosts: Generated<number>;
createdAt: Timestamp | null;
};
export type Trace = {
id: Generated<string>;
type: string;
entityKey: string;
createdAt: Generated<Timestamp>;
};
export type WorkTime = {
id: string;
userId: string;
firstname: string;
surname: string;
startDate: Timestamp | null;
endDate: Timestamp | null;
department: string | null;
pause: number;
duration: number;
};
export type WorkTimeSource = {
internalId: Generated<string>;
insertedAt: Generated<Timestamp>;
jobId: string;
id: string | null;
user_id: string | null;
firstname: string | null;
surname: string | null;
department_id: string | null;
department_name: string | null;
start_date: string | null;
end_date: string | null;
pauze: string | null;
duration: string | null;
};
export type WorkTimeStaging = {
internalId: Generated<string>;
id: number;
employeeId: number;
firstname: string;
surname: string;
departmentName: string | null;
startDate: Timestamp;
endDate: Timestamp;
};
export type DB = {
_AvicennaTenantToTariffGroup: AvicennaTenantToTariffGroup;
Anomaly: Anomaly;
AttendanceRegistration: AttendanceRegistration;
AttendanceRegistrationSource: AttendanceRegistrationSource;
AttendanceRegistrationStaging: AttendanceRegistrationStaging;
AvicennaTenant: AvicennaTenant;
CostType: CostType;
DyflexisEmployee: DyflexisEmployee;
Employee: Employee;
EmployeeDispoLiveSource: EmployeeDispoLiveSource;
EmployeeDispoLiveStaging: EmployeeDispoLiveStaging;
EmployeeDyflexisSource: EmployeeDyflexisSource;
EmployeeDyflexisStaging: EmployeeDyflexisStaging;
Patient: Patient;
PatientSource: PatientSource;
PatientStaging: PatientStaging;
PlannedTime: PlannedTime;
PlannedTimeSource: PlannedTimeSource;
PlannedTimeStaging: PlannedTimeStaging;
SolutionTarget: SolutionTarget;
SolutionTargetStep: SolutionTargetStep;
Tariff: Tariff;
TariffGroup: TariffGroup;
Ticket: Ticket;
TicketStateHistory: TicketStateHistory;
Tour: Tour;
TourSource: TourSource;
TourStaging: TourStaging;
Trace: Trace;
WorkTime: WorkTime;
WorkTimeSource: WorkTimeSource;
WorkTimeStaging: WorkTimeStaging;
};

View File

@ -13,7 +13,7 @@ generator kysely {
provider = "prisma-kysely" provider = "prisma-kysely"
previewFeatures = ["postgresqlExtensions"] previewFeatures = ["postgresqlExtensions"]
output = "../libs/api/data-access-database/src/lib" output = "../src/core/database"
fileName = "types.ts" fileName = "types.ts"
} }

View File

@ -1,530 +1,535 @@
import type { ColumnType } from 'kysely'; import type { ColumnType } from "kysely";
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U> export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
? ColumnType<S, I | undefined, U> ? ColumnType<S, I | undefined, U>
: ColumnType<T, T | undefined, T>; : ColumnType<T, T | undefined, T>;
export type Timestamp = ColumnType<Date, Date | string, Date | string>; export type Timestamp = ColumnType<Date, Date | string, Date | string>;
export const CostTypeVariant = {
NACHTZUSCHLAG: 'NACHTZUSCHLAG',
WOCHENENDZUSCHLAG: 'WOCHENENDZUSCHLAG',
FEIERTAGSZUSCHLAG: 'FEIERTAGSZUSCHLAG',
DESINFEKTIONSZUSCHLAG: 'DESINFEKTIONSZUSCHLAG',
KILOMETERZUSCHLAG: 'KILOMETERZUSCHLAG',
FAHRZEUGZUSCHLAG: 'FAHRZEUGZUSCHLAG',
TSWDIFFERENZIERUNG: 'TSWDIFFERENZIERUNG',
GRUNDPREIS: 'GRUNDPREIS',
} as const;
export type CostTypeVariant =
(typeof CostTypeVariant)[keyof typeof CostTypeVariant];
export const TicketState = { export const TicketState = {
CREATED: 'CREATED', CREATED: "CREATED",
APPROVAL_REQUIRED: 'APPROVAL_REQUIRED', APPROVAL_REQUIRED: "APPROVAL_REQUIRED",
READY: 'READY', READY: "READY",
DONE: 'DONE', DONE: "DONE",
BILLABLE: 'BILLABLE', BILLABLE: "BILLABLE",
ARCHIVED: 'ARCHIVED', ARCHIVED: "ARCHIVED"
} as const; } as const;
export type TicketState = (typeof TicketState)[keyof typeof TicketState]; export type TicketState = (typeof TicketState)[keyof typeof TicketState];
export const TicketValidationState = { export const TicketValidationState = {
CREATED: 'CREATED', CREATED: "CREATED",
USER_INTERACTION_REQUIRED: 'USER_INTERACTION_REQUIRED', USER_INTERACTION_REQUIRED: "USER_INTERACTION_REQUIRED",
TD_UNCERTAIN: 'TD_UNCERTAIN', TD_UNCERTAIN: "TD_UNCERTAIN",
DOCUMENTS_MISSING: 'DOCUMENTS_MISSING', DOCUMENTS_MISSING: "DOCUMENTS_MISSING",
ARCHIVED: 'ARCHIVED', ARCHIVED: "ARCHIVED"
} as const; } as const;
export type TicketValidationState = export type TicketValidationState = (typeof TicketValidationState)[keyof typeof TicketValidationState];
(typeof TicketValidationState)[keyof typeof TicketValidationState];
export const ApprovalState = { export const ApprovalState = {
UNKNOWN: 'UNKNOWN', UNKNOWN: "UNKNOWN",
FREE: 'FREE', FREE: "FREE",
REQUIRED: 'REQUIRED', REQUIRED: "REQUIRED",
REQUESTED: 'REQUESTED', REQUESTED: "REQUESTED",
APPROVED: 'APPROVED', APPROVED: "APPROVED"
} as const; } as const;
export type ApprovalState = (typeof ApprovalState)[keyof typeof ApprovalState]; export type ApprovalState = (typeof ApprovalState)[keyof typeof ApprovalState];
export const CostTypeVariant = {
NACHTZUSCHLAG: "NACHTZUSCHLAG",
WOCHENENDZUSCHLAG: "WOCHENENDZUSCHLAG",
FEIERTAGSZUSCHLAG: "FEIERTAGSZUSCHLAG",
DESINFEKTIONSZUSCHLAG: "DESINFEKTIONSZUSCHLAG",
KILOMETERZUSCHLAG: "KILOMETERZUSCHLAG",
FAHRZEUGZUSCHLAG: "FAHRZEUGZUSCHLAG",
TSWDIFFERENZIERUNG: "TSWDIFFERENZIERUNG",
GRUNDPREIS: "GRUNDPREIS"
} as const;
export type CostTypeVariant = (typeof CostTypeVariant)[keyof typeof CostTypeVariant];
export type Anomaly = { export type Anomaly = {
id: string; id: string;
type: string; type: string;
description: string; description: string;
groupKey: string; groupKey: string;
groupDescription: string; groupDescription: string;
workedOnBy: string; workedOnBy: string;
sleepTimer: number; sleepTimer: number;
sleepSince: Timestamp | null; sleepSince: Timestamp | null;
resolvedAt: Timestamp | null; resolvedAt: Timestamp | null;
manuallyResolved: Generated<boolean>; manuallyResolved: Generated<boolean>;
createdAt: Generated<Timestamp>; createdAt: Generated<Timestamp>;
}; };
export type AttendanceRegistration = { export type AttendanceRegistration = {
attendanceRegistrationId: number; attendanceRegistrationId: number;
employeeId: number; employeeId: number;
personnelNumber: string; personnelNumber: string;
dateTime: Timestamp; dateTime: Timestamp;
event: string; event: string;
}; };
export type AttendanceRegistrationSource = { export type AttendanceRegistrationSource = {
internalId: Generated<string>; internalId: Generated<string>;
insertedAt: Generated<Timestamp>; insertedAt: Generated<Timestamp>;
jobId: string; jobId: string;
attendanceRegistrationId: string | null; attendanceRegistrationId: string | null;
employeeId: string | null; employeeId: string | null;
personnelNumber: string | null; personnelNumber: string | null;
dateTime: string | null; dateTime: string | null;
event: string | null; event: string | null;
}; };
export type AttendanceRegistrationStaging = { export type AttendanceRegistrationStaging = {
internalId: Generated<string>; internalId: Generated<string>;
attendanceRegistrationId: number; attendanceRegistrationId: number;
employeeId: number; employeeId: number;
dateTime: Timestamp; dateTime: Timestamp;
event: string; event: string;
}; };
export type AvicennaTenant = { export type AvicennaTenant = {
id: Generated<string>; id: Generated<string>;
healthInsuranceNumber: string; healthInsuranceNumber: string;
name: string; name: string;
}; };
export type AvicennaTenantToTariffGroup = { export type AvicennaTenantToTariffGroup = {
A: string; A: string;
B: string; B: string;
}; };
export type CostType = { export type CostType = {
id: Generated<string>; id: Generated<string>;
description: string; description: string;
variant: CostTypeVariant; variant: CostTypeVariant;
costAmount: number; costAmount: number;
timeRange: string | null; timeRange: string | null;
kmInclusive: number | null; kmInclusive: number | null;
excludeCarNames: string[]; excludeCarNames: string[];
infectionType: string | null; infectionType: string | null;
tariffId: string | null; tariffId: string | null;
}; };
export type DyflexisEmployee = { export type DyflexisEmployee = {
id: Generated<string>; id: number;
userId: string; firstname: string;
firstname: string; surname: string;
surname: string; contractStart: Timestamp;
contractStart: string; contractEnd: Timestamp | null;
contractEnd: string | null; contractHoursWeek: number;
contractHoursWeek: number; contractSalaryHour: number;
contractSalaryHour: number;
}; };
export type Employee = { export type Employee = {
id: string; id: string;
name: string; name: string;
surname: string; surname: string;
personnelNumber: string | null; personnelNumber: string | null;
mobile: string | null; mobile: string | null;
qualification: string | null; qualification: string | null;
occuptationalHealthExamination: Timestamp | null; occuptationalHealthExamination: Timestamp | null;
personTransportCertificate: Timestamp | null; personTransportCertificate: Timestamp | null;
}; };
export type EmployeeDispoLiveSource = { export type EmployeeDispoLiveSource = {
internalId: Generated<string>; internalId: Generated<string>;
insertedAt: Generated<Timestamp>; insertedAt: Generated<Timestamp>;
jobId: string; jobId: string;
id: string | null; id: string | null;
pScheinAblaufDatum: string | null; pScheinAblaufDatum: string | null;
name: string | null; name: string | null;
surname: string | null; surname: string | null;
persId: string | null; persId: string | null;
importPersId: string | null; importPersId: string | null;
qualifikation: string | null; qualifikation: string | null;
};
export type EmployeeDispoLiveStaging = {
internalId: Generated<string>;
id: string;
name: string | null;
surname: string | null;
personnelNumber: string | null;
qualification: string | null;
personTransportCertificate: Timestamp | null;
}; };
export type EmployeeDyflexisSource = { export type EmployeeDyflexisSource = {
internalId: Generated<string>; internalId: Generated<string>;
insertedAt: Generated<Timestamp>; insertedAt: Generated<Timestamp>;
jobId: string; jobId: string;
id: string | null; id: string | null;
firstname: string | null; firstname: string | null;
surname: string | null; surname: string | null;
contract_id: string | null; contract_id: string | null;
contract_start: string | null; contract_start: string | null;
contract_end: string | null; contract_end: string | null;
contract_hours_week: string | null; contract_hours_week: string | null;
contract_salary_hour: string | null; contract_salary_hour: string | null;
}; };
export type EmployeeStaging = { export type EmployeeDyflexisStaging = {
internalId: Generated<string>; internalId: Generated<string>;
id: number; id: number;
firstname: string; firstname: string;
surname: string; surname: string;
contractStart: Timestamp; contractStart: Timestamp;
contractEnd: Timestamp; contractEnd: Timestamp;
contractHoursWeek: number; contractHoursWeek: number;
contractSalaryHour: number; contractSalaryHour: number;
personTransportCertificate: Timestamp | null;
qualification: string | null;
}; };
export type Patient = { export type Patient = {
id: string; id: string;
surname: string | null; surname: string | null;
name: string | null; name: string | null;
street: string | null; street: string | null;
zip: string | null; zip: string | null;
city: string | null; city: string | null;
birthday: Timestamp | null; birthday: Timestamp | null;
healthinsuranceId: string | null; healthinsuranceId: string | null;
healthinsurance: string | null; healthinsurance: string | null;
careDegree: string | null; careDegree: string | null;
disabilityMark1: string | null; disabilityMark1: string | null;
disabilityMark2: string | null; disabilityMark2: string | null;
}; };
export type PatientSource = { export type PatientSource = {
internalId: Generated<string>; internalId: Generated<string>;
insertedAt: Generated<Timestamp>; insertedAt: Generated<Timestamp>;
jobId: string; jobId: string;
id: string | null; id: string | null;
surname: string | null; surname: string | null;
name: string | null; name: string | null;
street: string | null; street: string | null;
zip: string | null; zip: string | null;
city: string | null; city: string | null;
birthday: string | null; birthday: string | null;
kkId: string | null; kkId: string | null;
krankenkasse: string | null; krankenkasse: string | null;
pflegestufe: string | null; pflegestufe: string | null;
behinderung1: string | null; behinderung1: string | null;
behinderung2: string | null; behinderung2: string | null;
}; };
export type PatientStaging = { export type PatientStaging = {
internalId: Generated<string>; internalId: Generated<string>;
id: string | null; id: string | null;
surname: string | null; surname: string | null;
name: string | null; name: string | null;
street: string | null; street: string | null;
zip: string | null; zip: string | null;
city: string | null; city: string | null;
birthday: Timestamp | null; birthday: Timestamp | null;
healthinsuranceId: string | null; healthinsuranceId: string | null;
healthinsurance: string | null; healthinsurance: string | null;
careDegree: string | null; careDegree: string | null;
disabilityMark1: string | null; disabilityMark1: string | null;
disabilityMark2: string | null; disabilityMark2: string | null;
}; };
export type PlannedTime = { export type PlannedTime = {
id: string; id: string;
userId: string; userId: string;
firstname: string | null; firstname: string | null;
surname: string | null; surname: string | null;
startDate: Timestamp | null; startDate: Timestamp | null;
endDate: Timestamp | null; endDate: Timestamp | null;
department: string | null; department: string | null;
pause: number; pause: number;
duration: number; duration: number;
note: string | null; note: string | null;
}; };
export type PlannedTimeSource = { export type PlannedTimeSource = {
internalId: Generated<string>; internalId: Generated<string>;
insertedAt: Generated<Timestamp>; insertedAt: Generated<Timestamp>;
jobId: string; jobId: string;
id: string | null; id: string | null;
user_id: string | null; user_id: string | null;
firstname: string | null; firstname: string | null;
surname: string | null; surname: string | null;
department_id: string | null; department_id: string | null;
department_name: string | null; department_name: string | null;
start_date: string | null; start_date: string | null;
end_date: string | null; end_date: string | null;
pauze: string | null; pauze: string | null;
duration: string | null; duration: string | null;
deleted: string | null; deleted: string | null;
mark: string | null; mark: string | null;
}; };
export type PlannedTimeStaging = { export type PlannedTimeStaging = {
internalId: Generated<string>; internalId: Generated<string>;
id: number; id: number;
employeeId: number; employeeId: number;
firstname: string | null; firstname: string | null;
surname: string | null; surname: string | null;
departmentName: string | null; departmentName: string | null;
startDate: Timestamp; startDate: Timestamp;
endDate: Timestamp; endDate: Timestamp;
deleted: boolean; deleted: boolean;
mark: string | null; mark: string | null;
}; };
export type SolutionTarget = { export type SolutionTarget = {
id: Generated<string>; id: Generated<string>;
name: string; name: string;
anomalyId: string | null; anomalyId: string | null;
}; };
export type SolutionTargetStep = { export type SolutionTargetStep = {
id: Generated<string>; id: Generated<string>;
description: string; description: string;
solutionTargetId: string | null; solutionTargetId: string | null;
}; };
export type Tariff = { export type Tariff = {
id: Generated<string>; id: Generated<string>;
validFrom: Timestamp | null; validFrom: Timestamp | null;
validTo: Timestamp | null; validTo: Timestamp | null;
tariffGroupId: string | null; tariffGroupId: string | null;
}; };
export type TariffGroup = { export type TariffGroup = {
id: Generated<string>; id: Generated<string>;
description: string; description: string;
ordinanceType: string; ordinanceType: string;
}; };
export type Ticket = { export type Ticket = {
id: Generated<string>; id: Generated<string>;
currentState: TicketValidationState; currentState: TicketValidationState;
notes: string[]; notes: string[];
errors: string[]; errors: string[];
isUrgent: Generated<boolean>; isUrgent: Generated<boolean>;
urgency: Generated<Timestamp>; urgency: Generated<Timestamp>;
approvalState: ApprovalState | null; approvalState: ApprovalState | null;
documentInfo: Generated<unknown | null>; documentInfo: Generated<unknown | null>;
createdAt: Generated<Timestamp>; createdAt: Generated<Timestamp>;
}; };
export type TicketStateHistory = { export type TicketStateHistory = {
id: Generated<string>; id: Generated<string>;
state: TicketValidationState; state: TicketValidationState;
createdAt: Generated<Timestamp>; createdAt: Generated<Timestamp>;
ticketId: string; ticketId: string;
}; };
export type Tour = { export type Tour = {
id: Generated<string>; id: Generated<string>;
done: boolean; done: boolean;
direction: string; direction: string;
carName: string | null; carName: string | null;
operationId: string; operationId: string;
driverId: string | null; driverId: string | null;
driverName: string | null; driverName: string | null;
codriverId: string | null; codriverId: string | null;
codriverName: string | null; codriverName: string | null;
patientId: string | null; patientId: string | null;
patientName: string | null; patientName: string | null;
patientSurname: string | null; patientSurname: string | null;
patientStreet: string | null; patientStreet: string | null;
patientZip: string | null; patientZip: string | null;
patientCity: string | null; patientCity: string | null;
healthInsurance: string | null; healthInsurance: string | null;
healthInsuranceNumber: string | null; healthInsuranceNumber: string | null;
type: string | null; type: string | null;
category: string | null; category: string | null;
transportType: string | null; transportType: string | null;
ordinanceType: string | null; ordinanceType: string | null;
rangeEndDate: Timestamp | null; rangeEndDate: Timestamp | null;
startInstitution: string | null; startInstitution: string | null;
startStreet: string | null; startStreet: string | null;
startZip: string | null; startZip: string | null;
startCity: string | null; startCity: string | null;
targetInstitution: string | null; targetInstitution: string | null;
targetStreet: string | null; targetStreet: string | null;
targetZip: string | null; targetZip: string | null;
targetCity: string | null; targetCity: string | null;
startDate: Timestamp; startDate: Timestamp;
check: Generated<number>; check: Generated<number>;
occupiedKm: number | null; occupiedKm: number | null;
totalKm: number | null; totalKm: number | null;
startBegin: string | null; startBegin: string | null;
startEnd: string | null; startEnd: string | null;
target: string | null; target: string | null;
targetBegin: string | null; targetBegin: string | null;
empty: string | null; empty: string | null;
hasInfection: Generated<boolean>; hasInfection: Generated<boolean>;
infectionName: string | null; infectionName: string | null;
revenueDispoLive: number | null; revenueDispoLive: number | null;
billDate: Timestamp | null; billDate: Timestamp | null;
billNumber: string | null; billNumber: string | null;
revenue: Generated<number>; revenue: Generated<number>;
consumptionCosts: Generated<number>; consumptionCosts: Generated<number>;
revenueDeviation: Generated<number>; revenueDeviation: Generated<number>;
createdAt: Timestamp | null; createdAt: Timestamp | null;
deletedAt: Timestamp | null; deletedAt: Timestamp | null;
ticketId: string | null; ticketId: string | null;
}; };
export type TourSource = { export type TourSource = {
internalId: Generated<string>; internalId: Generated<string>;
insertedAt: Generated<Timestamp>; insertedAt: Generated<Timestamp>;
jobId: string; jobId: string;
id: string | null; id: string | null;
check: string | null; check: string | null;
createTime: string | null; createTime: string | null;
empfangenVonId: string | null; empfangenVonId: string | null;
endgen: string | null; endgen: string | null;
serienId: string | null; serienId: string | null;
serienKategorName: string | null; serienKategorName: string | null;
serienKategorie: string | null; serienKategorie: string | null;
zadStatus: string | null; zadStatus: string | null;
abrDate: string | null; abrDate: string | null;
abrNum: string | null; abrNum: string | null;
abrTime: string | null; abrTime: string | null;
ausrueckZeit: string | null; ausrueckZeit: string | null;
startTime: string | null; startTime: string | null;
startDate: string | null; startDate: string | null;
date: string | null; date: string | null;
date_iso: string | null; date_iso: string | null;
dauergenehmigung: string | null; dauergenehmigung: string | null;
direction: string | null; direction: string | null;
distanceValue: string | null; distanceValue: string | null;
besetztKm: string | null; besetztKm: string | null;
gefahren: string | null; gefahren: string | null;
gesamtPreis: string | null; gesamtPreis: string | null;
infektion: string | null; infektion: string | null;
itDesc: string | null; itDesc: string | null;
itKrz: string | null; itKrz: string | null;
itName: string | null; itName: string | null;
kkId: string | null; kkId: string | null;
krankenkasse: string | null; krankenkasse: string | null;
patId: string | null; patId: string | null;
patName: string | null; patName: string | null;
patSurname: string | null; patSurname: string | null;
patStreet: string | null; patStreet: string | null;
patZip: string | null; patZip: string | null;
patCity: string | null; patCity: string | null;
startInstitution: string | null; startInstitution: string | null;
startStreet: string | null; startStreet: string | null;
startZip: string | null; startZip: string | null;
startCity: string | null; startCity: string | null;
targetInstitution: string | null; targetInstitution: string | null;
targetStreet: string | null; targetStreet: string | null;
targetZip: string | null; targetZip: string | null;
targetCity: string | null; targetCity: string | null;
transportKrz: string | null; transportKrz: string | null;
transportName: string | null; transportName: string | null;
transportart: string | null; transportart: string | null;
verordnungsId: string | null; verordnungsId: string | null;
verordnungsName: string | null; verordnungsName: string | null;
type: string | null; type: string | null;
startBegin: string | null; startBegin: string | null;
startEnd: string | null; startEnd: string | null;
frei: string | null; frei: string | null;
ziel: string | null; ziel: string | null;
zielBegin: string | null; zielBegin: string | null;
endTime: string | null; endTime: string | null;
endDate: string | null; endDate: string | null;
einsatzNummer: string | null; einsatzNummer: string | null;
carName: string | null; carName: string | null;
carNo: string | null; carNo: string | null;
beifahrerName: string | null; beifahrerName: string | null;
beifahrer: string | null; beifahrer: string | null;
fahrerName: string | null; fahrerName: string | null;
fahrer: string | null; fahrer: string | null;
color: string | null; color: string | null;
}; };
export type TourStaging = { export type TourStaging = {
internalId: Generated<string>; internalId: Generated<string>;
id: string | null; id: string | null;
done: boolean | null; done: boolean | null;
direction: string | null; direction: string | null;
carName: string | null; carName: string | null;
operationId: string | null; operationId: string | null;
driverId: string | null; driverId: string | null;
driverName: string | null; driverName: string | null;
codriverId: string | null; codriverId: string | null;
codriverName: string | null; codriverName: string | null;
patientId: string | null; patientId: string | null;
patientName: string | null; patientName: string | null;
patientSurname: string | null; patientSurname: string | null;
patientStreet: string | null; patientStreet: string | null;
patientZip: string | null; patientZip: string | null;
patientCity: string | null; patientCity: string | null;
healthInsurance: string | null; healthInsurance: string | null;
healthInsuranceNumber: string | null; healthInsuranceNumber: string | null;
type: string | null; type: string | null;
category: string | null; category: string | null;
transportType: string | null; transportType: string | null;
ordinanceType: string | null; ordinanceType: string | null;
rangeEndDate: Timestamp | null; rangeEndDate: Timestamp | null;
startInstitution: string | null; startInstitution: string | null;
startStreet: string | null; startStreet: string | null;
startZip: string | null; startZip: string | null;
startCity: string | null; startCity: string | null;
targetInstitution: string | null; targetInstitution: string | null;
targetStreet: string | null; targetStreet: string | null;
targetZip: string | null; targetZip: string | null;
targetCity: string | null; targetCity: string | null;
startDate: Timestamp | null; startDate: Timestamp | null;
check: Generated<number>; check: Generated<number>;
occupiedKm: number | null; occupiedKm: number | null;
totalKm: number | null; totalKm: number | null;
startBegin: string | null; startBegin: string | null;
startEnd: string | null; startEnd: string | null;
target: string | null; target: string | null;
targetBegin: string | null; targetBegin: string | null;
empty: string | null; empty: string | null;
hasInfection: Generated<boolean>; hasInfection: Generated<boolean>;
infectionName: string | null; infectionName: string | null;
revenueDispoLive: number | null; revenueDispoLive: number | null;
billDate: Timestamp | null; billDate: Timestamp | null;
billNumber: string | null; billNumber: string | null;
revenue: Generated<number>; revenue: Generated<number>;
revenueDeviation: Generated<number>; revenueDeviation: Generated<number>;
consumptionCosts: Generated<number>; consumptionCosts: Generated<number>;
createdAt: Timestamp | null; createdAt: Timestamp | null;
}; };
export type Trace = { export type Trace = {
id: Generated<string>; id: Generated<string>;
type: string; type: string;
entityKey: string; entityKey: string;
createdAt: Generated<Timestamp>; createdAt: Generated<Timestamp>;
}; };
export type WorkTime = { export type WorkTime = {
id: string; id: string;
userId: string; userId: string;
firstname: string; firstname: string;
surname: string; surname: string;
startDate: Timestamp | null; startDate: Timestamp | null;
endDate: Timestamp | null; endDate: Timestamp | null;
department: string | null; department: string | null;
pause: number; pause: number;
duration: number; duration: number;
}; };
export type WorkTimeSource = { export type WorkTimeSource = {
internalId: Generated<string>; internalId: Generated<string>;
insertedAt: Generated<Timestamp>; insertedAt: Generated<Timestamp>;
jobId: string; jobId: string;
id: string | null; id: string | null;
user_id: string | null; user_id: string | null;
firstname: string | null; firstname: string | null;
surname: string | null; surname: string | null;
department_id: string | null; department_id: string | null;
department_name: string | null; department_name: string | null;
start_date: string | null; start_date: string | null;
end_date: string | null; end_date: string | null;
pauze: string | null; pauze: string | null;
duration: string | null; duration: string | null;
}; };
export type WorkTimeStaging = { export type WorkTimeStaging = {
internalId: Generated<string>; internalId: Generated<string>;
id: number; id: number;
employeeId: number; employeeId: number;
firstname: string; firstname: string;
surname: string; surname: string;
departmentName: string | null; departmentName: string | null;
startDate: Timestamp; startDate: Timestamp;
endDate: Timestamp; endDate: Timestamp;
}; };
export type DB = { export type DB = {
_AvicennaTenantToTariffGroup: AvicennaTenantToTariffGroup; _AvicennaTenantToTariffGroup: AvicennaTenantToTariffGroup;
Anomaly: Anomaly; Anomaly: Anomaly;
AttendanceRegistration: AttendanceRegistration; AttendanceRegistration: AttendanceRegistration;
AttendanceRegistrationSource: AttendanceRegistrationSource; AttendanceRegistrationSource: AttendanceRegistrationSource;
AttendanceRegistrationStaging: AttendanceRegistrationStaging; AttendanceRegistrationStaging: AttendanceRegistrationStaging;
AvicennaTenant: AvicennaTenant; AvicennaTenant: AvicennaTenant;
CostType: CostType; CostType: CostType;
DyflexisEmployee: DyflexisEmployee; DyflexisEmployee: DyflexisEmployee;
Employee: Employee; Employee: Employee;
EmployeeDispoLiveSource: EmployeeDispoLiveSource; EmployeeDispoLiveSource: EmployeeDispoLiveSource;
EmployeeDyflexisSource: EmployeeDyflexisSource; EmployeeDispoLiveStaging: EmployeeDispoLiveStaging;
EmployeeStaging: EmployeeStaging; EmployeeDyflexisSource: EmployeeDyflexisSource;
Patient: Patient; EmployeeDyflexisStaging: EmployeeDyflexisStaging;
PatientSource: PatientSource; Patient: Patient;
PatientStaging: PatientStaging; PatientSource: PatientSource;
PlannedTime: PlannedTime; PatientStaging: PatientStaging;
PlannedTimeSource: PlannedTimeSource; PlannedTime: PlannedTime;
PlannedTimeStaging: PlannedTimeStaging; PlannedTimeSource: PlannedTimeSource;
SolutionTarget: SolutionTarget; PlannedTimeStaging: PlannedTimeStaging;
SolutionTargetStep: SolutionTargetStep; SolutionTarget: SolutionTarget;
Tariff: Tariff; SolutionTargetStep: SolutionTargetStep;
TariffGroup: TariffGroup; Tariff: Tariff;
Ticket: Ticket; TariffGroup: TariffGroup;
TicketStateHistory: TicketStateHistory; Ticket: Ticket;
Tour: Tour; TicketStateHistory: TicketStateHistory;
TourSource: TourSource; Tour: Tour;
TourStaging: TourStaging; TourSource: TourSource;
Trace: Trace; TourStaging: TourStaging;
WorkTime: WorkTime; Trace: Trace;
WorkTimeSource: WorkTimeSource; WorkTime: WorkTime;
WorkTimeStaging: WorkTimeStaging; WorkTimeSource: WorkTimeSource;
WorkTimeStaging: WorkTimeStaging;
}; };