isRemoteSuspend

This commit is contained in:
tamaina 2025-07-07 09:45:08 +09:00
parent c165749a29
commit 4417f0525c
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,26 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
/**
* @typedef {import('typeorm').MigrationInterface} MigrationInterface
*/
/**
* @class
* @implements {MigrationInterface}
*/
module.exports = class RemoteSuspend1751848750315 {
name = 'RemoteSuspend1751848750315'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" ADD "isRemoteSuspended" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`COMMENT ON COLUMN "user"."isRemoteSuspended" IS 'Whether the User is suspended by the remote moderators.'`);
}
async down(queryRunner) {
await queryRunner.query(`COMMENT ON COLUMN "user"."isRemoteSuspended" IS 'Whether the User is suspended by the remote moderators.'`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isRemoteSuspended"`);
}
}

View File

@ -166,10 +166,16 @@ export class MiUser {
@Column('boolean', {
default: false,
comment: 'Whether the User is suspended.',
comment: 'Whether the User is suspended by the local moderators.',
})
public isSuspended: boolean;
@Column('boolean', {
default: false,
comment: 'Whether the User is suspended by the remote moderators.',
})
public isRemoteSuspended: boolean;
@Column('boolean', {
default: false,
comment: 'Whether the User is locked.',