initial commit 2
This commit is contained in:
69
application/viewmodel/organization.go
Normal file
69
application/viewmodel/organization.go
Normal file
@@ -0,0 +1,69 @@
|
||||
package viewmodel
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type OrganizationType struct {
|
||||
ID int64 `json:"-"`
|
||||
Name string `json:"name"`
|
||||
Key string `json:"key"`
|
||||
Description string `json:"desc,omitempty"`
|
||||
Created time.Time `json:"-"`
|
||||
Updated time.Time `json:"-"`
|
||||
}
|
||||
|
||||
type Organization struct {
|
||||
ID int64 `json:"-"`
|
||||
UUID string `json:"id"`
|
||||
Type OrganizationType `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"desc,omitempty"`
|
||||
ReferenceID int64 `json:"-"`
|
||||
ParentID int64 `json:"-"`
|
||||
Main bool `json:"main"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
Active bool `json:"active"`
|
||||
Blocked bool `json:"blocked"`
|
||||
Suspended bool `json:"suspended"`
|
||||
Author User `json:"author"`
|
||||
LastEditor User `json:"last_editor"`
|
||||
Contacts []OrganizationContact `json:"contacts"`
|
||||
Addresses []OrganizationAddress `json:"addresses"`
|
||||
ChildOrgs []Organization `json:"childs,omitempty"`
|
||||
Parent *Organization `json:"parent,omitempty"`
|
||||
Reference interface{} `json:"reference,omitempty"`
|
||||
}
|
||||
|
||||
type OrganizationContact struct {
|
||||
ID int64 `json:"-"`
|
||||
UUID string `json:"id"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
Type ContactType `json:"type"`
|
||||
Contact string `json:"contact"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"desc"`
|
||||
Created time.Time `json:"created"`
|
||||
CreatedUser User `json:"author"`
|
||||
Updated time.Time `json:"updated"`
|
||||
UpdatedUser User `json:"last_editor"`
|
||||
Active bool `json:"active"`
|
||||
}
|
||||
|
||||
type OrganizationAddress struct {
|
||||
ID int64 `json:"-"`
|
||||
UUID string `json:"id"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
InternalID string `json:"internal_id"`
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
Description string `json:"desc"`
|
||||
Latitude float64 `json:"lat"`
|
||||
Longitude float64 `json:"long"`
|
||||
Created time.Time `json:"created"`
|
||||
CreatedUser User `json:"author"`
|
||||
Updated time.Time `json:"updated"`
|
||||
UpdatedUser User `json:"last_editor"`
|
||||
Active bool `json:"active"`
|
||||
}
|
||||
Reference in New Issue
Block a user