@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.
- package/package.json +1 -1
- package/schema.prisma +42 -26
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -235,32 +235,33 @@ model ItemsHandlingRegister {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
model Machine {
|
|
238
|
-
id
|
|
239
|
-
model
|
|
240
|
-
name
|
|
241
|
-
capacity
|
|
242
|
-
clp_index
|
|
243
|
-
acquired_date
|
|
244
|
-
macAddress
|
|
245
|
-
isDeleted
|
|
246
|
-
type
|
|
247
|
-
sectorId
|
|
248
|
-
tenantId
|
|
249
|
-
downtime
|
|
250
|
-
followers
|
|
251
|
-
inputRegisters
|
|
252
|
-
stationFrom
|
|
253
|
-
stationTo
|
|
254
|
-
sector
|
|
255
|
-
tenant
|
|
256
|
-
operationRegister
|
|
257
|
-
productionNodes
|
|
258
|
-
operationResources
|
|
259
|
-
IotMessageRegister
|
|
260
|
-
MachineFormula
|
|
261
|
-
MachineFormulaResult
|
|
262
|
-
device
|
|
263
|
-
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
|