blob: 230e1dda8ba5bed6105439a0c6e916dbe588552f (
plain) (
blame)
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
|
import {Table, Model, Column, ForeignKey, CreatedAt, BelongsTo} from 'sequelize-typescript';
import { default as User } from './User';
import { default as Project } from './Project';
import { default as ContributorGroup } from './UserGroup';
@Table
export default class UserJoinsProject extends Model<UserJoinsProject> {
@ForeignKey(() => User)
@Column
username: string;
@ForeignKey(() => Project)
@Column
projectName: string;
@CreatedAt
@Column
joinDate: Date;
@ForeignKey(() => ContributorGroup)
@Column
contributorGroupId: number;
@BelongsTo(() => ContributorGroup)
contributorGroup: ContributorGroup;
}
|