diff options
| author | josh97josh | 2018-04-22 17:33:13 +0100 |
|---|---|---|
| committer | josh97josh | 2018-04-22 17:33:13 +0100 |
| commit | 68bd207cbf6e6d5bb1580841aa874c85e584752e (patch) | |
| tree | efb4c8699f86e8f23259410d6bfbd0aa95fc2cdc /src/db/model/ContributorGroup.ts | |
| parent | Merge branch 'trh/gets' of ssh://localhost:2222/cs3099group-be-4/project-code... (diff) | |
| parent | added check permissions functions (diff) | |
| download | medicine-68bd207cbf6e6d5bb1580841aa874c85e584752e.tar.gz medicine-68bd207cbf6e6d5bb1580841aa874c85e584752e.zip | |
Merge branch ‘jl247/permissions’ into trh/gets
Diffstat (limited to 'src/db/model/ContributorGroup.ts')
| -rw-r--r-- | src/db/model/ContributorGroup.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/db/model/ContributorGroup.ts b/src/db/model/ContributorGroup.ts index d3a5867..73bc558 100644 --- a/src/db/model/ContributorGroup.ts +++ b/src/db/model/ContributorGroup.ts @@ -1,12 +1,16 @@ -import { AllowNull, Column, DataType, HasMany, Model, Table +import { AllowNull, Column, DataType, HasMany, Model, Table, PrimaryKey } from 'sequelize-typescript'; import { default as UserJoinsProject } from './UserJoinsProject'; @Table export default class ContributorGroup extends Model<ContributorGroup> { - @AllowNull + @PrimaryKey @Column(DataType.TEXT) - public name!: string | null; + public name!: string; + + // @PrimaryKey + // @Column + // public username!: string; /* "Error: Foreign key for "ContributorGroup" * is missing on "UserJoinsProject"." */ @@ -31,6 +35,10 @@ export default class ContributorGroup extends Model<ContributorGroup> { @Column public canEditUserPermissions!: boolean; + @Column + public canDeleteProject!: boolean; + + @AllowNull @Column(DataType.TEXT) public description!: string | null; |
