mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
30 lines
607 B
TypeScript
30 lines
607 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,
|
|
}
|
|
}
|
|
} |