2024-01-22 08:14:57 +00:00
|
|
|
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
|
|
|
|
2024-01-22 08:14:57 +00:00
|
|
|
return kindBoxReq, err
|
|
|
|
}
|