blob: 19880344fef3a282c8a96a75abda6c86e0dbec38 (
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
|
import * from 'sequelize-typescript';
@Table
export default class User extends Model<User> {
@Column
@PrimaryKey
username: string;
@Column
@NotNull
password: string;
@Column
@ForeignKey(() => UserGroup)
userGroupId: number;
@BelongsTo(() => UserGroup)
userGroup: UserGroup;
@BelongsToMany(() => Project, () => UserJoinsProject)
projects: Project[];
@CreatedAt
creationDate: Date;
}
|