All files / project-code/src/db/model UserJoinsProject.ts

55% Statements 11/20
100% Branches 0/0
0% Functions 0/5
71.43% Lines 10/14
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 281x 1x   1x 1x     1x     1x       1x       1x       1x     1x    
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();
}