common.go 1.7 KB
package protocol

//RequestPageInfo 分页获取数据
type RequestPageInfo struct {
	PageIndex int `json:"pageNumber"`
	PageSize  int `json:"pageSize"`
}

//ResponsePageInfo 分页信息
type ResponsePageInfo struct {
	TotalPage   int `json:"totalRow"`
	CurrentPage int `json:"pageNumber"`
	// ListData    interface{} `json:"lists"`
}

type ResponseListData struct {
	List interface{} `json:"lists"`
}

// DepartmentBase下拉选择列表-部门
type DepartmentBase struct {
	Id       int64  `json:"id" orm:"column(id)"`
	Name     string `json:"name" orm:"column(name)"`
	ParentId int64  `json:"parentId" orm:"column(parent_id)"`
}

//RoleBase 下拉选择列表-角色
type RoleBase struct {
	Id        int64  `json:"id" orm:"column(id)"`
	Name      string `json:"name" orm:"column(name)"`
	IsDefault int8   `json:"is_default" orm:"column(is_default)"`
	ParentId  int64  `json:"parent_id" orm:"column(pid)"`
	Types     int8   `json:"types" orm:"column(types)"`
}

//PositionBase 下拉选择列表-职位
type PositionBase struct {
	Id       int64  `json:"id" orm:"column(id)"`
	Name     string `json:"name" orm:"column(name)"`
	ParentId int64  `json:"parent_id" orm:"column(parent_id)"`
}

//DepartUserBase 下拉选择列表-部门下的人员
type DepartUserBase struct {
	UserCompanyId int64  `json:"id"  orm:"column(user_company_id)"`
	NickName      string `json:"name"  orm:"column(nick_name)"`
}

//部门和人员混合
type DepartAndUser struct {
	Departments []DepartmentBase   `json:"departments"`
	Members     []DepartmentMember `json:"members"`
}

type UserInfoBase struct {
	UserCompanyId int64  `json:"user_company_id"`
	Name          string `json:"name"`
	Phone         string `json:"phone"`
}