2023-09-01 19:16:10 +09:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { Column, Entity, PrimaryColumn, Index } from 'typeorm';
|
2023-09-22 11:31:08 +09:00
|
|
|
import { id } from './util/id.js';
|
2023-09-01 19:16:10 +09:00
|
|
|
|
|
|
|
@Entity('abuse_report_resolver')
|
|
|
|
export class MiAbuseReportResolver {
|
|
|
|
@PrimaryColumn(id())
|
|
|
|
public id: string;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
comment: 'The updated date of AbuseReportResolver',
|
|
|
|
})
|
|
|
|
public updatedAt: Date;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 256,
|
|
|
|
})
|
|
|
|
public name: string;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 1024,
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public targetUserPattern: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 1024,
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public reporterPattern: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 1024,
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public reportContentPattern: string | null;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
comment: 'The expiration date of AbuseReportResolver',
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public expirationDate: Date | null;
|
|
|
|
|
|
|
|
@Column('enum', {
|
2023-09-25 17:02:07 +09:00
|
|
|
enum: ['1hour', '12hours', '1day', '1week', '1month', '3months', '6months', '1year', 'indefinitely'],
|
2023-09-01 19:16:10 +09:00
|
|
|
})
|
|
|
|
public expiresAt: string;
|
|
|
|
|
|
|
|
@Column('boolean')
|
|
|
|
public forward: boolean;
|
|
|
|
}
|