package person import ( ecore "simrs-vx/internal/domain/base-entities/core" 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" erp "simrs-vx/internal/domain/references/person" "time" ) type Person struct { ecore.Main // adjust this according to the needs Name string `json:"name" gorm:"not null;size:150"` BirthDate *time.Time `json:"birthDate,omitempty"` BirthRegency_Code *string `json:"birthRegency_code" gorm:"size:4"` Gender_Code *erp.GenderCode `json:"gender_code" gorm:"size:10"` ResidentIdentityNumber *string `json:"residentIdentityNumber" gorm:"size:16"` Religion_Code *erp.ReligionCode `json:"religion_code" gorm:"size:10"` Education_Code *erp.EducationCode `json:"education_code" gorm:"size:10"` Ocupation_Code *erp.OcupationCode `json:"occupation_code" gorm:"size:15"` Ocupation_Name *string `json:"occupation_name" gorm:"size:50"` Ethnic_Code *string `json:"ethnic_code" gorm:"size:20"` Ethnic *ee.Ethnic `json:"ethnic,omitempty" gorm:"foreignKey:Ethnic_Code;references:Code"` Addresses *[]epa.PersonAddress `json:"addresses" gorm:"foreignKey:Person_Id"` Contacts *[]epc.PersonContact `json:"contacts" gorm:"foreignKey:Person_Id"` }