42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
|
package api
|
||
|
|
||
|
import (
|
||
|
"enterprise/common/model"
|
||
|
"github.com/smbrave/goutil"
|
||
|
"github.com/spf13/cast"
|
||
|
)
|
||
|
|
||
|
type Payment struct {
|
||
|
Id string `json:"id"`
|
||
|
Username string `json:"username" `
|
||
|
SpNo string `json:"sp_no"`
|
||
|
ApplyTime string `json:"apply_time"`
|
||
|
CostSubject string `json:"cost_subject"`
|
||
|
PaymentType string `json:"payment_type"`
|
||
|
PaymentDate string `json:"payment_date"`
|
||
|
PaymentAmount string `json:"payment_amount"`
|
||
|
PaymentRemark string `json:"payment_remark"`
|
||
|
PaymentPayer string `json:"payment_payer"`
|
||
|
PaymentPayee string `json:"payment_payee"`
|
||
|
CreateTime string `json:"create_time"`
|
||
|
UpdateTime string `json:"update_time"`
|
||
|
}
|
||
|
|
||
|
type ListPaymentReq struct {
|
||
|
BaseRequest
|
||
|
StartDay string `from:"start_day"`
|
||
|
EndDay string `from:"end_day"`
|
||
|
Username string `from:"username"`
|
||
|
Payer string `from:"payer"`
|
||
|
Payee string `from:"payee"`
|
||
|
}
|
||
|
|
||
|
func (p *Payment) From(m *model.ApprovalPayment) {
|
||
|
goutil.CopyStruct(p, m)
|
||
|
p.Id = cast.ToString(m.Id)
|
||
|
p.CreateTime = goutil.TimeToDateTime(m.CreateTime)
|
||
|
p.UpdateTime = goutil.TimeToDateTime(m.UpdateTime)
|
||
|
p.PaymentAmount = cast.ToString(m.PaymentAmount)
|
||
|
|
||
|
}
|