wangzhibo
6 天以前 7dcc2997614f849258091f5d66e648317a40d323
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { BaseEntity } from '../base';
import { Column, Index, Entity } from 'typeorm';
 
/**
 * 系统用户
 */
@Entity('base_sys_user')
export class BaseSysUserEntity extends BaseEntity {
  @Index()
  @Column({ comment: '部门ID', nullable: true })
  departmentId: number;
 
  @Index()
  @Column({ comment: '创建者ID', nullable: true })
  userId: number;
 
  @Column({ comment: '姓名', nullable: true })
  name: string;
 
  @Index({ unique: true })
  @Column({ comment: '用户名', length: 100 })
  username: string;
 
  @Column({ comment: '密码' })
  password: string;
 
  @Column({
    comment: '密码版本, 作用是改完密码,让原来的token失效',
    default: 1,
  })
  passwordV: number;
 
  @Column({ comment: '昵称', nullable: true })
  nickName: string;
 
  @Column({ comment: '头像', nullable: true })
  headImg: string;
 
  @Index()
  @Column({ comment: '手机', nullable: true, length: 20 })
  phone: string;
 
  @Column({ comment: '邮箱', nullable: true })
  email: string;
 
  @Column({ comment: '备注', nullable: true })
  remark: string;
 
  @Column({ comment: '状态 0-禁用 1-启用', default: 1 })
  status: number;
  // 部门名称
  departmentName: string;
  // 角色ID列表
  roleIdList: number[];
 
  @Column({ comment: 'socketId', nullable: true })
  socketId: string;
}