mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 07:05:12 +00:00
enhance(backend): add user.score for moderation purpose
This commit is contained in:
parent
ca022b9349
commit
9e9198086d
2 changed files with 21 additions and 0 deletions
16
packages/backend/migration/1727491883993-user-score.js
Normal file
16
packages/backend/migration/1727491883993-user-score.js
Normal 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"`);
|
||||
}
|
||||
}
|
|
@ -155,6 +155,11 @@ export class MiUser {
|
|||
})
|
||||
public tags: string[];
|
||||
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
})
|
||||
public score: number;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is suspended.',
|
||||
|
|
Loading…
Reference in a new issue