审查视图

pkg/infrastructure/pg/models/user.go 789 字节
tangxvhui authored
1 2 3 4 5
package models

import "time"

type User struct {
tangxvhui authored
6 7 8 9 10 11 12
	tableName    struct{}   `pg:"user"`
	Id           int64      `pg:"pk:id"` // 用户Id
	Account      string     // 用户账号
	AvatarUrl    string     // 用户头像URL
	CompanyId    int64      // 公司编号
	AdminType    int        // 1普通员工  2 主管理员
	Name         string     // 用户姓名
13
	Email        string     // 邮箱
tangxvhui authored
14
	Status       int        // 用户状态(1正常 2禁用)
庄敏学 authored
15 16
	DepartmentId []int      // 用户归属的部门
	PositionId   []int      // 用户职位
17
	EntryTime    string     //入职日期
郑周 authored
18
	ParentId     int64      `pg:",use_zero"` // 上级ID
庄敏学 authored
19 20 21
	CreatedAt    time.Time  // 创建时间
	UpdatedAt    time.Time  // 更新时间
	DeletedAt    *time.Time `pg:",soft_delete"` // 删除时间
tangxvhui authored
22
}