donk
Tables (5)
categories
- id — INT
- name — VARCHAR(255) — NOT NULL
challenge_participations
- id — BIGINT
- user_id — BIGINT — NOT NULL
- challenge_id — BIGINT — NOT NULL
- participation_fee — INT — NOT NULL
- achievement_rate — DECIMAL(5,2)
- points_returned — INT
- bonus_points — INT
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
challenges
- id — BIGINT
- name — VARCHAR(255) — NOT NULL
- description — TEXT
- start_date — DATE — NOT NULL
- end_date — DATE — NOT NULL
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
points_transactions
- id — BIGINT
- user_id — BIGINT — NOT NULL
- transaction_type — ENUM('earn', 'spend') — NOT NULL
- category — ENUM( 'login_checkin', 'challenge_partial_success', 'challenge_full_success', 'purchase_gifticon', 'purchase_profile_item', 'participation_fee', 'achievement_deduction' ) — NOT NULL
- points — INT — NOT NULL
- related_transaction_id — BIGINT
- description — TEXT
- created_at — TIMESTAMP
users
- id — BIGINT
- username — VARCHAR(255) — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- created_at — TIMESTAMP
- updated_at — TIMESTAMP