gift_cards table
The gift_cards table in the E-commerce Database Schema schema has 8 columns, keyed by id, with 1 foreign key to customers. 1 column in gift_card_transactions references it.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| code | varchar(40) | unique, not null | |
| initial_balance_cents | integer | not null | |
| balance_cents | integer | not null | |
| currency | char(3) | not null | |
| status | gift_card_status | not null | |
| issued_to_customer_id | uuid | references customers.id | |
| expires_at | timestamptz |
Relationships
gift_cards.issued_to_customer_idreferencescustomers.idgift_card_transactions.gift_card_idreferencesgift_cards