@creator.co/creatorco-prisma-client 1.0.59 → 1.0.60

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
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "./*": "./*"
81
81
  },
82
- "version": "1.0.59",
82
+ "version": "1.0.60",
83
83
  "sideEffects": false,
84
84
  "description": "Prisma client for creatorco Database"
85
85
  }
package/schema.prisma CHANGED
@@ -76,6 +76,8 @@ model User {
76
76
  flagsCreated CreatorFlag[] @relation("UserCreatedFlags") // flags created by the user
77
77
  flagsEdited CreatorFlag[] @relation("UserEditedFlags") // flags edited by the user
78
78
  affiliatePayoutBatches AffiliatePayoutBatch[]
79
+ contractsCreated BrandContract[] @relation("UserCreatedContract") // contracts created by the user
80
+ contractsEdited BrandContract[] @relation("UserEditedContract") // contracts edited by the user
79
81
 
80
82
  fullName String? @default(dbgenerated())
81
83
  phoneNormalised String? @default(dbgenerated())
@@ -354,6 +356,7 @@ model Brand {
354
356
  cjEvents CjEvent[]
355
357
  shopifyStores ShopifyStore[]
356
358
  productLists ProductList[]
359
+ brandContracts BrandContract[]
357
360
 
358
361
  // for agencies
359
362
  parentBrandId Int?
@@ -1599,3 +1602,28 @@ model CreatorFlag {
1599
1602
  editedByUserId Int? // user ID of the admin who last edited the flag
1600
1603
  editedByUser User? @relation("UserEditedFlags", fields: [editedByUserId], references: [id])
1601
1604
  }
1605
+
1606
+ model BrandContract {
1607
+ id Int @id @default(autoincrement())
1608
+ brandId Int @map("brand_id")
1609
+ brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
1610
+
1611
+ createdAt DateTime @default(now()) @map("created_at")
1612
+ updatedAt DateTime @updatedAt @map("updated_at")
1613
+
1614
+ file String?
1615
+ contractType String @map("contract_type")
1616
+ startDate DateTime @map("start_date")
1617
+ endDate DateTime? @map("end_date")
1618
+
1619
+ archivedAt DateTime? @map("archived_at")
1620
+
1621
+ createdByUserId Int @map("created_by_user_id")
1622
+ createdByUser User @relation("UserCreatedContract", fields: [createdByUserId], references: [id])
1623
+
1624
+ editedByUserId Int? @map("edited_by_user_id")
1625
+ editedByUser User? @relation("UserEditedContract", fields: [editedByUserId], references: [id])
1626
+
1627
+ @@index([brandId])
1628
+ @@map("brand_contract")
1629
+ }
package/wasm.js CHANGED
@@ -1058,6 +1058,20 @@ exports.Prisma.CreatorFlagScalarFieldEnum = {
1058
1058
  editedByUserId: 'editedByUserId'
1059
1059
  };
1060
1060
 
1061
+ exports.Prisma.BrandContractScalarFieldEnum = {
1062
+ id: 'id',
1063
+ brandId: 'brandId',
1064
+ createdAt: 'createdAt',
1065
+ updatedAt: 'updatedAt',
1066
+ file: 'file',
1067
+ contractType: 'contractType',
1068
+ startDate: 'startDate',
1069
+ endDate: 'endDate',
1070
+ archivedAt: 'archivedAt',
1071
+ createdByUserId: 'createdByUserId',
1072
+ editedByUserId: 'editedByUserId'
1073
+ };
1074
+
1061
1075
  exports.Prisma.SortOrder = {
1062
1076
  asc: 'asc',
1063
1077
  desc: 'desc'
@@ -1468,6 +1482,11 @@ exports.Prisma.CreatorFlagOrderByRelevanceFieldEnum = {
1468
1482
  comment: 'comment',
1469
1483
  color: 'color'
1470
1484
  };
1485
+
1486
+ exports.Prisma.BrandContractOrderByRelevanceFieldEnum = {
1487
+ file: 'file',
1488
+ contractType: 'contractType'
1489
+ };
1471
1490
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1472
1491
  optIn: 'optIn',
1473
1492
  tip: 'tip',
@@ -1573,7 +1592,8 @@ exports.Prisma.ModelName = {
1573
1592
  CampaignToShopifyProduct: 'CampaignToShopifyProduct',
1574
1593
  ShopifyDiscountCode: 'ShopifyDiscountCode',
1575
1594
  ShopifySale: 'ShopifySale',
1576
- CreatorFlag: 'CreatorFlag'
1595
+ CreatorFlag: 'CreatorFlag',
1596
+ BrandContract: 'BrandContract'
1577
1597
  };
1578
1598
 
1579
1599
  /**