AffiliateAccounts table
The AffiliateAccounts table in the Shipfolio schema has 5 columns, keyed by Id, with 1 foreign key to AspNetUsers. 4 columns in AffiliateCommissions, AffiliateExtraCodes, AffiliatePayouts and AffiliateReferrals reference it.
Columns (5)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key | |
| Code | varchar(16) | not null | |
| CreatedAt | timestamptz | not null | |
| UpdatedAt | timestamptz | not null | |
| UserId | uuid | not null, references AspNetUsers.Id |
Indexes (2)
(Code)unique (IX_AffiliateAccounts_Code)(UserId)unique (IX_AffiliateAccounts_UserId)
Relationships
AffiliateAccounts.UserIdreferencesAspNetUsers.IdAffiliateCommissions.AffiliateAccountIdreferencesAffiliateAccountsAffiliateExtraCodes.AffiliateAccountIdreferencesAffiliateAccountsAffiliatePayouts.AffiliateAccountIdreferencesAffiliateAccountsAffiliateReferrals.AffiliateAccountIdreferencesAffiliateAccounts