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;
length: 512,
public host: string | null;
public category: string | null;
public originalUrl: string;
default: "",
public publicUrl: string;
public uri: string | null;
// publicUrlの方のtypeが入る
// (mime)
length: 64,
public type: string | null;
array: true,
default: "{}",
public aliases: string[];
length: 1024,
public license: string | null;
@Column("integer", {
comment: "Image width",
public width: number | null;
comment: "Image height",
public height: number | null;
}