diff options
| author | jw255 | 2018-04-22 17:38:20 +0100 |
|---|---|---|
| committer | jw255 | 2018-04-22 17:38:20 +0100 |
| commit | e7d3f35c1dfca06f3b60551673099c36dddde6ca (patch) | |
| tree | dd1b386fc738e0041fcac83e56a378047edbace9 /src/db/model/ContributorGroup.ts | |
| parent | fixing tests (diff) | |
| parent | Merge branch 'trh/gets' of ssh://localhost:2222/cs3099group-be-4/project-code... (diff) | |
| download | medicine-e7d3f35c1dfca06f3b60551673099c36dddde6ca.tar.gz medicine-e7d3f35c1dfca06f3b60551673099c36dddde6ca.zip | |
Merge branch ‘trh/gets’ of https://gitlab.cs.st-andrews.ac.uk/cs3099group-be-4/project-code 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; |
