14 lines
524 B
SQL
14 lines
524 B
SQL
CREATE TABLE IF NOT EXISTS reported_issues (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
user_id BIGINT NOT NULL REFERENCES users(id),
|
|
user_role VARCHAR(255) NOT NULL,
|
|
subject TEXT NOT NULL,
|
|
description TEXT NOT NULL,
|
|
issue_type TEXT NOT NULL,
|
|
-- e.g., "deposit", "withdrawal", "bet", "technical"
|
|
status TEXT NOT NULL DEFAULT 'pending',
|
|
-- pending, in_progress, resolved, rejected
|
|
metadata JSONB,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
); |