partner_sub_account.go
652 字节
package domain
//合伙人子账号
type PartnerSubAccount struct {
Id int64 `json:"id"`
Account string `json:"account"`
Password string `json:"password"`
PartnerId int64 `json:"partnerId"` //绑定合伙人账号
}
type PartnerSubAccountRepository interface {
Save(dm *PartnerSubAccount) (*PartnerSubAccount, error)
Remove(dm *PartnerSubAccount) (*PartnerSubAccount, error)
FindOne(queryOptions map[string]interface{}) (*PartnerSubAccount, error)
Find(queryOptions map[string]interface{}) (int64, []*PartnerSubAccount, error)
}
func (m *PartnerSubAccount) Identify() interface{} {
if m.Id == 0 {
return nil
}
return m.Id
}