@creator.co/creatorco-prisma-client 1.0.15-alpha-2abb938 → 1.0.16
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/edge.js +4 -5
- package/index-browser.js +0 -1
- package/index.d.ts +0 -48
- package/index.js +4 -5
- package/package.json +1 -1
- package/schema.prisma +15 -14
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -32,7 +32,7 @@ model User {
|
|
|
32
32
|
email String? @unique
|
|
33
33
|
password String?
|
|
34
34
|
registered DateTime @default(now())
|
|
35
|
-
lastLoginDate DateTime?
|
|
35
|
+
lastLoginDate DateTime?
|
|
36
36
|
firstName String?
|
|
37
37
|
lastName String?
|
|
38
38
|
phone String?
|
|
@@ -338,11 +338,11 @@ model Brand {
|
|
|
338
338
|
sequences Sequence[]
|
|
339
339
|
impactRadiusEvents ImpactRadiusEvent[]
|
|
340
340
|
|
|
341
|
-
|
|
341
|
+
// for agencies
|
|
342
342
|
parentBrandId Int?
|
|
343
343
|
parentBrand Brand? @relation("ChildBrands", fields: [parentBrandId], references: [id])
|
|
344
344
|
childBrands Brand[] @relation("ChildBrands")
|
|
345
|
-
|
|
345
|
+
// generated (for search)
|
|
346
346
|
searchName String? @default(dbgenerated())
|
|
347
347
|
|
|
348
348
|
@@map("brand")
|
|
@@ -446,6 +446,7 @@ model Message {
|
|
|
446
446
|
user User? @relation(fields: [userId], references: [id])
|
|
447
447
|
chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade)
|
|
448
448
|
|
|
449
|
+
@@index([chatId])
|
|
449
450
|
@@map("message")
|
|
450
451
|
}
|
|
451
452
|
|
|
@@ -640,6 +641,7 @@ model OptInStep {
|
|
|
640
641
|
optIn OptIn @relation(fields: [optInId], references: [id], onDelete: Cascade)
|
|
641
642
|
campaignStep CampaignStep @relation(fields: [campaignStepId], references: [id], onDelete: Cascade)
|
|
642
643
|
|
|
644
|
+
@@index([campaignStepId])
|
|
643
645
|
@@map("optinstep")
|
|
644
646
|
}
|
|
645
647
|
|
|
@@ -684,6 +686,8 @@ model OptIn {
|
|
|
684
686
|
chat Chat?
|
|
685
687
|
campaignInvites CampaignInvite[]
|
|
686
688
|
|
|
689
|
+
@@index([userId])
|
|
690
|
+
@@index([campaignId])
|
|
687
691
|
@@map("optin")
|
|
688
692
|
}
|
|
689
693
|
|
|
@@ -706,7 +710,6 @@ model SocialPost {
|
|
|
706
710
|
data Json @default("{}") // DEPRECATED, USE metaData instead, seems to be an error when attempting to remove this field, proabably due to table size
|
|
707
711
|
lastFetched DateTime?
|
|
708
712
|
lastWebhook DateTime?
|
|
709
|
-
isStale Boolean? // TODO: this field is here because prisma doesn't support comparing one column to another, ideally we could just check if lastFetched > lastWebhook but for now we need to control/check this field
|
|
710
713
|
|
|
711
714
|
// BASIC INFO
|
|
712
715
|
posted DateTime?
|
|
@@ -747,13 +750,9 @@ model SocialPost {
|
|
|
747
750
|
socialPostTags SocialPostTag[]
|
|
748
751
|
|
|
749
752
|
@@index(campaignId)
|
|
750
|
-
@@index(isStale)
|
|
751
753
|
@@index(userId)
|
|
752
|
-
@@index(platform)
|
|
753
|
-
@@index(type)
|
|
754
|
-
@@index(format)
|
|
755
754
|
@@index(posted)
|
|
756
|
-
|
|
755
|
+
|
|
757
756
|
@@map("socialpost")
|
|
758
757
|
}
|
|
759
758
|
|
|
@@ -905,7 +904,7 @@ model SavedFile {
|
|
|
905
904
|
|
|
906
905
|
model CampaignInvite {
|
|
907
906
|
id Int @default(autoincrement()) @id
|
|
908
|
-
socialProfileId Int?
|
|
907
|
+
socialProfileId Int?
|
|
909
908
|
brandId Int
|
|
910
909
|
campaignId Int?
|
|
911
910
|
optInId Int? @unique
|
|
@@ -913,14 +912,14 @@ model CampaignInvite {
|
|
|
913
912
|
createdAt DateTime @default(now())
|
|
914
913
|
declineDate DateTime?
|
|
915
914
|
declineReason String? @db.Text
|
|
916
|
-
|
|
915
|
+
|
|
917
916
|
metaData Json? @default("{}")
|
|
918
917
|
|
|
919
918
|
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
920
919
|
campaign Campaign? @relation(fields: [campaignId], references: [id])
|
|
921
920
|
socialProfile SocialProfile? @relation(fields: [socialProfileId], references: [id])
|
|
922
921
|
optIn OptIn? @relation(fields: [optInId], references: [id])
|
|
923
|
-
|
|
922
|
+
|
|
924
923
|
}
|
|
925
924
|
|
|
926
925
|
model CreatorList {
|
|
@@ -954,11 +953,12 @@ model CreatorListItem {
|
|
|
954
953
|
|
|
955
954
|
creatorList CreatorList @relation(fields: [creatorListId], references: [id], onDelete: Cascade)
|
|
956
955
|
socialProfile SocialProfile? @relation(fields: [socialProfileId], references: [id], onDelete: Cascade)
|
|
957
|
-
|
|
956
|
+
|
|
958
957
|
sequenceOutboundEmails SequenceOutboundEmail[]
|
|
959
958
|
sequenceInboundEmails SequenceInboundEmail[]
|
|
960
959
|
sequenceImapCheckpoints SequenceImapCheckpoint[]
|
|
961
960
|
|
|
961
|
+
@@index([creatorListId])
|
|
962
962
|
@@map("creatorlistitem")
|
|
963
963
|
}
|
|
964
964
|
|
|
@@ -1010,7 +1010,7 @@ model EmailTemplate {
|
|
|
1010
1010
|
subject String?
|
|
1011
1011
|
template String @db.Text
|
|
1012
1012
|
brandId Int?
|
|
1013
|
-
|
|
1013
|
+
|
|
1014
1014
|
brand Brand? @relation(fields: [brandId], references: [id])
|
|
1015
1015
|
metaData Json @default("{}") // to save any additional data such as user defined variables
|
|
1016
1016
|
|
|
@@ -1043,6 +1043,7 @@ model ListToSocialPost {
|
|
|
1043
1043
|
list SocialListeningList @relation(fields: [listId], references: [id], onDelete: Cascade)
|
|
1044
1044
|
socialPost SocialPost @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
1045
1045
|
|
|
1046
|
+
@@index([listId, postId])
|
|
1046
1047
|
@@map("listtosocialpost")
|
|
1047
1048
|
}
|
|
1048
1049
|
|