Skip to main content

coupons

Module: coupons

Discount coupons with value, tax rate, and validity periods.

NameTypeNullableDefault ValueNotes
PKID
integerCoupon ID
fork
forks.ID
integerFork ID (`null` for base module)
ownergroup
groups.ID
integerOwner group ID (`null`=PUBLIC)
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)
activity
smallint0Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)
name
textName
type
smallint0Coupon type (`0`=PROMOTION, `1`=INDIVIDUAL)
code
text''Promotion code; only for PROMOTION
value
double precision0Default value
taxrate
double precisionTax rate in percent
neutral
smallint0Neutral in transaction
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`
description
text''Detailed general description
foreigntaxrates
jsonCountry-specific tax rates in percent; use country code as object key
NameUniqueNulls DistinctPrimaryPartialMethodKeys
fk_coupons_forkginfork
fk_coupons_ownergroupginownergroup
i_coupons_noforkginfork
i_coupons_noownerginownergroup
pk_couponsbtreeID
s_coupons_nameginname
u_coupons_codebtreecode
NameType
c_coupons_datecheck
c_coupons_typecheck
dc_coupons_activitycheck
dc_coupons_codecheck
dc_coupons_descriptioncheck
dc_coupons_foreigntaxratescheck
dc_coupons_namecheck
dc_coupons_taxratecheck
dc_coupons_typecheck
fk_coupons_forkforeign_key
fk_coupons_ownergroupforeign_key
pk_couponsprimary_key
NameTypeEventsFunctionDefinition
tiu_coupons_uniquebeforeinsert, updateftiu_coupons_unique
tu_coupons_typebeforeupdateft_integrity
Loading...