CampaignPosts table
The CampaignPosts table in the Shipfolio schema has 27 columns, keyed by Id, with 3 foreign keys to CreatorCampaigns, CampaignCreators and SocialConnections. 2 columns in CampaignPostReadings and CreatorEarnings reference it.
Columns (27)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key | |
| CampaignId | uuid | not null, references CreatorCampaigns.Id | |
| CampaignCreatorId | uuid | not null, references CampaignCreators.Id | |
| UserId | uuid | not null | |
| SocialConnectionId | uuid | references SocialConnections.Id | |
| Platform | varchar(50) | not null | |
| ExternalVideoId | varchar(100) | not null | |
| Url | varchar(500) | not null | |
| Title | varchar(300) | ||
| Caption | varchar(5000) | ||
| ThumbnailUrl | varchar(1000) | ||
| PostedAt | timestamptz | not null | |
| AcceptedAt | timestamptz | not null | |
| CountsUntil | timestamptz | not null | |
| Status | varchar(50) | not null | |
| HoldReason | varchar(50) | ||
| HeldAt | timestamptz | ||
| Disclosure | varchar(50) | ||
| LastViews | bigint | not null | |
| CountedViews | bigint | not null | |
| HeldViews | bigint | not null | |
| EarnedCents | bigint | not null | |
| LastReadAt | timestamptz | ||
| ReadFailures | integer | not null | |
| AdminNote | varchar(500) | ||
| CreatedAt | timestamptz | not null | |
| UpdatedAt | timestamptz | not null |
Indexes (5)
(CampaignCreatorId)(IX_CampaignPosts_CampaignCreatorId)(CampaignId, Status)(IX_CampaignPosts_CampaignId_Status)(Platform, ExternalVideoId)unique (IX_CampaignPosts_Platform_ExternalVideoId)(SocialConnectionId)(IX_CampaignPosts_SocialConnectionId)(UserId, Status)(IX_CampaignPosts_UserId_Status)
Relationships
CampaignPosts.CampaignIdreferencesCreatorCampaigns.IdCampaignPosts.CampaignCreatorIdreferencesCampaignCreators.IdCampaignPosts.SocialConnectionIdreferencesSocialConnections.IdCampaignPostReadings.PostIdreferencesCampaignPostsCreatorEarnings.PostIdreferencesCampaignPosts