CREATE TABLE IF NOT EXISTS "withdrawals" (
    "id" BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
    "user_id" BIGINT NOT NULL,
    "amount" BIGINT NOT NULL,
    "content" TEXT,
    "status" SMALLINT NOT NULL DEFAULT 0,
    "reason" VARCHAR(500) NOT NULL DEFAULT '',
    "created_at" TIMESTAMP NOT NULL,
    "updated_at" TIMESTAMP NOT NULL,
    PRIMARY KEY ("id")
);
CREATE INDEX IF NOT EXISTS "withdrawals_idx_user_id" ON "withdrawals" ("user_id");
INSERT INTO "system" ("category", "key", "value", "type", "desc", "created_at", "updated_at")
VALUES
    ('invite', 'WithdrawalMethod', '', 'string', 'withdrawal method', '2025-04-22 14:25:16.637', '2025-04-22 14:25:16.637') ON CONFLICT DO NOTHING;

