Coupon
Stored in the coupons collection. createdAt and updatedAt are maintained automatically.
Returned by GET /coupons/:code.
| Field | Type | Notes |
|---|---|---|
name | string | required · unique |
type | string | required · one of percentage, amount |
value | number | required |
startDate | date | required |
endDate | date | required |
status | string | default inactive · one of active, inactive, expired |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
company | ObjectId -> Company | |
_id | ObjectId | default "6a95712f932657988a91c080" |
createdAt | date | set once |
updatedAt | date |