forked from ebhomengo/niki
1
0
Fork 0
niki/repository/mysql/kind_box_req/scan.go

21 lines
685 B
Go
Raw Normal View History

package mysqlkindboxreq
import (
"git.gocasts.ir/ebhomengo/niki/entity"
"git.gocasts.ir/ebhomengo/niki/repository/mysql"
)
func scanKindBoxReq(scanner mysql.Scanner) (entity.KindBoxReq, error) {
var kindBoxReq entity.KindBoxReq
var kindBoxStatus string
var kindBoxType string
err := scanner.Scan(&kindBoxReq.ID, &kindBoxReq.BenefactorID, &kindBoxType, &kindBoxReq.AddressID, &kindBoxReq.CountRequested, &kindBoxReq.CountAccepted,
&kindBoxReq.Description,
&kindBoxReq.ReferDate, &kindBoxStatus, &kindBoxReq.CreatedAt)
kindBoxReq.Status = entity.MapToKindBoxReqStatus(kindBoxStatus)
kindBoxReq.KindBoxType = entity.MapToKindBoxType(kindBoxType)
2024-01-22 15:21:13 +00:00
return kindBoxReq, err
}