wip
This commit is contained in:
No files matched your search
@@ -4,7 +4,6 @@ type ReadListDto struct {
|
||||
ReferenceType ReferenceType `json:"-"`
|
||||
PathValue1 string `json:"-"`
|
||||
PathValue2 string `json:"-"`
|
||||
PathValue3 string `json:"-"`
|
||||
}
|
||||
|
||||
type ReferenceType string
|
||||
|
||||
@@ -1 +1,61 @@
|
||||
package vclaimmember
|
||||
|
||||
import ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
|
||||
type CreateDto struct {
|
||||
CardNumber *string `json:"cardNumber" validate:"maxLength=20"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
CardNumber *string `json:"cardNumber"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
CardNumber *string `json:"cardNumber"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
CardNumber *string `json:"cardNumber"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
CardNumber *string `json:"cardNumber"`
|
||||
}
|
||||
|
||||
func (d VclaimMember) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
CardNumber: d.CardNumber,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []VclaimMember) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -13,18 +13,23 @@ import (
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
|
||||
pa "simrs-vx/pkg/auth-helper"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
NewBornStatus bool `json:"newBornStatus"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
PersonRelatives []epr.UpdateDto `json:"personRelatives"`
|
||||
PersonInsurances []epi.UpdateDto `json:"personInsurances"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
NewBornStatus bool `json:"newBornStatus"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
PersonRelatives []epr.UpdateDto `json:"personRelatives"`
|
||||
PersonInsurances []epi.UpdateDto `json:"personInsurances"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
RegisteredBy_User_Name *string `json:"registeredBy_user_name" validate:"maxLength=100"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
|
||||
pa.AuthInfo
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
evm "simrs-vx/internal/domain/bpjs-entities/vclaim-member"
|
||||
ee "simrs-vx/internal/domain/main-entities/ethnic"
|
||||
epa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
epc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
@@ -14,24 +15,27 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name" validate:"maxLength=150"`
|
||||
FrontTitle *string `json:"frontTitle" validate:"maxLength=50"`
|
||||
EndTitle *string `json:"endTitle" validate:"maxLength=50"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code" validate:"maxLength=4"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber" validate:"nik;maxLength=16"`
|
||||
PassportNumber *string `json:"passportNumber" validate:"maxLength=20"`
|
||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber" validate:"maxLength=20"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_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_Name *string `json:"occupation_name" validate:"maxLength=50"`
|
||||
Nationality *string `json:"nationality" validate:"maxLength=50"`
|
||||
Ethnic_Code *string `json:"ethnic_code" validate:"maxLength=20"`
|
||||
Language_Code *string `json:"language_code" validate:"maxLength=10"`
|
||||
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||
Disability *string `json:"disability" validate:"maxLength=100"`
|
||||
Name string `json:"name" validate:"maxLength=150"`
|
||||
FrontTitle *string `json:"frontTitle" validate:"maxLength=50"`
|
||||
EndTitle *string `json:"endTitle" validate:"maxLength=50"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code" validate:"maxLength=4"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber" validate:"nik;maxLength=16"`
|
||||
PassportNumber *string `json:"passportNumber" validate:"maxLength=20"`
|
||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber" validate:"maxLength=20"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_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_Name *string `json:"occupation_name" validate:"maxLength=50"`
|
||||
MaritalStatus_Code *erp.MaritalStatusCode `json:"maritalStatus_code" validate:"maxLength=10"`
|
||||
Confidence *string `json:"confidence" validate:"maxLength=512"`
|
||||
Nationality *string `json:"nationality" validate:"maxLength=50"`
|
||||
Ethnic_Code *string `json:"ethnic_code" validate:"maxLength=20"`
|
||||
Language_Code *string `json:"language_code" validate:"maxLength=10"`
|
||||
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||
Disability *string `json:"disability" validate:"maxLength=100"`
|
||||
VclaimMember_CardNumber *string `json:"vclaimMember_cardNumber" validate:"maxLength=20"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -86,33 +90,36 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Name string `json:"name"`
|
||||
FrontTitle *string `json:"frontTitle"`
|
||||
EndTitle *string `json:"endTitle"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code"`
|
||||
BirthRegency *er.Regency `json:"birthRegency,omitempty"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||
PassportNumber *string `json:"passportNumber"`
|
||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_code"`
|
||||
Education_Code *erp.EducationCode `json:"education_code"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code"`
|
||||
Ocupation_Name *string `json:"occupation_name"`
|
||||
Nationality *string `json:"nationality"`
|
||||
Ethnic_Code *string `json:"ethnic_code"`
|
||||
Ethnic *ee.Ethnic `json:"ethnic,omitempty"`
|
||||
Addresses *[]epa.PersonAddress `json:"addresses,omitempty"`
|
||||
Contacts *[]epc.PersonContact `json:"contacts,omitempty"`
|
||||
Relatives *[]epr.PersonRelative `json:"relatives,omitempty"`
|
||||
Language_Code *string `json:"language_code"`
|
||||
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||
Disability *string `json:"disability"`
|
||||
ResidentIdentityFileUrl *string `json:"residentIdentityFileUrl"`
|
||||
PassportFileUrl *string `json:"passportFileUrl"`
|
||||
DrivingLicenseFileUrl *string `json:"drivingLicenseFileUrl"`
|
||||
FamilyIdentityFileUrl *string `json:"familyIdentityFileUrl"`
|
||||
Name string `json:"name"`
|
||||
FrontTitle *string `json:"frontTitle"`
|
||||
EndTitle *string `json:"endTitle"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code"`
|
||||
BirthRegency *er.Regency `json:"birthRegency,omitempty"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||
PassportNumber *string `json:"passportNumber"`
|
||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_code"`
|
||||
Education_Code *erp.EducationCode `json:"education_code"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code"`
|
||||
Ocupation_Name *string `json:"occupation_name"`
|
||||
MaritalStatus_Code *erp.MaritalStatusCode `json:"maritalStatus_code"`
|
||||
Confidence *string `json:"confidence"`
|
||||
Nationality *string `json:"nationality"`
|
||||
Ethnic_Code *string `json:"ethnic_code"`
|
||||
Ethnic *ee.Ethnic `json:"ethnic,omitempty"`
|
||||
Addresses *[]epa.PersonAddress `json:"addresses,omitempty"`
|
||||
Contacts *[]epc.PersonContact `json:"contacts,omitempty"`
|
||||
Relatives *[]epr.PersonRelative `json:"relatives,omitempty"`
|
||||
Language_Code *string `json:"language_code"`
|
||||
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
|
||||
Disability *string `json:"disability"`
|
||||
ResidentIdentityFileUrl *string `json:"residentIdentityFileUrl"`
|
||||
PassportFileUrl *string `json:"passportFileUrl"`
|
||||
DrivingLicenseFileUrl *string `json:"drivingLicenseFileUrl"`
|
||||
FamilyIdentityFileUrl *string `json:"familyIdentityFileUrl"`
|
||||
VclaimMember *evm.VclaimMember `json:"vclaimMember,omitempty"`
|
||||
}
|
||||
|
||||
func (d *Person) ToResponse() ResponseDto {
|
||||
@@ -131,6 +138,8 @@ func (d *Person) ToResponse() ResponseDto {
|
||||
Education_Code: d.Education_Code,
|
||||
Ocupation_Code: d.Ocupation_Code,
|
||||
Ocupation_Name: d.Ocupation_Name,
|
||||
MaritalStatus_Code: d.MaritalStatus_Code,
|
||||
Confidence: d.Confidence,
|
||||
Nationality: d.Nationality,
|
||||
Ethnic_Code: d.Ethnic_Code,
|
||||
Ethnic: d.Ethnic,
|
||||
@@ -144,6 +153,7 @@ func (d *Person) ToResponse() ResponseDto {
|
||||
PassportFileUrl: d.PassportFileUrl,
|
||||
DrivingLicenseFileUrl: d.DrivingLicenseFileUrl,
|
||||
FamilyIdentityFileUrl: d.FamilyIdentityFileUrl,
|
||||
VclaimMember: d.VclaimMember,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
Reference in New Issue
Block a user