Skip to main content

couponcodes

Module: coupons

Individual coupon codes with redemption tracking.

NameTypeNullableDefault ValueNotes
PKID
bigintCoupon code ID
creator
integerCreator user ID (defaults to authenticated user on creation)
creationdate
bigintdate_part('epoch', now())Creation date and time as a Unix timestamp (defaults to current date and time on creation)
lastmodified
bigintdate_part('epoch', now())Last modification date and time as a Unix timestamp (auto-reset on modification)
coupon
coupons.ID
integerCoupon ID (**dependency**)
transaction
transactions.ID
integerTransaction ID
flag
smallint0Flag (`0`=BOOKED, `1`=RESERVED, `2`=CANCELLED)
date
bigintdate_part('epoch', now())Designated date and time as a Unix timestamp (defaults to current date and time on creation)
code
textCoupon code
value
double precision0Value
datefrom
bigintStart date and time as a Unix timestamp; must be less than or equal to `dateto`
dateto
bigintEnd date and time as a Unix timestamp; must be greater than or equal to `datefrom`
NameUniqueNulls DistinctPrimaryPartialMethodKeys
fk_couponcodes_coupongincoupon
fk_couponcodes_transactionbtreetransaction
i_couponcodes_codebtreecode
pk_couponcodesbtreeID
s_couponcodes_codegincode
NameType
c_couponcodes_datecheck
dc_couponcodes_codecheck
dc_couponcodes_flagcheck
fk_couponcodes_couponforeign_key
fk_couponcodes_transactionforeign_key
pk_couponcodesprimary_key
NameTypeEventsFunctionDefinition
ti_couponcodes_uniquebeforeinsertftiu_couponcodes_unique
tu_couponcodes_uniquebeforeupdateftiu_couponcodes_unique
Loading...