You've already forked AstralRinth
forked from didirus/AstralRinth
Initial affiliate codes implementation (#4382)
* Initial affiliate codes implementation * some more docs to codes * sqlx prepare * Address PR comments * Address more PR comments * fix clippy * Switch to using Json<T> for type-safe responses
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE affiliate_codes (
|
||||
id bigint PRIMARY KEY,
|
||||
created_at timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
created_by bigint NOT NULL REFERENCES users(id),
|
||||
affiliate bigint NOT NULL REFERENCES users(id),
|
||||
-- left nullable so we can explicitly set payouts if we need to,
|
||||
-- and use a global default if unset
|
||||
revenue_split float
|
||||
);
|
||||
Reference in New Issue
Block a user