exchange_cash_person.go 1020 字节
package domain

// 参与兑换现金人员
type ExchangeCashPerson struct {
	ExchangeCashPersonId   int64         `json:"employeeId"`   // 兑换人员ID
	CompanyId              int64         `json:"companyId"`    // 公司id
	ExchangeCashPersonInfo *EmployeeInfo `json:"employeeInfo"` // 兑换人员信息
	ExchangedSuMoney       float64       `json:"suMoney"`      // 已兑换的素币
	ExchangedCash          float64       `json:"cash"`         // 已兑换的现金
}

type ExchangeCashPersonRepository interface {
	Save(exchangeCashPerson *ExchangeCashPerson) (*ExchangeCashPerson, error)
	Remove(exchangeCashPerson *ExchangeCashPerson) (*ExchangeCashPerson, error)
	FindOne(queryOptions map[string]interface{}) (*ExchangeCashPerson, error)
	Find(queryOptions map[string]interface{}) (int64, []*ExchangeCashPerson, error)
}

func (exchangeCashPerson *ExchangeCashPerson) Identity() interface{} {
	if exchangeCashPerson.ExchangeCashPersonId == 0 {
		return nil
	}
	return exchangeCashPerson.ExchangeCashPersonId
}