user.go 693 字节
package domain

import "time"

type User struct {
	Id        int64     // 用户Id
	Account   string    // 用户账号
	AvatarUrl string    // 用户头像URL
	CompanyId int64     // 公司编号
	AdminType int       // 1普通员工 2 主管理员
	Name      string    // 用户姓名
	Status    int       // 用户状态(1正常 2禁用)
	UpdateAt  time.Time // 更新时间
	DeleteAt  *time.Time
	CreateAt  time.Time
}

type UserRepository interface {
	Insert(user *User) (*User, error)
	Update(user *User) (*User, error)
	Remove(user *User) (*User, error)
	FindOne(queryOptions map[string]interface{}) (*User, error)
	Find(queryOptions map[string]interface{}) (int, []*User, error)
}