partner_category_info.go 681 字节
package domain

// 合伙人分类信息
type PartnerCategoryInfo struct {
	// 唯一标识
	Id int64 `json:"id"`
	// 名称
	Name string `json:"name"`
	// 编码
	Code string `json:"code"`
}

type PartnerCategoryInfoRepository interface {
	Save(dm *PartnerCategoryInfo) (*PartnerCategoryInfo, error)
	Remove(dm *PartnerCategoryInfo) (*PartnerCategoryInfo, error)
	FindOne(queryOptions map[string]interface{}) (*PartnerCategoryInfo, error)
	Find(queryOptions map[string]interface{}) (int64, []*PartnerCategoryInfo, error)
}

func (m *PartnerCategoryInfo) Identify() interface{} {
	if m.Id == 0 {
		return nil
	}
	return m.Id
}

const (
	Career = iota + 1
	Business
	Develop
	App
)