diff options
| author | THarley | 2018-02-22 17:19:08 +0000 |
|---|---|---|
| committer | THarley | 2018-02-22 17:19:08 +0000 |
| commit | 3198c6c2474101623e3b95bd038effe210c176a8 (patch) | |
| tree | 318483b8b380383ad9ddec6d606544375d3f6a8b /src/db/model/ContributorGroup.ts | |
| parent | Merge branch 'trh/error-middleware' into 'master' (diff) | |
| download | medicine-3198c6c2474101623e3b95bd038effe210c176a8.tar.gz medicine-3198c6c2474101623e3b95bd038effe210c176a8.zip | |
Revert “Merge branch ‘trh/error-middleware’ into ‘master’”
This reverts merge request !13
Diffstat (limited to 'src/db/model/ContributorGroup.ts')
| -rw-r--r-- | src/db/model/ContributorGroup.ts | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/db/model/ContributorGroup.ts b/src/db/model/ContributorGroup.ts deleted file mode 100644 index 6bbcf4a..0000000 --- a/src/db/model/ContributorGroup.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { AllowNull, Column, DataType, HasMany, Model, Table - } from 'sequelize-typescript'; -import { default as UserJoinsProject } from './UserJoinsProject'; - -@Table -export default class ContributorGroup extends Model<ContributorGroup> { - @AllowNull - @Column(DataType.TEXT) - public name: string | null = null; - - /* "Error: Foreign key for "ContributorGroup" - * is missing on "UserJoinsProject"." */ - @HasMany(() => UserJoinsProject, 'contributorGroupId') - public uses: UserJoinsProject[] = []; - - @Column - public canCreateFiles: boolean = false; - - @Column - public canDeleteFiles: boolean = false; - - @Column - public canViewFiles: boolean = false; - - @Column - public canAddUsers: boolean = false; - - @Column - public canRemoveUsers: boolean = false; - - @Column - public canEditUserPermissions: boolean = false; - - @AllowNull - @Column(DataType.TEXT) - public description: string | null = null; - - @Column - public isInternal: boolean = true; - - public getContributorGroupFullInfo(): ContributorGroupFullInfo { - return { - role: `${this.name}`, - description: `${this.description}`, - internal: this.isInternal - }; - } -} - -export interface ContributorGroupFullInfo { - role: string; - description: string; - internal: boolean; -} |
