feat(organization): added update org address to http api and to org details settings view, closes #2672

This commit is contained in:
Torkel Ödegaard
2015-09-08 14:22:44 +02:00
parent daf64421f2
commit fad1d4cf98
8 changed files with 212 additions and 59 deletions
+10
View File
@@ -0,0 +1,10 @@
package models
type Address struct {
Address1 string `json:"address1"`
Address2 string `json:"address2"`
City string `json:"city"`
ZipCode string `json:"zipCode"`
State string `json:"state"`
Country string `json:"country"`
}
+21 -2
View File
@@ -15,6 +15,14 @@ type Org struct {
Id int64
Version int
Name string
Address1 string
Address2 string
City string
ZipCode string
State string
Country string
Created time.Time
Updated time.Time
}
@@ -35,8 +43,13 @@ type DeleteOrgCommand struct {
}
type UpdateOrgCommand struct {
Name string `json:"name" binding:"Required"`
OrgId int64 `json:"-"`
Name string
OrgId int64
}
type UpdateOrgAddressCommand struct {
OrgId int64
Address
}
type GetOrgByIdQuery struct {
@@ -63,6 +76,12 @@ type OrgDTO struct {
Name string `json:"name"`
}
type OrgDetailsDTO struct {
Id int64 `json:"id"`
Name string `json:"name"`
Address Address `json:"address"`
}
type UserOrgDTO struct {
OrgId int64 `json:"orgId"`
Name string `json:"name"`