@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.
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "public"."product_components" ALTER COLUMN "quantity" SET DATA TYPE DOUBLE PRECISION;
@@ -0,0 +1,4 @@
1
+ -- AlterTable
2
+ ALTER TABLE "public"."production_order" ADD COLUMN "endDate" DATE,
3
+ ADD COLUMN "expectedEndDate" DATE,
4
+ ADD COLUMN "startDate" DATE;
@@ -0,0 +1,3 @@
1
+ -- AlterTable
2
+ ALTER TABLE "public"."machine_sensors" ADD COLUMN "sensor1Multiplier" DOUBLE PRECISION,
3
+ ADD COLUMN "sensor2Multiplier" DOUBLE PRECISION;
@@ -0,0 +1,4 @@
1
+ -- AlterTable
2
+ ALTER TABLE "public"."product" ADD COLUMN "contentUnit" TEXT,
3
+ ADD COLUMN "packageUnit" TEXT,
4
+ ADD COLUMN "unitsPerPackage" DOUBLE PRECISION;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juliobrim/prisma-shared",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Schema Prisma compartilhado entre projetos Sabcon",
5
5
  "main": "schema.prisma",
6
6
  "files": [
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 Int
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 String @id @default(cuid())
804
- machineId String @unique
805
- sensor1Name String?
806
- sensor2Name String?
807
- sensor1Show Boolean @default(true)
808
- sensor2Show Boolean @default(true)
809
- tenantId String?
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)