discounts table

The discounts table in the E-commerce Database Schema schema has 11 columns, keyed by id. 1 column in discount_redemptions references it.

value is a percentage for percentage type, otherwise minor units. currency only applies to fixed-amount discounts.

Columns (11)

Columns of the discounts table
ColumnTypeConstraintsDescription
iduuidprimary key
codevarchar(40)unique, not null
typediscount_typenot null
valueintegernot null
currencychar(3)
minimum_spend_centsinteger
usage_limitinteger
used_countintegernot null
starts_attimestamptz
ends_attimestamptz
is_activebooleannot null

Relationships