@levrbet/shared 0.4.34 → 0.4.35

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levrbet/shared",
3
- "version": "0.4.34",
3
+ "version": "0.4.35",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -534,3 +534,49 @@ model GreylistEntry {
534
534
  @@index([status])
535
535
  @@index([walletAddress, status])
536
536
  }
537
+
538
+ enum OrderDirection {
539
+ BID
540
+ ASK
541
+ }
542
+
543
+ enum TerminalOrderStatus {
544
+ FILLED
545
+ CANCELLED
546
+ EXPIRED
547
+ }
548
+
549
+ model ClosedOrder {
550
+ objectId String @id @default(auto()) @map("_id") @db.ObjectId
551
+ orderId String @unique
552
+ chainId Int
553
+ gameId Int
554
+ gameMarketId String
555
+ levrMarketId String
556
+ side Int
557
+ direction OrderDirection
558
+ type String
559
+ status TerminalOrderStatus
560
+ price Int
561
+ ethAddress String
562
+ cancelReason String?
563
+
564
+ // BID-specific
565
+ budget String?
566
+ filledBudget String?
567
+ leverage Float?
568
+
569
+ // ASK-specific
570
+ volume String?
571
+ filledVolume String?
572
+ positionId String?
573
+
574
+ placedAt DateTime
575
+ resolvedAt DateTime @default(now())
576
+ createdAt DateTime @default(now())
577
+ updatedAt DateTime @updatedAt
578
+
579
+ @@index([ethAddress])
580
+ @@index([ethAddress, status])
581
+ @@index([chainId, gameMarketId])
582
+ }