mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 23:25:41 +02:00
* feat(backend): AvatarDecorationにcategoryを追加し、関連APIのプロパティ・戻り値にも反映 * feat(frontend): アバターデコレーションのカテゴリ設定機能 * chore(frontend): 管理画面とユーザー側の画面で、アバターデコレーションのグループ化のコードをある程度統一 * CHANGELOGを更新 * fix: group-avatar-decorations.tsを使用するよう修正 * chore: コーディング規約への準拠 * 型エラーを解消
45 lines
937 B
TypeScript
45 lines
937 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
|
import { id } from './util/id.js';
|
|
|
|
@Entity('avatar_decoration')
|
|
export class MiAvatarDecoration {
|
|
@PrimaryColumn(id())
|
|
public id: string;
|
|
|
|
@Column('timestamp with time zone', {
|
|
nullable: true,
|
|
})
|
|
public updatedAt: Date | null;
|
|
|
|
@Column('varchar', {
|
|
length: 1024,
|
|
})
|
|
public url: string;
|
|
|
|
@Column('varchar', {
|
|
length: 256,
|
|
})
|
|
public name: string;
|
|
|
|
@Column('varchar', {
|
|
length: 2048,
|
|
})
|
|
public description: string;
|
|
|
|
// TODO: 定期ジョブで存在しなくなったロールIDを除去するようにする
|
|
@Column('varchar', {
|
|
array: true, length: 128, default: '{}',
|
|
})
|
|
public roleIdsThatCanBeUsedThisDecoration: string[];
|
|
|
|
@Column('varchar', {
|
|
length: 128, nullable: true,
|
|
})
|
|
public category: string | null;
|
|
}
|