properties

package
v0.0.0-...-e07d5b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePropertyHandler

func CreatePropertyHandler(c *gin.Context)

func GetPropertyHandler

func GetPropertyHandler(c *gin.Context)

func ListPropertyHandler

func ListPropertyHandler(c *gin.Context)

func PropertiesRoutes

func PropertiesRoutes(app *gin.Engine)

func UpdatePropertyHandler

func UpdatePropertyHandler(c *gin.Context)

Types

type Property

type Property struct {
	ID          primitive.ObjectID   `json:"id,omitempty" bson:"_id,omitempty"`
	Name        string               `json:"name" bson:"name" validate:"required"`
	Owners      []primitive.ObjectID `json:"owners" bson:"owners" validate:"required"`
	Address     string               `json:"address" bson:"address" validate:"required"`
	Description string               `json:"description" bson:"description" validate:"required"`
	Type        string               `json:"type" bson:"type" validate:"required"`
	Images      []common.Image       `json:"images" bson:"images"`
	Notes       string               `json:"notes" bson:"notes"`
	Rooms       []Room               `json:"rooms" bson:"rooms"`
	common.Timestamps
	common.Audit
}

type PropertyRepository

type PropertyRepository struct {
	adapters.MongoRepository[Property]
}

type Room

type Room struct {
	Key         string         `json:"key" bson:"key"`
	Name        string         `json:"name" bson:"name"`
	Description string         `json:"description" bson:"description"`
	Notes       string         `json:"notes" bson:"notes"`
	Images      []common.Image `json:"images" bson:"images"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL