Cliente now picks a jefe mecánico after choosing the service so the calendar shows that specific jefe's availability. Each jefe has its own configurable parallel slot capacity (replacing the global SLOTS_PARALELOS = 5). Admins manage jefes from /admin/jefes; jefes log in to /jefe to see their daily agenda. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,7 @@ model Turno {
|
||||
clienteId String
|
||||
autoId String
|
||||
tipoServicioId String
|
||||
jefeMecanicoId String
|
||||
fechaInicio DateTime
|
||||
fechaFin DateTime
|
||||
kilometros Int
|
||||
@@ -59,6 +60,19 @@ model Turno {
|
||||
cliente Cliente @relation(fields: [clienteId], references: [id])
|
||||
auto Auto @relation(fields: [autoId], references: [id])
|
||||
tipoServicio TipoServicio @relation(fields: [tipoServicioId], references: [id])
|
||||
jefeMecanico JefeMecanico @relation(fields: [jefeMecanicoId], references: [id])
|
||||
}
|
||||
|
||||
model JefeMecanico {
|
||||
id String @id @default(cuid())
|
||||
nombre String
|
||||
email String @unique
|
||||
passwordHash String
|
||||
slotsParalelos Int @default(1)
|
||||
activo Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
turnos Turno[]
|
||||
}
|
||||
|
||||
model HistorialServicio {
|
||||
|
||||
Reference in New Issue
Block a user