Campaigns table
The Campaigns table in the Shipfolio schema has 21 columns, keyed by Id, with 2 foreign keys to Companies and Listings. 3 columns in AdCredits, CampaignDailyStats and CampaignVisitors reference it.
Columns (21)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key | |
| CompanyId | uuid | not null, references Companies.Id | |
| ListingId | uuid | not null, references Listings.Id | |
| Name | varchar(80) | not null | |
| Placements | varchar(50)[] | not null | |
| NicheTags | text[] | not null | |
| DailyBudgetCents | bigint | not null | |
| TotalBudgetCents | bigint | not null | |
| CpmCents | bigint | not null | |
| EndsOn | date | ||
| Status | varchar(50) | not null | |
| StopReason | varchar(50) | ||
| RejectionReason | varchar(500) | ||
| SubmittedAt | timestamptz | ||
| ApprovedAt | timestamptz | ||
| ReviewedBy | uuid | ||
| EndedAt | timestamptz | ||
| SpentMicros | bigint | not null | |
| BilledCents | bigint | not null | |
| CreatedAt | timestamptz | not null | |
| UpdatedAt | timestamptz | not null |
Indexes (4)
(CompanyId, Status)(IX_Campaigns_CompanyId_Status)(ListingId)(IX_Campaigns_ListingId)(NicheTags)(IX_Campaigns_NicheTags)(Status)(IX_Campaigns_Status)
Relationships
Campaigns.CompanyIdreferencesCompanies.IdCampaigns.ListingIdreferencesListings.IdAdCredits.CampaignIdreferencesCampaignsCampaignDailyStats.CampaignIdreferencesCampaignsCampaignVisitors.CampaignIdreferencesCampaigns