fix error ongoing
This commit is contained in:
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Id *uint `json:"id"`
|
||||
Installation_Code string `json:"installation_code"`
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Id *uint `json:"id"`
|
||||
Installation_Code *string `json:"installation_code"`
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
|
||||
@@ -19,7 +19,7 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Specialist) {
|
||||
|
||||
data.Code = inputSrc.Code
|
||||
data.Name = inputSrc.Name
|
||||
data.Installation_Code = inputSrc.Installation_Code
|
||||
data.Installation_Code = *inputSrc.Installation_Code
|
||||
}
|
||||
|
||||
func setBulkData(input []e.CreateDto) (data []e.Specialist) {
|
||||
@@ -27,7 +27,7 @@ func setBulkData(input []e.CreateDto) (data []e.Specialist) {
|
||||
data = append(data, e.Specialist{
|
||||
Code: i.Code,
|
||||
Name: i.Name,
|
||||
Installation_Code: i.Installation_Code,
|
||||
Installation_Code: *i.Installation_Code,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user