blob: 8b0a72c267aeffd40458095c45ec9556026bcdd4 (
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
29
30
31
|
import * from 'sequelize-typescript';
import { default as UserGroup } from './UserGroup';
import { default as Project } from './Project';
import { default as UserJoinsProject } './UserJoinsProject';
import { default as File } './File';
@Table
export default class User extends Model<User> {
@Column
@PrimaryKey
username: string;
@Column
password: string;
@Column
@ForeignKey(() => UserGroup)
userGroupId: number;
@BelongsTo(() => UserGroup)
userGroup: UserGroup;
@BelongsToMany(() => Project, () => UserJoinsProject)
projects: Project[];
@HasMany(() => File)
createdFiles: File[];
@CreatedAt
creationDate: Date;
}
|