1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-10 11:53:11 +09:00
cherrypick/packages/backend/src/models/AbuseReportResolver.ts
caipira113 26bd0b086a
fix
2023-10-20 04:05:11 +09:00

58 lines
1.2 KiB
TypeScript

/*
* SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Column, Entity, PrimaryColumn, Index } from 'typeorm';
import { id } from './util/id.js';
@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', {
enum: ['1hour', '12hours', '1day', '1week', '1month', '3months', '6months', '1year', 'indefinitely'],
})
public expiresAt: string;
@Column('boolean')
public forward: boolean;
}