* feat: 通報の即時解決機能を追加 * fix: 条件変更時に有効期限を変更していないのに勝手に更新される問題を修正 * fix: 条件のパターンの削除ができない問題を修正 * fix: リソルバーの通報を解決する判定基準が間違っていたのを修正 * fix: 変更する変数が間違っていたのを修正 * fix: getUTCMonthはゼロ始まりかも * enhance: Storybookのストーリーを作成 * fix: 色々修正 * fix: 型エラーを修正 * [ci skip] Update CHANGELOG.md * [ci skip] Update CHANGELOG.md * Update CHANGELOG.md * リファクタリング * refactor: 型定義をよりよくした * refactor: beforeExpiresAtの初期値はundefinedの方がいい * refactor: 変数の名前を変更 * Fix: リモートサーバーから転送された通報も対象に追加 * Update CHANGELOG.md * take review --------- Co-authored-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import { Column, Entity, PrimaryColumn, Index } from 'typeorm';
|
|
import { id } from '../id.js';
|
|
|
|
@Entity()
|
|
export class AbuseReportResolver {
|
|
@PrimaryColumn(id())
|
|
public id: string;
|
|
|
|
@Index()
|
|
@Column('timestamp with time zone', {
|
|
comment: 'The created date of AbuseReportResolver',
|
|
})
|
|
public createdAt: Date;
|
|
|
|
@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;
|
|
}
|