@delpa/mt-prisma 0.16.0 → 0.18.0

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-f73e12e7d339a60f8dd14202ee3983ed79ab79910648eceaaddc9c3f78a53733",
2
+ "name": "prisma-client-3106e4922f6be45780e14a76004c8707faf519c3111dff13d1e5d4a9d9c079d0",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -139,6 +139,12 @@ enum EquipmentStatus {
139
139
  MAINTENANCE
140
140
  }
141
141
 
142
+ enum VehicleStatus {
143
+ ACTIVE
144
+ INACTIVE
145
+ MAINTENANCE
146
+ }
147
+
142
148
  enum GpsProviders {
143
149
  BEERMAN
144
150
  GETRAK
@@ -155,11 +161,12 @@ enum GpsProviders {
155
161
  }
156
162
 
157
163
  enum TenderStatus {
164
+ DRAFT
158
165
  OPEN
159
166
  CLOSED
160
167
  AWARDED
168
+ NOT_AWARDED
161
169
  CANCELLED
162
- DRAFT
163
170
  PAUSED
164
171
  }
165
172
 
@@ -175,8 +182,8 @@ enum TripType {
175
182
 
176
183
  enum ApplicationStatus {
177
184
  PENDING
178
- APPROVED
179
- REJECTED
185
+ AWARDED
186
+ NOT_AWARDED
180
187
  WITHDRAWN
181
188
  }
182
189
 
@@ -287,17 +294,22 @@ model Order {
287
294
  id String @id @default(uuid()) @db.Uuid
288
295
  reference String?
289
296
  shipper_id String? @db.Uuid
297
+ company_id String? @db.Uuid
298
+ created_by String? @db.Uuid
290
299
  attachments Json? @default("[]")
291
300
  status RouteStatus @default(PENDING)
292
301
  created_at DateTime @default(now())
293
302
  updated_at DateTime @updatedAt
294
303
 
295
304
  shipper Client? @relation("shipper_client", fields: [shipper_id], references: [id], onDelete: SetNull)
305
+ company Companies? @relation(fields: [company_id], references: [id], onDelete: SetNull)
296
306
  handling_units HandlingUnit[]
297
307
  routes Route[]
298
308
  tenders Tender[]
299
309
 
300
310
  @@index([shipper_id])
311
+ @@index([company_id])
312
+ @@index([created_by])
301
313
  @@map("orders")
302
314
  }
303
315
 
@@ -321,12 +333,14 @@ model Companies {
321
333
  form_responses FormResponse[]
322
334
  forms Form[]
323
335
  tenders Tender[]
336
+ orders Order[]
324
337
  groups Group[]
325
338
  companyLocations CompanyLocation[]
326
339
  regularSuppliers RegularSupplier[]
327
340
  products Product[]
328
341
 
329
- regularSuppliers2 RegularSupplier[] @relation("SupplierCompany")
342
+ regularSuppliers2 RegularSupplier[] @relation("SupplierCompany")
343
+ supplierNotifications TenderNotification[] @relation("SupplierNotifications")
330
344
 
331
345
  @@index([tax_id])
332
346
  @@index([country_code])
@@ -470,6 +484,7 @@ model Vehicle {
470
484
  color VehicleColor?
471
485
  chassis_number String? @unique
472
486
  size VehicleSize? @default(MEDIUM)
487
+ status VehicleStatus @default(ACTIVE)
473
488
  gps_enabled Boolean @default(false)
474
489
  image_url Json? @default("[]")
475
490
  company_id String? @db.Uuid
@@ -900,6 +915,7 @@ model VehicleEquipment {
900
915
 
901
916
  model Tender {
902
917
  id String @id @default(uuid()) @db.Uuid
918
+ code String? @unique @db.VarChar(8)
903
919
  title String
904
920
  description String?
905
921
  status TenderStatus @default(DRAFT)
@@ -927,6 +943,7 @@ model Tender {
927
943
  @@index([user_id])
928
944
  @@index([company_id])
929
945
  @@index([order_id])
946
+ @@index([code])
930
947
  @@map("tenders")
931
948
  }
932
949
 
@@ -976,12 +993,13 @@ model TenderVehicleEquipment {
976
993
  }
977
994
 
978
995
  model TenderChat {
979
- id String @id @default(uuid()) @db.Uuid
980
- tender_id String @db.Uuid
981
- user_sends_id String @db.Uuid
982
- user_receives_id String @db.Uuid
996
+ id String @id @default(uuid()) @db.Uuid
997
+ tender_id String @db.Uuid
998
+ user_sends_id String @db.Uuid
999
+ user_receives_id String @db.Uuid
983
1000
  message String
984
- created_at DateTime @default(now())
1001
+ read_at DateTime?
1002
+ created_at DateTime @default(now())
985
1003
 
986
1004
  tender Tender @relation(fields: [tender_id], references: [id], onDelete: Cascade)
987
1005
  user_sends User @relation("TenderChatSender", fields: [user_sends_id], references: [id], onDelete: Cascade)
@@ -1048,23 +1066,26 @@ model UserGroup {
1048
1066
  }
1049
1067
 
1050
1068
  model TenderNotification {
1051
- id String @id @default(uuid()) @db.Uuid
1052
- tender_id String @db.Uuid
1053
- user_id String? @db.Uuid
1054
- group_id String? @db.Uuid
1055
- whatsapp Boolean @default(false)
1056
- email Boolean @default(false)
1057
- push Boolean @default(false)
1058
- message String
1059
- created_at DateTime @default(now())
1060
-
1061
- tender Tender @relation(fields: [tender_id], references: [id], onDelete: Cascade)
1062
- user User? @relation(fields: [user_id], references: [id], onDelete: Cascade)
1063
- group Group? @relation(fields: [group_id], references: [id], onDelete: Cascade)
1069
+ id String @id @default(uuid()) @db.Uuid
1070
+ tender_id String @db.Uuid
1071
+ user_id String? @db.Uuid
1072
+ group_id String? @db.Uuid
1073
+ supplier_company_id String? @db.Uuid
1074
+ whatsapp Boolean @default(false)
1075
+ email Boolean @default(false)
1076
+ push Boolean @default(false)
1077
+ message String
1078
+ created_at DateTime @default(now())
1079
+
1080
+ tender Tender @relation(fields: [tender_id], references: [id], onDelete: Cascade)
1081
+ user User? @relation(fields: [user_id], references: [id], onDelete: Cascade)
1082
+ group Group? @relation(fields: [group_id], references: [id], onDelete: Cascade)
1083
+ supplierCompany Companies? @relation("SupplierNotifications", fields: [supplier_company_id], references: [id], onDelete: Cascade)
1064
1084
 
1065
1085
  @@index([tender_id])
1066
1086
  @@index([user_id])
1067
1087
  @@index([group_id])
1088
+ @@index([supplier_company_id])
1068
1089
  @@map("tender_notifications")
1069
1090
  }
1070
1091
 
@@ -1127,6 +1148,7 @@ model RegularSupplier {
1127
1148
  id String @id @default(uuid()) @db.Uuid
1128
1149
  company_id String @db.Uuid
1129
1150
  supplier_id String @db.Uuid
1151
+ created_by String? @db.Uuid
1130
1152
  created_at DateTime @default(now())
1131
1153
  updated_at DateTime @updatedAt
1132
1154
 
@@ -1136,5 +1158,6 @@ model RegularSupplier {
1136
1158
  @@unique([company_id, supplier_id])
1137
1159
  @@index([company_id])
1138
1160
  @@index([supplier_id])
1161
+ @@index([created_by])
1139
1162
  @@map("regular_suppliers")
1140
1163
  }