backend for xcvr appview

initial report stuff

+33
+1
migrations/009_initreports.down.sql
···
··· 1 + DROP TABLE IF EXISTS reports;
+8
migrations/009_initreports.up.sql
···
··· 1 + CREATE TABLE reports ( 2 + id SERIAL primary key, 3 + uri TEXT NOT NULL, 4 + reason TEXT NOT NULL, 5 + did TEXT, 6 + addr TEXT, 7 + posted_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), 8 + );
+24
server/internal/types/report.go
···
··· 1 + package types 2 + 3 + import ( 4 + "time" 5 + ) 6 + 7 + type ReportRequest struct { 8 + URI string `json:"uri"` 9 + Reason string `json:"reason"` 10 + } 11 + 12 + type AnonReport struct { 13 + Addr string `json:"addr"` 14 + URI string `json:"uri"` 15 + Reason string `json:"reason"` 16 + ReportedAt time.Time `json:"reportedAt"` 17 + } 18 + 19 + type AuthReport struct { 20 + DID string `json:"did"` 21 + URI string `json:"uri"` 22 + Reason string `json:"reason"` 23 + ReportedAt time.Time `json:"reportedAt"` 24 + }