mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
31 lines
609 B
TypeScript
31 lines
609 B
TypeScript
import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
|
import { APIEmoji } from "~types/entities/emoji";
|
|
|
|
@Entity({
|
|
name: "emojis",
|
|
})
|
|
export class Emoji extends BaseEntity {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id!: string;
|
|
|
|
@Column("varchar")
|
|
shortcode!: string;
|
|
|
|
@Column("varchar")
|
|
url!: string;
|
|
|
|
@Column("boolean")
|
|
visible_in_picker!: boolean;
|
|
|
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
async toAPI(): Promise<APIEmoji> {
|
|
return {
|
|
shortcode: this.shortcode,
|
|
static_url: "",
|
|
url: "",
|
|
visible_in_picker: false,
|
|
category: undefined,
|
|
};
|
|
}
|
|
}
|