diff options
author | Erkin Alp Güney <erkinalp9035@gmail.com> | 2022-04-21 18:50:12 +0300 |
---|---|---|
committer | Erkin Alp Güney <erkinalp9035@gmail.com> | 2022-04-21 18:50:12 +0300 |
commit | f60ffd3c412482ea38dc68cec45ab1d4d8f6656b (patch) | |
tree | 22382a26ca2eb1a533dc7c2c1021aa85fb484e63 /util/src | |
parent | Try catch cpu log (diff) | |
download | server-f60ffd3c412482ea38dc68cec45ab1d4d8f6656b.tar.xz |
user groups - first steps
Diffstat (limited to 'util/src')
-rw-r--r-- | util/src/entities/UserGroup.ts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/util/src/entities/UserGroup.ts b/util/src/entities/UserGroup.ts new file mode 100644 index 00000000..b32c2d6d --- /dev/null +++ b/util/src/entities/UserGroup.ts @@ -0,0 +1,44 @@ +import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; + +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { User } from "./User"; + +@Entity("groups") +export class UserGroup extends BaseClass { + @Column() + color: number; + + @Column() + hoist: boolean; + + @JoinColumn({ name: "controller", referencedColumnName: "id" }) + @ManyToOne(() => User) + controller?: User; + + @Column() + mentionable_by?: string; + + @Column() + name: string; + + @Column() + rights: string; + + @Column({ nullable: true }) + icon: string; + + @Column({ type: "simple-json", nullable: true }) + tags?: { + bot_id?: string; + integration_id?: string; + premium_subscriber?: boolean; + }; + + @Column({ nullable: true }) + parent?: string; + + @Column({ type: "simple-array", nullable: true}) + associciations: string[]; + +} |