mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-24 03:00:48 +09:00
8d06a6475e
* chore: 著作権とライセンスについての情報を各ファイルに追加する * chore: Add the SPDX information to each file Add copyright and licensing information as defined in version 3.0 of the REUSE Specification. * tweak format --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * chore: Add SPDX-License-Identifier [skip ci] * add missing SPDX-License-Identifier * remove unused file --------- Co-authored-by: Shun Sakai <sorairolake@protonmail.ch> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
90 lines
1.7 KiB
TypeScript
90 lines
1.7 KiB
TypeScript
/*
|
|
* 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()
|
|
@Index(['name', 'host'], { unique: true })
|
|
export class Emoji {
|
|
@PrimaryColumn(id())
|
|
public id: string;
|
|
|
|
@Column('timestamp with time zone', {
|
|
nullable: true,
|
|
})
|
|
public updatedAt: Date | null;
|
|
|
|
@Index()
|
|
@Column('varchar', {
|
|
length: 128,
|
|
})
|
|
public name: string;
|
|
|
|
@Index()
|
|
@Column('varchar', {
|
|
length: 128, nullable: true,
|
|
})
|
|
public host: string | null;
|
|
|
|
@Column('varchar', {
|
|
length: 128, nullable: true,
|
|
})
|
|
public category: string | null;
|
|
|
|
@Column('varchar', {
|
|
length: 512,
|
|
})
|
|
public originalUrl: string;
|
|
|
|
@Column('varchar', {
|
|
length: 512,
|
|
default: '',
|
|
})
|
|
public publicUrl: string;
|
|
|
|
@Column('varchar', {
|
|
length: 512, nullable: true,
|
|
})
|
|
public uri: string | null;
|
|
|
|
// publicUrlの方のtypeが入る
|
|
@Column('varchar', {
|
|
length: 64, nullable: true,
|
|
})
|
|
public type: string | null;
|
|
|
|
@Column('varchar', {
|
|
array: true, length: 128, default: '{}',
|
|
})
|
|
public aliases: string[];
|
|
|
|
@Column('varchar', {
|
|
length: 1024, nullable: true,
|
|
})
|
|
public license: string | null;
|
|
|
|
@Column('boolean', {
|
|
default: false,
|
|
})
|
|
public localOnly: boolean;
|
|
|
|
@Column('boolean', {
|
|
default: false,
|
|
})
|
|
public isSensitive: boolean;
|
|
|
|
// TODO: 定期ジョブで存在しなくなったロールIDを除去するようにする
|
|
@Column('varchar', {
|
|
array: true, length: 128, default: '{}',
|
|
})
|
|
public roleIdsThatCanBeUsedThisEmojiAsReaction: string[];
|
|
|
|
@Column('varchar', {
|
|
array: true, length: 128, default: '{}',
|
|
})
|
|
public roleIdsThatCanNotBeUsedThisEmojiAsReaction: string[];
|
|
}
|