KnownUser.ts 657 B

12345678910111213141516171819202122232425
  1. import {Entity, TableInheritance, PrimaryColumn, Column, ChildEntity} from "typeorm";
  2. import { ReactionType } from "./ReactionEmote";
  3. @Entity()
  4. @TableInheritance({ column: { type: "varchar", name: "type" } })
  5. export class KnownUser {
  6. @PrimaryColumn()
  7. userID: string;
  8. @Column({ default: false })
  9. canModerate: boolean;
  10. @Column({ type: "varchar", default: ReactionType.NONE })
  11. replyReactionType: ReactionType;
  12. @Column({ type: "varchar", default: ReactionType.NONE })
  13. mentionReactionType: ReactionType;
  14. }
  15. @ChildEntity()
  16. export class User extends KnownUser { }
  17. @ChildEntity()
  18. export class UserRole extends KnownUser { }