diff options
Diffstat (limited to 'packages/backend/src/models/entities/emoji.ts')
| -rw-r--r-- | packages/backend/src/models/entities/emoji.ts | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/packages/backend/src/models/entities/emoji.ts b/packages/backend/src/models/entities/emoji.ts new file mode 100644 index 0000000000..d6080ae099 --- /dev/null +++ b/packages/backend/src/models/entities/emoji.ts @@ -0,0 +1,51 @@ +import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; +import { id } from '../id'; + +@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 url: string; + + @Column('varchar', { + length: 512, nullable: true + }) + public uri: string | null; + + @Column('varchar', { + length: 64, nullable: true + }) + public type: string | null; + + @Column('varchar', { + array: true, length: 128, default: '{}' + }) + public aliases: string[]; +} |