blob: 36a1591ff6a7533aac4f289076facfafdac1e265 (
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
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();
}
|