fonchain-artshow/pkg/serializer/show_apply.go

35 lines
737 B
Go
Raw Normal View History

2022-09-21 06:30:52 +00:00
package serializer
import (
"fonchain-artshow/cmd/model"
2022-09-22 06:23:56 +00:00
"fonchain-artshow/pb/artShow"
2022-09-21 06:30:52 +00:00
)
2022-09-22 06:23:56 +00:00
func BuildShowApply(in *artShow.SaveApplyReq) (out *model.ShowApply) {
2022-09-21 06:30:52 +00:00
out = new(model.ShowApply)
2022-11-11 05:13:19 +00:00
out.ApplyUID = in.ApplyUID
out.Status = int(in.Status)
2022-09-21 06:30:52 +00:00
out.Applicant = in.Applicant
2022-11-11 05:13:19 +00:00
out.ApplicantID = in.ApplicantID
2022-09-21 06:30:52 +00:00
out.Num = in.Num
out.ApplyTime = in.ApplyTime
out.Remark = in.Remark
return
}
2022-09-22 06:23:56 +00:00
func BuildShowApplyRes(in *model.ShowApply) (out *artShow.ApplyDetail) {
out = new(artShow.ApplyDetail)
2022-09-21 06:30:52 +00:00
2022-11-11 05:13:19 +00:00
out.ApplyUID = in.ApplyUID
2022-09-21 06:30:52 +00:00
out.ApplySeq = in.ApplySeq
out.Applicant = in.Applicant
2022-11-11 05:13:19 +00:00
out.ApplicantID = in.ApplicantID
2022-09-21 06:30:52 +00:00
out.Num = in.Num
out.ApplyTime = in.ApplyTime
out.Status = int32(in.Status)
out.Remark = in.Remark
return
}