undertaker.go 1.4 KB
package domain

// Undertaker 共创合约承接方值对象
type Undertaker struct {
	// 承接人记录ID
	UndertakerId int64 `json:"undertakerId,string"`
	// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
	UserId int64 `json:"userId,string"`
	// 用户基本id
	UserBaseId int64 `json:"userBaseId,string"`
	// 共创合约编号
	CooperationContractNumber string `json:"cooperationContractNumber"`
	// 共创合约ID
	CooperationContractId int64 `json:"cooperationContractId"`
	// 用户所属组织机构
	Org *Org `json:"org"`
	// 用户关联的组织机构
	Orgs []*Org `json:"orgs"`
	// 用户所属的部门
	Department *Department `json:"department"`
	// 用户角色
	Roles []*Role `json:"role"`
	// 冗余字段,jsonb格式,不限制存放内容
	UserInfo *UserInfo `json:"userInfo"`
	// 用户类型,1员工,2共创用户,3公开
	UserType int32 `json:"userType"`
	// 用户姓名
	UserName string `json:"userName"`
	// 用户手机号
	UserPhone string `json:"userPhone"`
	// 推荐人
	Referrer *Referrer `json:"referrer"`
	// 关联业务员
	Salesman *Salesman `json:"salesman"`
	// 状态
	Status int32 `json:"status"`
	// 公司
	Company *Company `json:"company"`
	// 合同附件
	ContractAttachment []*Attachment `json:"contractAttachment"`
}

func (undertaker *Undertaker) Identify() interface{} {
	if undertaker.UndertakerId == 0 {
		return nil
	}
	return undertaker.UndertakerId
}