1c0d4546f7
Closes: #9711 (please check this issue first) I cherry-picked two commits ([1](8ae9d2eaa8
), [2](ed51209172
)) from [Misskey](https://github.com/misskey-dev/misskey) and made a few changes. 「ライセンス」should be written as "License" in the following screenshots, but it has not yet been translated. It would be nice if we could include multiple lines of text, but I just ported what's been implemented so far in Misskey not to mess things up. This is my first pull request (aside from typo correction). Feel free to point out any issues! ![](https://cdn.discordapp.com/attachments/823878222897741868/1086372711841935440/2023-03-18_042011.png) ![](https://cdn.discordapp.com/attachments/823878222897741868/1086373178214981853/01.png) ![](https://cdn.discordapp.com/attachments/823878222897741868/1086373336709341246/2023-03-18_042629.png) Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: naskya <m@naskya.net> Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9719 Co-authored-by: naskya <naskya@noreply.codeberg.org> Co-committed-by: naskya <naskya@noreply.codeberg.org>
63 lines
1.1 KiB
TypeScript
63 lines
1.1 KiB
TypeScript
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;
|
|
}
|