@bslau/hmm_prisma_schema 1.5.4 → 1.6.1
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
CHANGED
package/prisma/migrations/20250626014650_402547_notificationdisplay_user_dismiss/migration.sql
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
BEGIN TRY
|
|
2
|
+
|
|
3
|
+
BEGIN TRAN;
|
|
4
|
+
|
|
5
|
+
-- AlterTable
|
|
6
|
+
ALTER TABLE [dbo].[NotificationDisplay] ADD [isDismissed] BIT NOT NULL CONSTRAINT [NotificationDisplay_isDismissed_df] DEFAULT 0,
|
|
7
|
+
[userId] NVARCHAR(1000);
|
|
8
|
+
|
|
9
|
+
COMMIT TRAN;
|
|
10
|
+
|
|
11
|
+
END TRY
|
|
12
|
+
BEGIN CATCH
|
|
13
|
+
|
|
14
|
+
IF @@TRANCOUNT > 0
|
|
15
|
+
BEGIN
|
|
16
|
+
ROLLBACK TRAN;
|
|
17
|
+
END;
|
|
18
|
+
THROW
|
|
19
|
+
|
|
20
|
+
END CATCH
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
BEGIN TRY
|
|
2
|
+
|
|
3
|
+
BEGIN TRAN;
|
|
4
|
+
|
|
5
|
+
-- AlterTable
|
|
6
|
+
ALTER TABLE [dbo].[Cast] ADD [integrationStage] INT NOT NULL CONSTRAINT [Cast_integrationStage_df] DEFAULT 0;
|
|
7
|
+
|
|
8
|
+
-- AlterTable
|
|
9
|
+
ALTER TABLE [dbo].[HotMetal] ADD [integrationStage] INT NOT NULL CONSTRAINT [HotMetal_integrationStage_df] DEFAULT 0;
|
|
10
|
+
|
|
11
|
+
COMMIT TRAN;
|
|
12
|
+
|
|
13
|
+
END TRY
|
|
14
|
+
BEGIN CATCH
|
|
15
|
+
|
|
16
|
+
IF @@TRANCOUNT > 0
|
|
17
|
+
BEGIN
|
|
18
|
+
ROLLBACK TRAN;
|
|
19
|
+
END;
|
|
20
|
+
THROW
|
|
21
|
+
|
|
22
|
+
END CATCH
|
package/prisma/schema.prisma
CHANGED
|
@@ -60,15 +60,9 @@ model Cast {
|
|
|
60
60
|
codeOpeningTaphole String?
|
|
61
61
|
minutesToOpen Int?
|
|
62
62
|
codeConditionTapholeCh String?
|
|
63
|
-
// [?]
|
|
64
|
-
// codeTypeRun String?
|
|
65
|
-
// [?]
|
|
66
63
|
massIronBeforeSlag Int?
|
|
67
|
-
// [?]
|
|
68
64
|
durationIronBeforeSlag Int?
|
|
69
|
-
// [?]
|
|
70
65
|
massSlagBeforeIron Int?
|
|
71
|
-
// [?]
|
|
72
66
|
durationSlagBeforeIron Int?
|
|
73
67
|
identityClayBox Int?
|
|
74
68
|
codeTypeClay String?
|
|
@@ -78,16 +72,14 @@ model Cast {
|
|
|
78
72
|
preGunUpTemp Float?
|
|
79
73
|
gunupMaxTemp Float?
|
|
80
74
|
gunOnHoleDuration Float?
|
|
81
|
-
// [?] Y/N Or Boolean
|
|
82
75
|
codeKish String?
|
|
83
76
|
codeTypeGunUp Int?
|
|
84
|
-
// [?] Y/N Or Boolean
|
|
85
77
|
codeFceDry String?
|
|
86
|
-
// [?] Y/N Or Boolean
|
|
87
78
|
codeWindCheck String?
|
|
79
|
+
integrationStage Int @default(0)
|
|
80
|
+
hotMetalCollection HotMetal[]
|
|
88
81
|
createdAt DateTime @default(now())
|
|
89
82
|
updatedAt DateTime @updatedAt
|
|
90
|
-
hotMetalCollection HotMetal[]
|
|
91
83
|
}
|
|
92
84
|
|
|
93
85
|
/// **TORPEDO MOVEMENT EVENT**
|
|
@@ -223,32 +215,9 @@ model HotMetal {
|
|
|
223
215
|
desulphurisationComplete Boolean @default(false)
|
|
224
216
|
containsPunchOut Boolean @default(false)
|
|
225
217
|
alPucksAdded Boolean @default(false)
|
|
218
|
+
integrationStage Int @default(0)
|
|
226
219
|
createdAt DateTime @default(now())
|
|
227
220
|
updatedAt DateTime @updatedAt
|
|
228
|
-
// name String?
|
|
229
|
-
// description String?
|
|
230
|
-
// // TODO: confirm default value
|
|
231
|
-
// addAlPucks Boolean @default(false)
|
|
232
|
-
// // [?] Necessary?
|
|
233
|
-
// // castEndDateTime DateTime
|
|
234
|
-
// // [?] One to Many or Many to Many
|
|
235
|
-
// consumerBy Int?
|
|
236
|
-
// desulphurized Boolean @default(false)
|
|
237
|
-
// mass Float?
|
|
238
|
-
// massUnitOfMeasure String?
|
|
239
|
-
// punchOut Boolean?
|
|
240
|
-
// runRate Float?
|
|
241
|
-
// silicon Float?
|
|
242
|
-
// status String?
|
|
243
|
-
// sulphur Float?
|
|
244
|
-
// // [?] Necessary?
|
|
245
|
-
// // Taphole
|
|
246
|
-
// temperature Float?
|
|
247
|
-
// temperatureUnitOfMeasure String?
|
|
248
|
-
// torpedoFillEnd DateTime? @db.DateTimeOffset
|
|
249
|
-
// torpedoFillStart DateTime? @db.DateTimeOffset
|
|
250
|
-
// torpedoFillLevel Int?
|
|
251
|
-
// torpedoes Torpedo[]
|
|
252
221
|
|
|
253
222
|
@@unique(name: "cast_torpedo_id", [castSequence, torpedoId])
|
|
254
223
|
}
|
|
@@ -515,13 +484,18 @@ model NotificationCategory {
|
|
|
515
484
|
/// ***HMM Display Modes for Notifications***
|
|
516
485
|
///
|
|
517
486
|
/// These display modes define how these notifications are displayed to the User
|
|
487
|
+
///
|
|
488
|
+
/// Properties for this model also determine whether the displayed notification
|
|
489
|
+
/// is considered a "System" display for boradcast, or a "User" display only
|
|
490
|
+
/// intended for an individual client to receive.
|
|
518
491
|
model NotificationDisplay {
|
|
519
492
|
id Int @id @default(autoincrement())
|
|
520
493
|
displayModeId Int
|
|
521
494
|
notificationDisplayMode NotificationDisplayMode @relation(fields: [displayModeId], references: [id])
|
|
522
495
|
notification Notification @relation(fields: [notificationId], references: [id], onDelete: NoAction, onUpdate: Cascade)
|
|
523
496
|
notificationId Int
|
|
524
|
-
|
|
497
|
+
userId String?
|
|
498
|
+
isDismissed Boolean @default(false)
|
|
525
499
|
}
|
|
526
500
|
|
|
527
501
|
/// ** HMM Display Mode Definitions **
|