@juliobrim/prisma-shared 1.0.22 → 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,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.22",
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[]
@@ -803,13 +807,15 @@ model Device {
803
807
  }
804
808
 
805
809
  model MachineSensors {
806
- id String @id @default(cuid())
807
- machineId String @unique
808
- sensor1Name String?
809
- sensor2Name String?
810
- sensor1Show Boolean @default(true)
811
- sensor2Show Boolean @default(true)
812
- 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?
813
819
 
814
820
  machine Machine? @relation(fields: [machineId], references: [id])
815
821
  tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)