# Conflicts: # CHANGELOG.md # README.md # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/core/activitypub/models/ApNoteService.ts # packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts # packages/backend/src/server/api/endpoints/get-avatar-decorations.ts # packages/backend/test/unit/entities/UserEntityService.ts # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkTimeline.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/emoji-edit-dialog.vue # packages/frontend/src/ui/universal.vue
91 lines
1.7 KiB
TypeScript
91 lines
1.7 KiB
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project , Type4ny-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
|
import { id } from './util/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;
|
|
|
|
@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('boolean', {
|
|
default: false,
|
|
nullable: false,
|
|
})
|
|
public draft: boolean;
|
|
}
|