common.go 3.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)"`
	UserId        int64  `json:"-"  orm:"column(user_id)"`
}

//部门和人员混合
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"`
	Status        int8   `json:"status"`
}

type RoleHasUser struct {
	UserCompanyId int64  `json:"user_company_id"  orm:"column(user_company_id)"`
	Name          string `json:"name"  orm:"column(nick_name)"`
}

//下拉选择框的内容模板 -机会二级分类
type TemplateBase struct {
	TemplateId   int64  `orm:"column(template_id)" json:"template_id"`
	ChanceTypeId int64  `orm:"column(chance_type_id)" json:"chance_type_id"`
	Name         string `orm:"column(name)" json:"name"`
}

//下拉选择框的内容机会分类 - 机会一级分类
type ChanceTypeBase struct {
	ChanceTypeId int64  `orm:"column(chance_type_id)" json:"chance_type_id"`
	Name         string `orm:"column(name)" json:"name"`
}

type SelectCompanyUserListItem struct {
	UserCompanyId  int64  `json:"user_company_id" orm:"column(id)"`
	NickName       string `json:"nick_name" orm:"column(nick_name)"`
	DepartmentId   int64  `json:"department_id" orm:"column(department_id)"`
	DepartmentName string `json:"department_name" orm:"column(department_name)"`
}

//下拉选择公司员工
type SelectCompanyUserList struct {
	ResponsePageInfo
	List []SelectCompanyUserListItem `json:"list"`
}

type SelectChanceListItem struct {
	Id                string `json:"id"  orm:"column(id)"`
	DepartmentId      int64  `json:"deparment_id" orm:"column(department_id)"`
	DepartmentName    string `json:"department_name" orm:"-"`
	ChanceTypeId      int    `json:"chance_type_id" orm:"column(chance_type_id)"`
	ChanceTypeName    string `json:"chance_type_name" orm:"-"`
	AuditTemplateId   int64  `json:"audit_template_id" orm:"column(audit_template_id)"`
	AuditTemplateName string `json:"audit_template_name" orm:"-"`
	UserId            int64  `json:"user_id" orm:"column(user_id)"`
	UserName          string `json:"user_name" orm:"column(-)"`
	Code              string `json:"code" orm:"column(code)"`
	CreateAt          string `json:"create_at" orm:"column(create_at)"`
}

//下拉选择机会
type SelectChanceList struct {
	ResponsePageInfo
	List []SelectChanceListItem `json:"list"`
}