blob: 7fe1bd65afbc8ef1b5373bedf0152f8f9884c97b (
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
28
|
import { default as Project } from './Project';
import { BelongsTo, Column, CreatedAt, DataType, ForeignKey, Model, Table
} from 'sequelize-typescript';
import { default as User } from './User';
import { default as ContributorGroup } from './ContributorGroup';
@Table
export default class UserJoinsProject extends Model<UserJoinsProject> {
@ForeignKey(() => User)
@Column
public username!: string;
@ForeignKey(() => Project)
@Column
public projectName!: string;
@ForeignKey(() => ContributorGroup)
@Column
public contributorGroupName!: string;
@CreatedAt
@Column(DataType.DATE)
public joinDate!: Date;
@BelongsTo(() => ContributorGroup)
public contributorGroup?: ContributorGroup;
}
|