diff options
Diffstat (limited to 'src/db/model/UserJoinsProject.ts')
| -rw-r--r-- | src/db/model/UserJoinsProject.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/db/model/UserJoinsProject.ts b/src/db/model/UserJoinsProject.ts new file mode 100644 index 0000000..36a1591 --- /dev/null +++ b/src/db/model/UserJoinsProject.ts @@ -0,0 +1,27 @@ +import { default as Project } from './Project'; +import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Table + } from 'sequelize-typescript'; +import { default as User } from './User'; +import { default as ContributorGroup } from './UserGroup'; + +@Table +export default class UserJoinsProject extends Model<UserJoinsProject> { + @ForeignKey(() => User) + @Column + public username: string = ''; + + @ForeignKey(() => Project) + @Column + public projectName: string = ''; + + @CreatedAt + @Column + public joinDate: Date = new Date(); + + @ForeignKey(() => ContributorGroup) + @Column + public contributorGroupId: number = 0; + + @BelongsTo(() => ContributorGroup) + public contributorGroup: ContributorGroup = new ContributorGroup(); +} |
