@creator.co/creatorco-prisma-client 1.0.49 → 1.0.50-alpha-73636ce

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.49",
82
+ "version": "1.0.50-alpha-73636ce",
83
83
  "sideEffects": false,
84
84
  "description": "Prisma client for creatorco Database"
85
85
  }
package/schema.prisma CHANGED
@@ -29,6 +29,7 @@ datasource db {
29
29
 
30
30
  model User {
31
31
  id Int @id @default(autoincrement())
32
+ idmId String? @unique @map("idm_id")
32
33
  role String
33
34
  email String? @unique
34
35
  password String?
@@ -70,6 +71,9 @@ model User {
70
71
  socialProfiles SocialProfile[]
71
72
  rakutenActivity RakutenActivity[]
72
73
  impactRadiusEvents ImpactRadiusEvent[]
74
+ flagsAssigned CreatorFlag[] @relation("UserAssignedFlags") // flags assigned to the user
75
+ flagsCreated CreatorFlag[] @relation("UserCreatedFlags") // flags created by the user
76
+ flagsEdited CreatorFlag[] @relation("UserEditedFlags") // flags edited by the user
73
77
 
74
78
  fullName String? @default(dbgenerated())
75
79
  phoneNormalised String? @default(dbgenerated())
@@ -1487,3 +1491,23 @@ model ShopifySale {
1487
1491
 
1488
1492
  @@map("shopify_sale")
1489
1493
  }
1494
+
1495
+ model CreatorFlag {
1496
+ // Used by admins to flag creators for various reasons
1497
+ id Int @id @default(autoincrement())
1498
+ label String // reason for flagging (e.g. Scammer)
1499
+ comment String? @db.Text // optional comment from admin
1500
+ color String // customizable tag color
1501
+
1502
+ createdAt DateTime @default(now())
1503
+ updatedAt DateTime @updatedAt
1504
+
1505
+ userId Int // user ID of the flagged creator
1506
+ user User @relation("UserAssignedFlags", fields: [userId], references: [id])
1507
+
1508
+ flaggedByUserId Int // user ID of the admin who flagged the creator
1509
+ flaggedByUser User @relation("UserCreatedFlags", fields: [flaggedByUserId], references: [id])
1510
+
1511
+ editedByUserId Int? // user ID of the admin who last edited the flag
1512
+ editedByUser User? @relation("UserEditedFlags", fields: [editedByUserId], references: [id])
1513
+ }
package/wasm.js CHANGED
@@ -121,6 +121,7 @@ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
121
121
 
122
122
  exports.Prisma.UserScalarFieldEnum = {
123
123
  id: 'id',
124
+ idmId: 'idmId',
124
125
  role: 'role',
125
126
  email: 'email',
126
127
  password: 'password',
@@ -998,6 +999,18 @@ exports.Prisma.ShopifySaleScalarFieldEnum = {
998
999
  created: 'created'
999
1000
  };
1000
1001
 
1002
+ exports.Prisma.CreatorFlagScalarFieldEnum = {
1003
+ id: 'id',
1004
+ label: 'label',
1005
+ comment: 'comment',
1006
+ color: 'color',
1007
+ createdAt: 'createdAt',
1008
+ updatedAt: 'updatedAt',
1009
+ userId: 'userId',
1010
+ flaggedByUserId: 'flaggedByUserId',
1011
+ editedByUserId: 'editedByUserId'
1012
+ };
1013
+
1001
1014
  exports.Prisma.SortOrder = {
1002
1015
  asc: 'asc',
1003
1016
  desc: 'desc'
@@ -1029,6 +1042,7 @@ exports.Prisma.NullsOrder = {
1029
1042
  };
1030
1043
 
1031
1044
  exports.Prisma.UserOrderByRelevanceFieldEnum = {
1045
+ idmId: 'idmId',
1032
1046
  role: 'role',
1033
1047
  email: 'email',
1034
1048
  password: 'password',
@@ -1384,6 +1398,12 @@ exports.Prisma.ShopifyProductVariationOrderByRelevanceFieldEnum = {
1384
1398
  exports.Prisma.ShopifyDiscountCodeOrderByRelevanceFieldEnum = {
1385
1399
  code: 'code'
1386
1400
  };
1401
+
1402
+ exports.Prisma.CreatorFlagOrderByRelevanceFieldEnum = {
1403
+ label: 'label',
1404
+ comment: 'comment',
1405
+ color: 'color'
1406
+ };
1387
1407
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1388
1408
  optIn: 'optIn',
1389
1409
  tip: 'tip',
@@ -1478,7 +1498,8 @@ exports.Prisma.ModelName = {
1478
1498
  ShopifyProductVariation: 'ShopifyProductVariation',
1479
1499
  CampaignToShopifyProduct: 'CampaignToShopifyProduct',
1480
1500
  ShopifyDiscountCode: 'ShopifyDiscountCode',
1481
- ShopifySale: 'ShopifySale'
1501
+ ShopifySale: 'ShopifySale',
1502
+ CreatorFlag: 'CreatorFlag'
1482
1503
  };
1483
1504
 
1484
1505
  /**