2020-02-18 08:57:00 +01:00
|
|
|
import { IActor, IPerson } from "@/types/actor";
|
|
|
|
import { IEvent } from "@/types/event.model";
|
|
|
|
import { IComment } from "@/types/comment.model";
|
2019-09-09 09:31:08 +02:00
|
|
|
|
|
|
|
export enum ReportStatusEnum {
|
2020-02-18 08:57:00 +01:00
|
|
|
OPEN = "OPEN",
|
|
|
|
CLOSED = "CLOSED",
|
|
|
|
RESOLVED = "RESOLVED",
|
2019-09-09 09:31:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IReport extends IActionLogObject {
|
|
|
|
id: string;
|
|
|
|
reported: IActor;
|
|
|
|
reporter: IPerson;
|
|
|
|
event?: IEvent;
|
2019-11-15 18:36:47 +01:00
|
|
|
comments: IComment[];
|
2019-09-09 09:31:08 +02:00
|
|
|
content: string;
|
|
|
|
notes: IReportNote[];
|
|
|
|
insertedAt: Date;
|
|
|
|
updatedAt: Date;
|
|
|
|
status: ReportStatusEnum;
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
export interface IReportNote extends IActionLogObject {
|
2019-09-09 09:31:08 +02:00
|
|
|
id: string;
|
|
|
|
content: string;
|
|
|
|
moderator: IActor;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IActionLogObject {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum ActionLogAction {
|
2020-02-18 08:57:00 +01:00
|
|
|
NOTE_CREATION = "NOTE_CREATION",
|
|
|
|
NOTE_DELETION = "NOTE_DELETION",
|
|
|
|
REPORT_UPDATE_CLOSED = "REPORT_UPDATE_CLOSED",
|
|
|
|
REPORT_UPDATE_OPENED = "REPORT_UPDATE_OPENED",
|
|
|
|
REPORT_UPDATE_RESOLVED = "REPORT_UPDATE_RESOLVED",
|
|
|
|
EVENT_DELETION = "EVENT_DELETION",
|
|
|
|
COMMENT_DELETION = "COMMENT_DELETION",
|
2020-06-11 19:13:21 +02:00
|
|
|
ACTOR_SUSPENSION = "ACTOR_SUSPENSION",
|
|
|
|
ACTOR_UNSUSPENSION = "ACTOR_UNSUSPENSION",
|
2020-06-15 19:41:11 +02:00
|
|
|
USER_DELETION = "USER_DELETION",
|
2019-09-09 09:31:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IActionLog {
|
|
|
|
id: string;
|
2020-06-11 19:13:21 +02:00
|
|
|
object: IReport | IReportNote | IEvent | IComment | IActor;
|
2019-09-09 09:31:08 +02:00
|
|
|
actor: IActor;
|
|
|
|
action: ActionLogAction;
|
|
|
|
insertedAt: Date;
|
|
|
|
}
|