unoffical wafrn mirror
wafrn.net
atproto
social-network
activitypub
1import {
2 Model, Table, Column, DataType, HasMany
3} from "sequelize-typescript";
4import { Emoji } from "./emoji.js";
5
6export interface EmojiCollectionAttributes {
7 id?: string;
8 createdAt?: Date;
9 updatedAt?: Date;
10 name?: string;
11 comment?: string;
12}
13
14@Table({
15 tableName: "emojiCollections",
16 modelName: "emojiCollections",
17 timestamps: true
18})
19export class EmojiCollection extends Model<EmojiCollectionAttributes, EmojiCollectionAttributes> implements EmojiCollectionAttributes {
20
21 @Column({
22 primaryKey: true,
23 type: DataType.UUID,
24 defaultValue: DataType.UUIDV4
25 })
26 declare id: string;
27
28 @Column({
29 allowNull: true,
30 type: DataType.STRING(255)
31 })
32 declare name: string;
33
34 @Column({
35 allowNull: true,
36 type: DataType.STRING
37 })
38 declare comment: string;
39
40 @HasMany(() => Emoji)
41 declare emojis: Emoji[];
42}