pre-bemis

This commit is contained in:
Marcelo
2026-04-22 05:04:19 +00:00
parent ac1a7900c8
commit 80d27f83b6
91 changed files with 11769 additions and 820 deletions

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "org_settings" ADD COLUMN "shift_schedule_overrides_json" JSONB;

View File

@@ -146,6 +146,7 @@ model Machine {
@@unique([orgId, name])
@@index([orgId])
@@index([orgId, createdAt])
}
model MachineHeartbeat {
@@ -166,6 +167,7 @@ model MachineHeartbeat {
machine Machine @relation(fields: [machineId], references: [id], onDelete: Cascade)
@@index([orgId, machineId, ts])
@@index([orgId, machineId, tsServer])
}
model MachineKpiSnapshot {
@@ -310,6 +312,7 @@ model OrgSettings {
timezone String @default("UTC")
shiftChangeCompMin Int @default(10) @map("shift_change_comp_min")
lunchBreakMin Int @default(30) @map("lunch_break_min")
shiftScheduleOverridesJson Json? @map("shift_schedule_overrides_json")
stoppageMultiplier Float @default(1.5) @map("stoppage_multiplier")
oeeAlertThresholdPct Float @default(90) @map("oee_alert_threshold_pct")
macroStoppageMultiplier Float @default(5) @map("macro_stoppage_multiplier")