add report admin panel
All checks were successful
delpoy / build-and-deploy (push) Successful in 53s
All checks were successful
delpoy / build-and-deploy (push) Successful in 53s
This commit is contained in:
@@ -40,26 +40,35 @@ export class User extends Model {
|
||||
export class Report extends Model {
|
||||
@Column({ type: DataTypes.STRING, allowNull: false, unique: true })
|
||||
@Index
|
||||
declare url_id: string;
|
||||
declare url_hash: string;
|
||||
@Column({ type: DataTypes.STRING, allowNull: false })
|
||||
declare subject: string;
|
||||
@Column({ type: DataTypes.STRING })
|
||||
declare body: string;
|
||||
@Column({ type: DataTypes.BOOLEAN, allowNull: false })
|
||||
declare draft: boolean;
|
||||
@Column({ type: DataTypes.BOOLEAN, allowNull: false })
|
||||
declare completed: boolean;
|
||||
@Column({ type: DataTypes.ENUM('java', 'bedrock', 'cracked'), allowNull: false })
|
||||
declare status: 'none' | 'review' | 'reviewed';
|
||||
@Column({ type: DataTypes.STRING })
|
||||
declare notice: string;
|
||||
@Column({ type: DataTypes.STRING })
|
||||
declare statement: string;
|
||||
@Column({ type: DataTypes.INTEGER, allowNull: false })
|
||||
@ForeignKey(() => User)
|
||||
declare reporter_user_id: number;
|
||||
declare reporter_id: number;
|
||||
@Column({ type: DataTypes.INTEGER, allowNull: false })
|
||||
@ForeignKey(() => User)
|
||||
declare reported_user_id: number;
|
||||
declare reported_id: number;
|
||||
@Column({ type: DataTypes.INTEGER })
|
||||
@ForeignKey(() => Admin)
|
||||
declare auditor_id: number;
|
||||
|
||||
@BelongsTo(() => User)
|
||||
@BelongsTo(() => User, 'reporter_id')
|
||||
declare reporter: User;
|
||||
@BelongsTo(() => User)
|
||||
@BelongsTo(() => User, 'reported_id')
|
||||
declare reported: User;
|
||||
@BelongsTo(() => Admin, 'auditor_id')
|
||||
declare auditor: Admin;
|
||||
}
|
||||
|
||||
@Table({ modelName: 'admin', underscored: true })
|
||||
|
||||
Reference in New Issue
Block a user