exchange_cash_person_list.go 1.2 KB
package domain

// 参与兑换现金人员
type ExchangeCashPersonList struct {
	ExchangeCashPersonListId int64     `json:"employeeId"`         // 兑换人员ID
	CompanyId                int64     `json:"companyId"`          // 公司id
	ExchangeCashActivityId   int64     `json:"exchangeActivityId"` // 参与的兑换活动id
	ExchangeCashPerson       *Employee `json:"employeeInfo"`       // 兑换人员信息
	ExchangedSuMoney         float64   `json:"suMoney"`            // 已兑换的素币
	ExchangedCash            float64   `json:"cash"`               // 已兑换的现金
}

type ExchangeCashPersonListRepository interface {
	Save(exchangeCashPersonList *ExchangeCashPersonList) (*ExchangeCashPersonList, error)
	Remove(exchangeCashPersonList *ExchangeCashPersonList) (*ExchangeCashPersonList, error)
	FindOne(queryOptions map[string]interface{}) (*ExchangeCashPersonList, error)
	Find(queryOptions map[string]interface{}) (int64, []*ExchangeCashPersonList, error)
}

func (exchangeCashPersonList *ExchangeCashPersonList) Identity() interface{} {
	if exchangeCashPersonList.ExchangeCashPersonListId == 0 {
		return nil
	}
	return exchangeCashPersonList.ExchangeCashPersonListId
}