Subscriptions table
The Subscriptions table in the Shipfolio schema has 20 columns, keyed by Id, with 2 foreign keys to AspNetUsers and Companies. 2 columns in Comps and PartnershipGives reference it.
Columns (20)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key | |
| UserId | uuid | not null, references AspNetUsers.Id | |
| Plan | varchar(50) | not null | |
| StripeCustomerId | varchar(255) | not null | |
| StripeSubscriptionId | varchar(255) | not null | |
| Status | varchar(50) | not null | |
| CurrentPeriodEnd | timestamptz | not null | |
| CreatedAt | timestamptz | not null | |
| UpdatedAt | timestamptz | not null | |
| GiftNote | text | ||
| GiftedBy | uuid | ||
| CompanyId | uuid | references Companies.Id | |
| Quantity | integer | not null | |
| Store | varchar(50) | not null | |
| CancelAtPeriodEnd | boolean | not null | |
| CanceledAt | timestamptz | ||
| Interval | varchar(50) | ||
| PriceCents | bigint | ||
| TrialEndsAt | timestamptz | ||
| StartsAt | timestamptz |
Indexes (3)
(CompanyId)(IX_Subscriptions_CompanyId)(StripeSubscriptionId)unique (IX_Subscriptions_StripeSubscriptionId)(UserId)(IX_Subscriptions_UserId)
Relationships
Subscriptions.UserIdreferencesAspNetUsers.IdSubscriptions.CompanyIdreferencesCompanies.IdComps.SubscriptionIdreferencesSubscriptionsPartnershipGives.CompIdreferencesSubscriptions