@juliobrim/prisma-shared 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/migrations/20251007032322_update_product_components/migration.sql +2 -0
- package/migrations/20251007200656_update_production_order_table/migration.sql +4 -0
- package/migrations/20251024125559_add_sensor_multiplier_field/migration.sql +3 -0
- package/migrations/20251024130830_add_units_per_package_field_to_product/migration.sql +4 -0
- package/package.json +1 -1
- package/schema.prisma +17 -8
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -510,6 +510,10 @@ model Product {
|
|
|
510
510
|
description String? // Descrição detalhada do produto
|
|
511
511
|
units String? // Unidade de medida (UN, KG, etc.)
|
|
512
512
|
stock Float? // Quantidade em estoque
|
|
513
|
+
// Campos para controle de embalagem
|
|
514
|
+
unitsPerPackage Float? // Quantidade de unidades por embalagem (ex: 60 cápsulas por pote)
|
|
515
|
+
packageUnit String? // Unidade da embalagem (ex: "pote", "caixa", "frasco")
|
|
516
|
+
contentUnit String? // Unidade do conteúdo (ex: "cápsula", "comprimido", "ml")
|
|
513
517
|
flows Flow[]
|
|
514
518
|
itemsHandlingRegisters ItemsHandlingRegister[]
|
|
515
519
|
node Node[]
|
|
@@ -526,7 +530,7 @@ model Product {
|
|
|
526
530
|
model ProductComponents {
|
|
527
531
|
composedById String
|
|
528
532
|
componentOfId String
|
|
529
|
-
quantity
|
|
533
|
+
quantity Float
|
|
530
534
|
tenantId String?
|
|
531
535
|
componentOf Product @relation("componentOf", fields: [componentOfId], references: [id], onDelete: Cascade)
|
|
532
536
|
composedBy Product @relation("composedBy", fields: [composedById], references: [id], onDelete: Cascade)
|
|
@@ -563,6 +567,9 @@ model ProductionOrder {
|
|
|
563
567
|
flowId String?
|
|
564
568
|
productionOrderIndex Int? @unique
|
|
565
569
|
batchSize Float
|
|
570
|
+
startDate DateTime? @db.Date
|
|
571
|
+
endDate DateTime? @db.Date
|
|
572
|
+
expectedEndDate DateTime? @db.Date
|
|
566
573
|
hasStarted Boolean @default(false)
|
|
567
574
|
isRunning Boolean @default(false)
|
|
568
575
|
isFinished Boolean @default(false)
|
|
@@ -800,13 +807,15 @@ model Device {
|
|
|
800
807
|
}
|
|
801
808
|
|
|
802
809
|
model MachineSensors {
|
|
803
|
-
id
|
|
804
|
-
machineId
|
|
805
|
-
sensor1Name
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
+
id String @id @default(cuid())
|
|
811
|
+
machineId String @unique
|
|
812
|
+
sensor1Name String?
|
|
813
|
+
sensor1Multiplier Float?
|
|
814
|
+
sensor2Name String?
|
|
815
|
+
sensor2Multiplier Float?
|
|
816
|
+
sensor1Show Boolean @default(true)
|
|
817
|
+
sensor2Show Boolean @default(true)
|
|
818
|
+
tenantId String?
|
|
810
819
|
|
|
811
820
|
machine Machine? @relation(fields: [machineId], references: [id])
|
|
812
821
|
tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)
|