@juliobrim/prisma-shared 1.0.25 → 1.0.26

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/schema.prisma +42 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juliobrim/prisma-shared",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Schema Prisma compartilhado entre projetos Sabcon",
5
5
  "main": "schema.prisma",
6
6
  "files": [
package/schema.prisma CHANGED
@@ -235,32 +235,33 @@ model ItemsHandlingRegister {
235
235
  }
236
236
 
237
237
  model Machine {
238
- id String @id @default(cuid())
239
- model String? @db.VarChar(100)
240
- name String @unique @db.VarChar(100)
241
- capacity Float? @db.Real
242
- clp_index String?
243
- acquired_date DateTime? @db.Date
244
- macAddress String? @db.VarChar(17)
245
- isDeleted Boolean @default(false)
246
- type MachineType? @default(discrete)
247
- sectorId String?
248
- tenantId String?
249
- downtime DowntimeEvent[]
250
- followers Follower[]
251
- inputRegisters InputRegister[]
252
- stationFrom ItemsHandlingRegister[] @relation("stationFrom")
253
- stationTo ItemsHandlingRegister[] @relation("stationTo")
254
- sector Sector? @relation(fields: [sectorId], references: [id])
255
- tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)
256
- operationRegister OperationRegister[]
257
- productionNodes ProductionNode?
258
- operationResources Resource[] @relation("MachineToResource")
259
- IotMessageRegister IotMessageRegister[]
260
- MachineFormula MachineFormula[]
261
- MachineFormulaResult MachineFormulaResult[]
262
- device Device?
263
- machineSensors MachineSensors?
238
+ id String @id @default(cuid())
239
+ model String? @db.VarChar(100)
240
+ name String @unique @db.VarChar(100)
241
+ capacity Float? @db.Real
242
+ clp_index String?
243
+ acquired_date DateTime? @db.Date
244
+ macAddress String? @db.VarChar(17)
245
+ isDeleted Boolean @default(false)
246
+ type MachineType? @default(discrete)
247
+ sectorId String?
248
+ tenantId String?
249
+ downtime DowntimeEvent[]
250
+ followers Follower[]
251
+ inputRegisters InputRegister[]
252
+ stationFrom ItemsHandlingRegister[] @relation("stationFrom")
253
+ stationTo ItemsHandlingRegister[] @relation("stationTo")
254
+ sector Sector? @relation(fields: [sectorId], references: [id])
255
+ tenant Tenant? @relation(fields: [tenantId], references: [id], onDelete: Cascade)
256
+ operationRegister OperationRegister[]
257
+ productionNodes ProductionNode?
258
+ operationResources Resource[] @relation("MachineToResource")
259
+ IotMessageRegister IotMessageRegister[]
260
+ MachineFormula MachineFormula[]
261
+ MachineFormulaResult MachineFormulaResult[]
262
+ device Device?
263
+ machineSensors MachineSensors?
264
+ MachineProcessingScript MachineProcessingScript?
264
265
 
265
266
  @@map("machine")
266
267
  }
@@ -829,6 +830,21 @@ model MachineSensors {
829
830
  @@map("machine_sensors")
830
831
  }
831
832
 
833
+ model MachineProcessingScript {
834
+ id String @id @default(cuid())
835
+ machineId String @unique
836
+ script String
837
+ isActive Boolean @default(true)
838
+ version Int @default(1)
839
+ createdAt DateTime @default(now())
840
+ updatedAt DateTime @updatedAt
841
+ createdBy String?
842
+
843
+ machine Machine @relation(fields: [machineId], references: [id])
844
+
845
+ @@map("machine_processing_script")
846
+ }
847
+
832
848
  model DeviceOperator {
833
849
  id String @id @default(cuid())
834
850
  deviceId String