AdCredits table

The AdCredits table in the Shipfolio schema has 14 columns, keyed by Id, with 3 foreign keys to Companies, Campaigns and AdCharges.

Columns (14)

Columns of the AdCredits table
ColumnTypeConstraintsDescription
Iduuidprimary key
Sequencebigintnot null
CompanyIduuidnot null, references Companies.Id
Kindvarchar(50)not null
AmountCentsbigintnot null
BalanceAfterCentsbigintnot null
CampaignIduuidreferences Campaigns.Id
StripeSessionIdvarchar(255)
Notevarchar(500)
ByUserIduuid
CreatedAttimestamptznot null
UpdatedAttimestamptznot null
AdChargeIduuidreferences AdCharges.Id
StripePaymentIntentIdvarchar(255)

Indexes (4)

  • (AdChargeId) (IX_AdCredits_AdChargeId)
  • (CampaignId) (IX_AdCredits_CampaignId)
  • (CompanyId, Sequence) unique (IX_AdCredits_CompanyId_Sequence)
  • (Kind, CreatedAt) (IX_AdCredits_Kind_CreatedAt)

Relationships