Example #1
0
func (p *User) InitFromJSONObject(obj jsonhelper.JSONObject) {
	p.PersistableModel.InitFromJSONObject(obj)
	p.Role = obj.GetAsInt32("role")
	p.Name = obj.GetAsString("name")
	p.Username = obj.GetAsString("username")
	p.Email = obj.GetAsString("email")
	p.PhoneNumber = obj.GetAsString("phone_number")
	p.Address = obj.GetAsString("address")
	p.ContactId = obj.GetAsString("contact_id")
	p.AllowLogin = obj.GetAsBool("allow_login")
	p.IsPayingUser = obj.GetAsBool("is_paying_user")
	p.Notes = obj.GetAsString("notes")
	p.DisableLoginAt = obj.GetAsInt64("disable_login_at")
}