feat (person): add coms issue and disability field
This commit is contained in:
@@ -13,22 +13,24 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type CreateDto struct {
|
type CreateDto struct {
|
||||||
Name string `json:"name" validate:"maxLength=150"`
|
Name string `json:"name" validate:"maxLength=150"`
|
||||||
FrontTitle *string `json:"frontTitle" validate:"maxLength=50"`
|
FrontTitle *string `json:"frontTitle" validate:"maxLength=50"`
|
||||||
EndTitle *string `json:"endTitle" validate:"maxLength=50"`
|
EndTitle *string `json:"endTitle" validate:"maxLength=50"`
|
||||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||||
BirthRegency_Code *string `json:"birthRegency_code" validate:"maxLength=4"`
|
BirthRegency_Code *string `json:"birthRegency_code" validate:"maxLength=4"`
|
||||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||||
ResidentIdentityNumber *string `json:"residentIdentityNumber" validate:"nik;maxLength=16"`
|
ResidentIdentityNumber *string `json:"residentIdentityNumber" validate:"nik;maxLength=16"`
|
||||||
PassportNumber *string `json:"passportNumber" validate:"maxLength=20"`
|
PassportNumber *string `json:"passportNumber" validate:"maxLength=20"`
|
||||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber" validate:"maxLength=20"`
|
DrivingLicenseNumber *string `json:"drivingLicenseNumber" validate:"maxLength=20"`
|
||||||
Religion_Code *erp.ReligionCode `json:"religion_code" validate:"maxLength=10"`
|
Religion_Code *erp.ReligionCode `json:"religion_code" validate:"maxLength=10"`
|
||||||
Education_Code *erp.EducationCode `json:"education_code" validate:"maxLength=10"`
|
Education_Code *erp.EducationCode `json:"education_code" validate:"maxLength=10"`
|
||||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code" validate:"maxLength=15"`
|
Ocupation_Code *erp.OcupationCode `json:"occupation_code" validate:"maxLength=15"`
|
||||||
Ocupation_Name *string `json:"occupation_name" validate:"maxLength=50"`
|
Ocupation_Name *string `json:"occupation_name" validate:"maxLength=50"`
|
||||||
Nationality *string `json:"nationality" validate:"maxLength=50"`
|
Nationality *string `json:"nationality" validate:"maxLength=50"`
|
||||||
Ethnic_Code *string `json:"ethnic_code" validate:"maxLength=20"`
|
Ethnic_Code *string `json:"ethnic_code" validate:"maxLength=20"`
|
||||||
Language_Code *string `json:"language_code" validate:"maxLength=10"`
|
Language_Code *string `json:"language_code" validate:"maxLength=10"`
|
||||||
|
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||||
|
Disability *string `json:"disability" validate:"maxLength=100"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReadListDto struct {
|
type ReadListDto struct {
|
||||||
@@ -39,22 +41,24 @@ type ReadListDto struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FilterDto struct {
|
type FilterDto struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
FrontTitle *string `json:"frontTitle"`
|
FrontTitle *string `json:"frontTitle"`
|
||||||
EndTitle *string `json:"endTitle"`
|
EndTitle *string `json:"endTitle"`
|
||||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||||
BirthRegency_Code *string `json:"birthRegency-code"`
|
BirthRegency_Code *string `json:"birthRegency-code"`
|
||||||
Gender_Code *erp.GenderCode `json:"gender-code"`
|
Gender_Code *erp.GenderCode `json:"gender-code"`
|
||||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||||
PassportNumber *string `json:"passportNumber"`
|
PassportNumber *string `json:"passportNumber"`
|
||||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
|
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
|
||||||
Religion_Code *erp.ReligionCode `json:"religion-code"`
|
Religion_Code *erp.ReligionCode `json:"religion-code"`
|
||||||
Education_Code *erp.EducationCode `json:"education-code"`
|
Education_Code *erp.EducationCode `json:"education-code"`
|
||||||
Ocupation_Code *erp.OcupationCode `json:"occupation-code"`
|
Ocupation_Code *erp.OcupationCode `json:"occupation-code"`
|
||||||
Ocupation_Name *string `json:"occupation-name"`
|
Ocupation_Name *string `json:"occupation-name"`
|
||||||
Nationality *string `json:"nationality"`
|
Nationality *string `json:"nationality"`
|
||||||
Ethnic_Code *string `json:"ethnic-code"`
|
Ethnic_Code *string `json:"ethnic-code"`
|
||||||
Language_Code *string `json:"language-code"`
|
Language_Code *string `json:"language-code"`
|
||||||
|
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||||
|
Disability *string `json:"disability"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReadDetailDto struct {
|
type ReadDetailDto struct {
|
||||||
@@ -82,58 +86,62 @@ type MetaDto struct {
|
|||||||
|
|
||||||
type ResponseDto struct {
|
type ResponseDto struct {
|
||||||
ecore.Main
|
ecore.Main
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
FrontTitle *string `json:"frontTitle"`
|
FrontTitle *string `json:"frontTitle"`
|
||||||
EndTitle *string `json:"endTitle"`
|
EndTitle *string `json:"endTitle"`
|
||||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||||
BirthRegency_Code *string `json:"birthRegency_code"`
|
BirthRegency_Code *string `json:"birthRegency_code"`
|
||||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||||
PassportNumber *string `json:"passportNumber"`
|
PassportNumber *string `json:"passportNumber"`
|
||||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
|
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
|
||||||
Religion_Code *erp.ReligionCode `json:"religion_code"`
|
Religion_Code *erp.ReligionCode `json:"religion_code"`
|
||||||
Education_Code *erp.EducationCode `json:"education_code"`
|
Education_Code *erp.EducationCode `json:"education_code"`
|
||||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code"`
|
Ocupation_Code *erp.OcupationCode `json:"occupation_code"`
|
||||||
Ocupation_Name *string `json:"occupation_name"`
|
Ocupation_Name *string `json:"occupation_name"`
|
||||||
Nationality *string `json:"nationality"`
|
Nationality *string `json:"nationality"`
|
||||||
Ethnic_Code *string `json:"ethnic_code"`
|
Ethnic_Code *string `json:"ethnic_code"`
|
||||||
Ethnic *ee.Ethnic `json:"ethnic,omitempty"`
|
Ethnic *ee.Ethnic `json:"ethnic,omitempty"`
|
||||||
Addresses *[]epa.PersonAddress `json:"addresses,omitempty"`
|
Addresses *[]epa.PersonAddress `json:"addresses,omitempty"`
|
||||||
Contacts *[]epc.PersonContact `json:"contacts,omitempty"`
|
Contacts *[]epc.PersonContact `json:"contacts,omitempty"`
|
||||||
Relatives *[]epr.PersonRelative `json:"relatives,omitempty"`
|
Relatives *[]epr.PersonRelative `json:"relatives,omitempty"`
|
||||||
Language_Code *string `json:"language_code"`
|
Language_Code *string `json:"language_code"`
|
||||||
ResidentIdentityFileUrl *string `json:"residentIdentityFileUrl"`
|
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||||
PassportFileUrl *string `json:"passportFileUrl"`
|
Disability *string `json:"disability"`
|
||||||
DrivingLicenseFileUrl *string `json:"drivingLicenseFileUrl"`
|
ResidentIdentityFileUrl *string `json:"residentIdentityFileUrl"`
|
||||||
FamilyIdentityFileUrl *string `json:"familyIdentityFileUrl"`
|
PassportFileUrl *string `json:"passportFileUrl"`
|
||||||
|
DrivingLicenseFileUrl *string `json:"drivingLicenseFileUrl"`
|
||||||
|
FamilyIdentityFileUrl *string `json:"familyIdentityFileUrl"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Person) ToResponse() ResponseDto {
|
func (d *Person) ToResponse() ResponseDto {
|
||||||
resp := ResponseDto{
|
resp := ResponseDto{
|
||||||
Name: d.Name,
|
Name: d.Name,
|
||||||
FrontTitle: d.FrontTitle,
|
FrontTitle: d.FrontTitle,
|
||||||
EndTitle: d.EndTitle,
|
EndTitle: d.EndTitle,
|
||||||
BirthDate: d.BirthDate,
|
BirthDate: d.BirthDate,
|
||||||
BirthRegency_Code: d.BirthRegency_Code,
|
BirthRegency_Code: d.BirthRegency_Code,
|
||||||
Gender_Code: d.Gender_Code,
|
Gender_Code: d.Gender_Code,
|
||||||
ResidentIdentityNumber: d.ResidentIdentityNumber,
|
ResidentIdentityNumber: d.ResidentIdentityNumber,
|
||||||
PassportNumber: d.PassportNumber,
|
PassportNumber: d.PassportNumber,
|
||||||
DrivingLicenseNumber: d.DrivingLicenseNumber,
|
DrivingLicenseNumber: d.DrivingLicenseNumber,
|
||||||
Religion_Code: d.Religion_Code,
|
Religion_Code: d.Religion_Code,
|
||||||
Education_Code: d.Education_Code,
|
Education_Code: d.Education_Code,
|
||||||
Ocupation_Code: d.Ocupation_Code,
|
Ocupation_Code: d.Ocupation_Code,
|
||||||
Ocupation_Name: d.Ocupation_Name,
|
Ocupation_Name: d.Ocupation_Name,
|
||||||
Nationality: d.Nationality,
|
Nationality: d.Nationality,
|
||||||
Ethnic_Code: d.Ethnic_Code,
|
Ethnic_Code: d.Ethnic_Code,
|
||||||
Ethnic: d.Ethnic,
|
Ethnic: d.Ethnic,
|
||||||
Addresses: d.Addresses,
|
Addresses: d.Addresses,
|
||||||
Contacts: d.Contacts,
|
Contacts: d.Contacts,
|
||||||
Relatives: d.Relatives,
|
Relatives: d.Relatives,
|
||||||
Language_Code: d.Language_Code,
|
Language_Code: d.Language_Code,
|
||||||
ResidentIdentityFileUrl: d.ResidentIdentityFileUrl,
|
CommunicationIssueStatus: d.CommunicationIssueStatus,
|
||||||
PassportFileUrl: d.PassportFileUrl,
|
Disability: d.Disability,
|
||||||
DrivingLicenseFileUrl: d.DrivingLicenseFileUrl,
|
ResidentIdentityFileUrl: d.ResidentIdentityFileUrl,
|
||||||
FamilyIdentityFileUrl: d.FamilyIdentityFileUrl,
|
PassportFileUrl: d.PassportFileUrl,
|
||||||
|
DrivingLicenseFileUrl: d.DrivingLicenseFileUrl,
|
||||||
|
FamilyIdentityFileUrl: d.FamilyIdentityFileUrl,
|
||||||
}
|
}
|
||||||
resp.Main = d.Main
|
resp.Main = d.Main
|
||||||
return resp
|
return resp
|
||||||
|
|||||||
@@ -33,4 +33,6 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Person) {
|
|||||||
data.Nationality = inputSrc.Nationality
|
data.Nationality = inputSrc.Nationality
|
||||||
data.Ethnic_Code = inputSrc.Ethnic_Code
|
data.Ethnic_Code = inputSrc.Ethnic_Code
|
||||||
data.Language_Code = inputSrc.Language_Code
|
data.Language_Code = inputSrc.Language_Code
|
||||||
|
data.CommunicationIssueStatus = inputSrc.CommunicationIssueStatus
|
||||||
|
data.Disability = inputSrc.Disability
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user