From f66a9fa7f132f41b2e40029f0fb535521c3fb716 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sat, 24 Feb 2018 17:13:43 +0000 Subject: restructuring of tests + yarn install script --- .../project-code/src/db/model/UserGroup.ts.html | 221 +++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 coverage/project-code/src/db/model/UserGroup.ts.html (limited to 'coverage/project-code/src/db/model/UserGroup.ts.html') diff --git a/coverage/project-code/src/db/model/UserGroup.ts.html b/coverage/project-code/src/db/model/UserGroup.ts.html new file mode 100644 index 0000000..75f5fbf --- /dev/null +++ b/coverage/project-code/src/db/model/UserGroup.ts.html @@ -0,0 +1,221 @@ + + +
+| 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 +52 +53 | 1x + +1x + + + + + + + + +1x + + +1x + + +1x + + +1x + + +1x + + +1x + + +1x + + +1x + + +1x + + +1x + + + +1x + + + + + + + + + + | import { AllowNull, Column, DataType, HasMany, Model, Table
+ } from 'sequelize-typescript';
+import { default as User } from './User';
+
+interface UserPrivilege {
+ privilege: string;
+ description: string;
+ internal: boolean;
+}
+
+@Table
+export default class UserGroup extends Model<UserGroup> {
+ @AllowNull
+ @Column(DataType.TEXT)
+ public name: string | null = null;
+
+ @HasMany(() => User)
+ public users: User[] = [];
+
+ @Column
+ public canCreateUsers: boolean = false;
+
+ @Column
+ public canDeleteUsers: boolean = false;
+
+ @Column
+ public canEditUsers: boolean = false;
+
+ @Column
+ public canCreateProjects: boolean = false;
+
+ @Column
+ public canDeleteProjects: boolean = false;
+
+ @Column
+ public canEditProjects: boolean = false;
+
+ @Column
+ public isInternal: boolean = true;
+
+ @AllowNull
+ @Column(DataType.TEXT)
+ public description: string | null = null;
+
+ public getPrivelege(): UserPrivilege {
+ return {
+ privilege : `${this.name}`,
+ description : `${this.description}`,
+ internal : this.isInternal
+ };
+ }
+}
+ |