@creator.co/creatorco-prisma-client 1.0.53 → 1.0.55-alpha-2ec6ad0

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.53",
82
+ "version": "1.0.55-alpha-2ec6ad0",
83
83
  "sideEffects": false,
84
84
  "description": "Prisma client for creatorco Database"
85
85
  }
package/schema.prisma CHANGED
@@ -19,7 +19,7 @@ generator client {
19
19
  output = "../../client/creatorco/client"
20
20
  previewFeatures = ["fullTextIndex", "fullTextSearch"]
21
21
  // macos (arm or x86), native, linux arm64 ssl3.x, windows
22
- binaryTargets = ["native", "darwin", "darwin-arm64", "linux-arm64-openssl-3.0.x", "windows", "debian-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x", "linux-arm64-openssl-1.0.x"]
22
+ binaryTargets = ["native", "darwin", "darwin-arm64", "linux-arm64-openssl-3.0.x", "windows", "debian-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x", "linux-arm64-openssl-1.0.x", "linux-musl-arm64-openssl-1.1.x"]
23
23
  }
24
24
 
25
25
  datasource db {
@@ -532,6 +532,7 @@ model Campaign {
532
532
  campaignInvites CampaignInvite[]
533
533
  campaignToShopifyProducts CampaignToShopifyProduct[]
534
534
  campaignToBrandAffiliateLinks CampaignToBrandAffiliateLink[]
535
+ linkedPosts CampaignToSocialPost[]
535
536
 
536
537
  brandId Int
537
538
  brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
@@ -876,9 +877,10 @@ model SocialPost {
876
877
  userId Int?
877
878
  campaignId Int?
878
879
 
879
- user User? @relation(fields: [userId], references: [id])
880
- campaign Campaign? @relation(fields: [campaignId], references: [id])
881
- lists ListToSocialPost[]
880
+ user User? @relation(fields: [userId], references: [id])
881
+ campaign Campaign? @relation(fields: [campaignId], references: [id])
882
+ lists ListToSocialPost[]
883
+ campaigns CampaignToSocialPost[]
882
884
 
883
885
  @@unique([platform, externalId])
884
886
  @@index(campaignId)
@@ -887,6 +889,28 @@ model SocialPost {
887
889
  @@map("socialpost")
888
890
  }
889
891
 
892
+ enum CampaignToSocialPostStatus {
893
+ pending
894
+ approved
895
+ declined
896
+ }
897
+
898
+ model CampaignToSocialPost {
899
+ campaignId Int @map("campaign_id")
900
+ socialPostId Int @map("social_post_id")
901
+
902
+ status CampaignToSocialPostStatus @default(pending)
903
+ created DateTime @default(now())
904
+ metaData Json @default("{}")
905
+
906
+ campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
907
+ socialPost SocialPost @relation(fields: [socialPostId], references: [id], onDelete: Cascade)
908
+
909
+ @@id([campaignId, socialPostId])
910
+ @@index(status)
911
+ @@map("campaign_to_social_post")
912
+ }
913
+
890
914
  // Table for storing archived socialposts from before external_id was implemented
891
915
  model ArchivedSocialPost {
892
916
  id Int @id @default(autoincrement())
package/wasm.js CHANGED
@@ -621,6 +621,14 @@ exports.Prisma.SocialPostScalarFieldEnum = {
621
621
  campaignId: 'campaignId'
622
622
  };
623
623
 
624
+ exports.Prisma.CampaignToSocialPostScalarFieldEnum = {
625
+ campaignId: 'campaignId',
626
+ socialPostId: 'socialPostId',
627
+ status: 'status',
628
+ created: 'created',
629
+ metaData: 'metaData'
630
+ };
631
+
624
632
  exports.Prisma.ArchivedSocialPostScalarFieldEnum = {
625
633
  id: 'id',
626
634
  phylloId: 'phylloId',
@@ -1434,6 +1442,12 @@ exports.trolleyPaymentStatus = exports.$Enums.trolleyPaymentStatus = {
1434
1442
  returned: 'returned'
1435
1443
  };
1436
1444
 
1445
+ exports.CampaignToSocialPostStatus = exports.$Enums.CampaignToSocialPostStatus = {
1446
+ pending: 'pending',
1447
+ approved: 'approved',
1448
+ declined: 'declined'
1449
+ };
1450
+
1437
1451
  exports.ShopifyStoreSyncStatus = exports.$Enums.ShopifyStoreSyncStatus = {
1438
1452
  syncing: 'syncing',
1439
1453
  synced: 'synced',
@@ -1479,6 +1493,7 @@ exports.Prisma.ModelName = {
1479
1493
  TrolleyPayment: 'TrolleyPayment',
1480
1494
  OptInVariable: 'OptInVariable',
1481
1495
  SocialPost: 'SocialPost',
1496
+ CampaignToSocialPost: 'CampaignToSocialPost',
1482
1497
  ArchivedSocialPost: 'ArchivedSocialPost',
1483
1498
  Image: 'Image',
1484
1499
  BrandImage: 'BrandImage',