customer_service.go
670 字节
package domain
import "time"
type CustomerService struct {
// id
Id int64
// 用户id(合伙人Id)
UserId int64
// IM唯一id
ImId string
// IM颁发的token
ImToken string
// 创建时间
CreateTime time.Time
// 更新时间
UpdateTime time.Time
}
type CustomerServiceRepository interface {
Save(dm *CustomerService) (*CustomerService, error)
Remove(dm *CustomerService) (*CustomerService, error)
FindOne(queryOptions map[string]interface{}) (*CustomerService, error)
Find(queryOptions map[string]interface{}) (int64, []*CustomerService, error)
}
func (m *CustomerService) Identify() interface{} {
if m.Id == 0 {
return nil
}
return m.Id
}