added backend for user management

This commit is contained in:
2025-10-08 17:25:34 +02:00
parent 4e120c8789
commit a6ec865571
6 changed files with 421 additions and 71 deletions

View File

@@ -0,0 +1,39 @@
// backend/src/models/Employee.ts
export interface Employee {
id: string;
email: string;
password: string;
name: string;
role: 'admin' | 'instandhalter' | 'user';
isActive: boolean;
phone?: string;
department?: string;
createdAt: string;
lastLogin?: string;
}
export interface Availability {
id: string;
employeeId: string;
dayOfWeek: number;
startTime: string;
endTime: string;
isAvailable: boolean;
}
export interface CreateEmployeeRequest {
email: string;
password: string;
name: string;
role: 'admin' | 'instandhalter' | 'user';
phone?: string;
department?: string;
}
export interface UpdateEmployeeRequest {
name?: string;
role?: 'admin' | 'instandhalter' | 'user';
isActive?: boolean;
phone?: string;
department?: string;
}