/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
import { id } from '../id.js';
@Entity('emoji')
@Index(['name', 'host'], { unique: true })
export class MiEmoji {
@PrimaryColumn(id())
public id: string;
@Column('timestamp with time zone', {
nullable: true,
})
public updatedAt: Date | null;
@Index()
@Column('varchar', {
length: 128,
public name: string;
length: 128, nullable: true,
public host: string | null;
public category: string | null;
length: 512,
public originalUrl: string;
default: '',
public publicUrl: string;
length: 512, nullable: true,
public uri: string | null;
// publicUrlの方のtypeが入る
length: 64, nullable: true,
public type: string | null;
array: true, length: 128, default: '{}',
public aliases: string[];
length: 1024, nullable: true,
public license: string | null;
@Column('boolean', {
default: false,
public localOnly: boolean;
public isSensitive: boolean;
// TODO: 定期ジョブで存在しなくなったロールIDを除去するようにする
public roleIdsThatCanBeUsedThisEmojiAsReaction: string[];
}