Documentation ¶
Index ¶
- type AppBlock
- type AppFloor
- type AppNewBlock
- type AppNewFloor
- type AppNewProperty
- type AppNewUnit
- type AppProperty
- type AppPropertyDetail
- type AppUnit
- type AppUpdateProperty
- type Handlers
- func (h *Handlers) Create(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h *Handlers) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h *Handlers) QueryByManagerID(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (h *Handlers) Update(ctx context.Context, w http.ResponseWriter, r *http.Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppNewBlock ¶
type AppNewBlock struct { Name string `json:"name" validate:"required"` Floors []AppNewFloor `json:"floors" validate:"required"` }
type AppNewFloor ¶
type AppNewFloor struct { Name string `json:"name" validate:"required"` Units []AppNewUnit `json:"units" validate:"required"` }
type AppNewProperty ¶
type AppNewProperty struct { ManagerID uuid.UUID `json:"-"` Name string `json:"name" validate:"required"` AddressLevel1ID uint32 `json:"addressLevel1ID" validate:"required,min=1"` AddressLevel2ID uint32 `json:"addressLevel2ID" validate:"required,min=1"` AddressLevel3ID uint32 `json:"addressLevel3ID" validate:"required,min=1"` Street string `json:"street" validate:"required"` Status string `json:"status" validate:"required"` Blocks []AppNewBlock `json:"blocks" validate:"required"` }
func (AppNewProperty) Validate ¶
func (r AppNewProperty) Validate() error
Validate checks the data in the model is considered clean.
type AppNewUnit ¶
type AppNewUnit struct {
Name string `json:"name" validate:"required"`
}
type AppProperty ¶
type AppProperty struct { ID string `json:"id"` ManagerID string `json:"managerID"` Name string `json:"name"` AddressLevel1ID uint32 `json:"addressLevel1ID"` AddressLevel2ID uint32 `json:"addressLevel2ID"` AddressLevel3ID uint32 `json:"addressLevel3ID"` Street string `json:"street"` Status string `json:"status"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` }
type AppPropertyDetail ¶
type AppPropertyDetail struct { ID string `json:"id"` ManagerID string `json:"managerID"` Name string `json:"name"` AddressLevel1ID uint32 `json:"addressLevel1ID"` AddressLevel2ID uint32 `json:"addressLevel2ID"` AddressLevel3ID uint32 `json:"addressLevel3ID"` Street string `json:"street"` Status string `json:"status"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` Blocks []AppBlock `json:"blocks"` }
type AppUpdateProperty ¶
type AppUpdateProperty struct { Name *string `json:"name"` AddressLevel1ID *uint32 `json:"addressLevel1ID" validate:"omitempty,min=1"` AddressLevel2ID *uint32 `json:"addressLevel2ID" validate:"omitempty,min=1"` AddressLevel3ID *uint32 `json:"addressLevel3ID" validate:"omitempty,min=1"` Street *string `json:"street"` Status *string `json:"status"` }
func (AppUpdateProperty) Validate ¶
func (r AppUpdateProperty) Validate() error
Validate checks the data in the model is considered clean.
Click to show internal directories.
Click to hide internal directories.