dev/post-reports #20

Merged
SoXX merged 7 commits from dev/post-reports into main 2024-11-06 11:24:01 +00:00
Showing only changes of commit 55f5795719 - Show all commits

View File

@ -0,0 +1,30 @@
-- +migrate Up
CREATE TYPE ReportType AS ENUM (
'duplicate',
'missing_data',
'rating_abuse'
'illegal_content'
);
CREATE TYPE ReportState AS ENUM (
'pending_unclaimed',
'pending',
'approved',
'partial',
'rejected'
);
CREATE TABLE "PostReport"
(
id CHAR(25) NOT NULL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP WITH TIME ZONE NULL,
post_id CHAR(25) NOT NULL REFERENCES "Post" (id),
report_by TEXT NOT NULL REFERENCES "User" (id),
report_description TEXT NOT NULL,
audit_by TEXT NULL REFERENCES "User" (id),
audit_description TEXT NOT NULL,
report_type ReportType NOT NULL,
report_state ReportState NOT NULL
);