summaryrefslogtreecommitdiff
path: root/src/models/entities/emoji.ts
blob: d6080ae0991196956bf0c94334bff38c1e5d72e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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[];
}