feat (crud): add person, person-contact, person-address
This commit is contained in:
@@ -6,17 +6,19 @@ type (
|
||||
MaritalStatusCode string
|
||||
ReligionCode string
|
||||
EducationCode string
|
||||
ProfessionCode string
|
||||
OcupationCode string
|
||||
AgeGroupCode string
|
||||
AgeGroupForMedicineCode string
|
||||
RelativeCode string
|
||||
ContactTypeCode string
|
||||
EthnicCode string
|
||||
)
|
||||
|
||||
const (
|
||||
GCMale GenderCode = "male"
|
||||
GCFemale GenderCode = "female"
|
||||
GCOther GenderCode = "other"
|
||||
GCUnknown GenderCode = "unknown"
|
||||
GCMale GenderCode = "male"
|
||||
GCFemale GenderCode = "female"
|
||||
GCNotStated GenderCode = "not-stated"
|
||||
GCUnknown GenderCode = "unknown"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -44,7 +46,6 @@ const (
|
||||
RCHindu ReligionCode = "hindu"
|
||||
RCBudha ReligionCode = "budha"
|
||||
RCKonghucu ReligionCode = "konghucu"
|
||||
RCPenghayat ReligionCode = "penghayat"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -63,12 +64,14 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PCTidakBekerja ProfessionCode = "-"
|
||||
PCPns ProfessionCode = "pns"
|
||||
PCTniPolri ProfessionCode = "tni-polri"
|
||||
PCBumn ProfessionCode = "bumn"
|
||||
PCWiraswasta ProfessionCode = "wiraswasta"
|
||||
PCLainlain ProfessionCode = "lainnya"
|
||||
OCTidakBekerja OcupationCode = "tidak-bekerja"
|
||||
OCPns OcupationCode = "pns"
|
||||
OCTniPolisi OcupationCode = "polisi"
|
||||
OCTni OcupationCode = "tni"
|
||||
OCGuru OcupationCode = "guru"
|
||||
OCWiraswasta OcupationCode = "wiraswasta"
|
||||
OCKarySwasta OcupationCode = "kary-swasta"
|
||||
OCLainlain OcupationCode = "lainnya"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -107,12 +110,19 @@ const (
|
||||
RCMPamanNenek RelativeCode = "nenek"
|
||||
)
|
||||
|
||||
const (
|
||||
CTPhone ContactTypeCode = "phone"
|
||||
CTMPhone ContactTypeCode = "m-phone"
|
||||
CTEmail ContactTypeCode = "email"
|
||||
CTFax ContactTypeCode = "fax"
|
||||
)
|
||||
|
||||
func GetGenderCodes() map[GenderCode]string {
|
||||
return map[GenderCode]string{
|
||||
GCMale: "Laki-laki",
|
||||
GCFemale: "Perempuan",
|
||||
GCOther: "Lainnya",
|
||||
GCUnknown: "Tidak diketahui",
|
||||
GCMale: "Laki-laki",
|
||||
GCFemale: "Perempuan",
|
||||
GCNotStated: "Tidak disebutkan",
|
||||
GCUnknown: "Tidak diketahui",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +156,6 @@ func GetReligionCodes() map[ReligionCode]string {
|
||||
RCHindu: "Hindu",
|
||||
RCBudha: "Budha",
|
||||
RCKonghucu: "Konghucu",
|
||||
RCPenghayat: "Penghayat",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,14 +176,16 @@ func GetEducationCodes() map[EducationCode]string {
|
||||
}
|
||||
}
|
||||
|
||||
func GetProfessions() map[ProfessionCode]string {
|
||||
return map[ProfessionCode]string{
|
||||
PCTidakBekerja: "Tidak Bekerja",
|
||||
PCPns: "PNS",
|
||||
PCTniPolri: "TNI/POLRI",
|
||||
PCBumn: "BUMN",
|
||||
PCWiraswasta: "Pegawai Swasta / Wirausaha",
|
||||
PCLainlain: "Lain-lain",
|
||||
func GetProfessions() map[OcupationCode]string {
|
||||
return map[OcupationCode]string{
|
||||
OCTidakBekerja: "Tidak Bekerja",
|
||||
OCPns: "PNS",
|
||||
OCTniPolisi: "Polisi",
|
||||
OCTni: "TNI",
|
||||
OCGuru: "Guru",
|
||||
OCWiraswasta: "Wiraswasta",
|
||||
OCKarySwasta: "Kary Swasta",
|
||||
OCLainlain: "Lain-lain",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,6 +231,15 @@ func GetRelativeCodes() map[RelativeCode]string {
|
||||
}
|
||||
}
|
||||
|
||||
func GetContactTypeCodes() map[ContactTypeCode]string {
|
||||
return map[ContactTypeCode]string{
|
||||
CTPhone: "Telepon",
|
||||
CTMPhone: "Telepon Seluler",
|
||||
CTEmail: "Email",
|
||||
CTFax: "Fax",
|
||||
}
|
||||
}
|
||||
|
||||
func (obj GenderCode) String() string {
|
||||
return GetGenderCodes()[obj]
|
||||
}
|
||||
@@ -239,7 +259,7 @@ func (obj EducationCode) String() string {
|
||||
return GetEducationCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj ProfessionCode) String() string {
|
||||
func (obj OcupationCode) String() string {
|
||||
return GetProfessions()[obj]
|
||||
}
|
||||
|
||||
@@ -250,3 +270,7 @@ func (obj AgeGroupCode) String() string {
|
||||
func (obj RelativeCode) String() string {
|
||||
return GetRelativeCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj ContactTypeCode) String() string {
|
||||
return GetContactTypeCodes()[obj]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user