diff options
author | Featyre <twooter.0g179@simplelogin.co> | 2022-01-23 23:55:43 +0800 |
---|---|---|
committer | Featyre <twooter.0g179@simplelogin.co> | 2022-01-23 23:55:43 +0800 |
commit | a5e06cd02193afe24292a5ae21a9f7e663e2f176 (patch) | |
tree | ab5aa50b774c89e5667717a01c405413782aaa30 /util/src/entities/Categories.ts | |
parent | Branding updates (diff) | |
download | server-a5e06cd02193afe24292a5ae21a9f7e663e2f176.tar.xz |
Partial integration of categories and discovery
Diffstat (limited to 'util/src/entities/Categories.ts')
-rw-r--r-- | util/src/entities/Categories.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/util/src/entities/Categories.ts b/util/src/entities/Categories.ts new file mode 100644 index 00000000..2cf89dbc --- /dev/null +++ b/util/src/entities/Categories.ts @@ -0,0 +1,36 @@ +import { PrimaryColumn, Column, Entity} from "typeorm"; +import { BaseClassWithoutId } from "./BaseClass"; + +// TODO: categories: +// [{ +// "id": 16, +// "default": "Anime & Manga", +// "localizations": { +// "de": "Anime & Manga", +// "fr": "Anim\u00e9s et mangas", +// "ru": "\u0410\u043d\u0438\u043c\u0435 \u0438 \u043c\u0430\u043d\u0433\u0430" +// } +// }, +// "is_primary": false/true +// }] + +@Entity("categories") +export class Categories extends BaseClassWithoutId { // Not using snowflake + + @PrimaryColumn() + id: number; + + @Column() + default: string; + + @Column({ type: "simple-json", nullable: false }) + localizations: string; + + @Column() + is_primary: boolean; + +} + +export interface DefaultCategoryValue { // TODO: Load Default Discord Categories + +} \ No newline at end of file |