AdCharges table
The AdCharges table in the Shipfolio schema has 21 columns, keyed by Id, with 1 foreign key to Companies. 1 column in AdCredits references it.
Columns (21)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key | |
| CompanyId | uuid | not null, references Companies.Id | |
| AmountCents | bigint | not null | |
| Trigger | varchar(50) | not null | |
| Status | varchar(50) | not null | |
| PeriodStart | timestamptz | not null | |
| PeriodEnd | timestamptz | not null | |
| LedgerFromSequence | bigint | not null | |
| LedgerToSequence | bigint | not null | |
| Attempts | integer | not null | |
| LastAttemptAt | timestamptz | ||
| NextRetryAt | timestamptz | ||
| StripePaymentIntentId | varchar(255) | ||
| StripeChargeId | varchar(255) | ||
| ReceiptUrl | varchar(1000) | ||
| CardLabel | varchar(80) | ||
| FailureCode | varchar(100) | ||
| FailureReason | varchar(500) | ||
| PaidAt | timestamptz | ||
| CreatedAt | timestamptz | not null | |
| UpdatedAt | timestamptz | not null |
Indexes (3)
(CompanyId, CreatedAt)(IX_AdCharges_CompanyId_CreatedAt)(Status, NextRetryAt)(IX_AdCharges_Status_NextRetryAt)(StripePaymentIntentId)(IX_AdCharges_StripePaymentIntentId)
Relationships
AdCharges.CompanyIdreferencesCompanies.IdAdCredits.AdChargeIdreferencesAdCharges