Browse Source

Add json tag to Person struct

Rufus Deponian 4 years ago
parent
commit
da4e95c407
1 changed files with 13 additions and 13 deletions
  1. 13 13
      person.go

+ 13 - 13
person.go

@@ -9,19 +9,19 @@ import (
 
 //reform:face_view
 type Person struct {
-	EmpGUID     int     `reform:"EmpGUID"     view:"readonly"`
-	PersonId    *int    `reform:"person_id"   view:"readonly"`
-	Lastname    string  `reform:"SurName"     view:"readonly"`
-	Firstname   string  `reform:"FirstName"   view:"readonly"`
-	Patronymic  *string `reform:"MiddleName"  view:"readonly"`
-	Sex         *int    `reform:"Sex"         view:"readonly"`
-	Id          int     `reform:"_Id"         view:"readonly"`
-	BirthDay    *string `reform:"BirthDay"    view:"readonly"`
-	Citizenship *int    `reform:"Citizenship" view:"readonly"`
-	CitizenType *string `reform:"CitizenType" view:"readonly"`
-	Phone       *string `reform:"Phone"       view:"readonly"`
-	Phone2      *string `reform:"Phone2"      view:"readonly"`
-	Phone3      *string `reform:"Phone3"      view:"readonly"`
+	EmpGUID     int     `reform:"EmpGUID"     view:"readonly" json:"EmpGUID"`
+	PersonId    *int    `reform:"person_id"   view:"readonly" json:"person_id"`
+	Lastname    string  `reform:"SurName"     view:"readonly" json:"SurName"`
+	Firstname   string  `reform:"FirstName"   view:"readonly" json:"FirstName"`
+	Patronymic  *string `reform:"MiddleName"  view:"readonly" json:"MiddleName"`
+	Sex         *int    `reform:"Sex"         view:"readonly" json:"Sex"`
+	Id          int     `reform:"_Id"         view:"readonly" json:"_Id"`
+	BirthDay    *string `reform:"BirthDay"    view:"readonly" json:"BirthDay"`
+	Citizenship *int    `reform:"Citizenship" view:"readonly" json:"Citizenship"`
+	CitizenType *string `reform:"CitizenType" view:"readonly" json:"CitizenType"`
+	Phone       *string `reform:"Phone"       view:"readonly" json:"Phone"`
+	Phone2      *string `reform:"Phone2"      view:"readonly" json:"Phone2"`
+	Phone3      *string `reform:"Phone3"      view:"readonly" json:"Phone3"`
 
 	formulars      Formulars `reform:"-"`
 	formularsReady bool      `reform:"-"`