forked from ebhomengo/niki
"fix(repository):fixed scanner benefactor"
This commit is contained in:
parent
16b8093e8c
commit
fc040db1c0
237
mise.log
237
mise.log
|
@ -4037,3 +4037,240 @@
|
||||||
"MISE_TRACE": "0",
|
"MISE_TRACE": "0",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
17:23:42 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-not-found -s bash -- cls
|
||||||
|
17:23:42 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:23:42 [DEBUG] mise::toolset::builder: Toolset: go@1.21.4
|
||||||
|
17:23:42 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:23:42 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:23:44 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:23:44 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:24:28 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-not-found -s bash -- go
|
||||||
|
17:24:28 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:24:28 [DEBUG] mise::toolset::builder: Toolset: go@1.21.4
|
||||||
|
17:24:28 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:24:28 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:29:15 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:29:15 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:30:09 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:30:09 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:30:27 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:30:27 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:30:38 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:30:38 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:31:41 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:31:41 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:31:58 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-not-found -s bash -- cls
|
||||||
|
17:31:58 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:31:58 [DEBUG] mise::toolset::builder: Toolset: go@1.21.4
|
||||||
|
17:31:58 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:31:58 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
17:32:00 [DEBUG] mise::cli: ARGS: /home/amir/.local/bin/mise hook-env -s bash
|
||||||
|
17:32:00 [DEBUG] mise::config: Config {
|
||||||
|
Config Files: [
|
||||||
|
"/mnt/d/Meta Course - Practice/Golang/niki/.mise.toml",
|
||||||
|
],
|
||||||
|
Env: {
|
||||||
|
"GO_ENV": "GOLANG_MISE",
|
||||||
|
"MISE_USE_TOML": "1",
|
||||||
|
"RUST_BACKTRACE": "0",
|
||||||
|
"MISE_VERBOSE": "0",
|
||||||
|
"MISE_LOG_FILE": "./mise.log",
|
||||||
|
"MISE_LOG_FILE_LEVEL": "debug",
|
||||||
|
"MISE_DEBUG": "0",
|
||||||
|
"MISE_QUIET": "1",
|
||||||
|
"MISE_ERORR": "1",
|
||||||
|
"MISE_TRACE": "0",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import (
|
||||||
errmsg "git.gocasts.ir/ebhomengo/niki/pkg/err_msg"
|
errmsg "git.gocasts.ir/ebhomengo/niki/pkg/err_msg"
|
||||||
richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
|
richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
|
||||||
"git.gocasts.ir/ebhomengo/niki/repository/mysql"
|
"git.gocasts.ir/ebhomengo/niki/repository/mysql"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (d DB) IsExistBenefactorByPhoneNumber(ctx context.Context, phoneNumber string) (bool, entity.Benefactor, error) {
|
func (d DB) IsExistBenefactorByPhoneNumber(ctx context.Context, phoneNumber string) (bool, entity.Benefactor, error) {
|
||||||
|
@ -56,16 +57,16 @@ func (d *DB) IsExistBenefactorByID(ctx context.Context, id uint) (bool, error) {
|
||||||
|
|
||||||
func scanBenefactor(scanner mysql.Scanner) (entity.Benefactor, error) {
|
func scanBenefactor(scanner mysql.Scanner) (entity.Benefactor, error) {
|
||||||
|
|
||||||
|
var createdAt, updatedAt time.Time
|
||||||
var benefactor entity.Benefactor
|
var benefactor entity.Benefactor
|
||||||
// TODO - use db model and mapper between entity and db model OR use this approach
|
// TODO - use db model and mapper between entity and db model OR use this approach
|
||||||
|
|
||||||
var benefactorNullableFields nullableFields
|
var benefactorNullableFields nullableFields
|
||||||
|
|
||||||
err := scanner.Scan(&benefactor.ID, &benefactorNullableFields.firstName,
|
err := scanner.Scan(&benefactor.ID, &benefactorNullableFields.firstName,
|
||||||
&benefactorNullableFields.lastName, &benefactor.PhoneNumber,
|
&benefactorNullableFields.lastName, &benefactor.PhoneNumber, &benefactorNullableFields.description,
|
||||||
&benefactorNullableFields.address, &benefactorNullableFields.description,
|
&benefactorNullableFields.email, &benefactorNullableFields.genderStr,
|
||||||
&benefactorNullableFields.email, &benefactorNullableFields.city, &benefactorNullableFields.genderStr,
|
&benefactorNullableFields.birthdate, &createdAt, &updatedAt)
|
||||||
&benefactorNullableFields.birthdate)
|
|
||||||
|
|
||||||
mapNotNullToBenefactor(benefactorNullableFields, &benefactor)
|
mapNotNullToBenefactor(benefactorNullableFields, &benefactor)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue