2023-10-21 11:38:07 +02:00
|
|
|
/*
|
2024-02-13 16:50:11 +01:00
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
2023-10-21 11:38:07 +02:00
|
|
|
* 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[];
|
|
|
|
}
|