0
0

enhance(backend): add user.score for moderation purpose

This commit is contained in:
syuilo 2024-09-28 11:54:40 +09:00
parent ca022b9349
commit 9e9198086d
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class UserScore1727491883993 {
name = 'UserScore1727491883993'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" ADD "score" integer NOT NULL DEFAULT '0'`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "score"`);
}
}

View File

@ -155,6 +155,11 @@ export class MiUser {
}) })
public tags: string[]; public tags: string[];
@Column('integer', {
default: 0,
})
public score: number;
@Column('boolean', { @Column('boolean', {
default: false, default: false,
comment: 'Whether the User is suspended.', comment: 'Whether the User is suspended.',