1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-10 20:04:31 +09:00
cherrypick/packages/backend/src/models/AvatarDecoration.ts

50 lines
1023 B
TypeScript
Raw Normal View History

/*
2023-10-22 00:07:34 +09:00
* SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors
* 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[];
2023-11-08 22:40:07 +09:00
@Column('varchar', {
length: 32,
})
public remoteId: string;
@Column('varchar', {
2023-11-14 19:49:15 +09:00
length: 128, nullable: true,
2023-11-08 22:40:07 +09:00
})
public host: string | null;
}