forked from ebhomengo/niki
20 lines
684 B
Go
20 lines
684 B
Go
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)
|
|
return kindBoxReq, err
|
|
}
|