Post Reports #17

Closed
opened 2024-11-02 21:24:03 +00:00 by Alphyron · 0 comments
Owner

It would be fancy to have reports :D

CREATE TYPE ReportType AS ENUM(
    'duplicate',
    'missing_data',
    'rating_abuse'
    `other`
)

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,
)
```
It would be fancy to have reports :D ````sql CREATE TYPE ReportType AS ENUM( 'duplicate', 'missing_data', 'rating_abuse' `other` ) 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, ) ```
SoXX was assigned by Alphyron 2024-11-02 21:24:03 +00:00
SoXX added reference dev/post-reports 2024-11-06 11:11:50 +00:00
SoXX closed this issue 2024-11-06 11:28:45 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Anthrove/otter-space-sdk#17
No description provided.