Reapply "feat(loyalty): EnakPoint & EnakCoin" (#32)

This reverts commit 4e24f9bbb0.
This commit is contained in:
efrilm
2026-09-30 15:31:11 +07:00
parent 5e28b05770
commit c6062c4bb9
195 changed files with 20058 additions and 2177 deletions
@@ -0,0 +1,7 @@
-- Tokens become EnakCoin (docs/prd-point-coin.md §10). Campaigns that handed out
-- tokens now hand out coins; the API still accepts TOKENS and stores it as COINS.
UPDATE campaigns SET type = 'COINS' WHERE type = 'TOKENS';
UPDATE campaign_rules SET reward_type = 'COINS' WHERE reward_type = 'TOKENS';
COMMENT ON COLUMN campaigns.type IS 'Type of campaign: REWARD, POINTS, COINS, MIXED';
COMMENT ON COLUMN campaign_rules.reward_type IS 'Type of reward: POINTS, COINS, REWARD';