blob: 2bf7ea0cd1d0463f8bdc1d28a5a5262d95835652 (
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;
@ForeignKey(() => ContributorGroup)
@Column
public contributorGroupId!: number;
@BelongsTo(() => ContributorGroup)
public contributorGroup?: ContributorGroup;
}
|