Documentation ¶
Index ¶
Constants ¶
View Source
const PolygonFormat = `SRID=4326;POLYGON((%s))`
View Source
const TwoPointPolygonFormat = `SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))`
Variables ¶
This section is empty.
Functions ¶
func ImageObjectName ¶
Types ¶
type Dimensions ¶
type Image ¶
type Image struct { bun.BaseModel `bun:"table:property_images"` ID uuid.UUID `bun:"type:uuid"` PropertyID int `bun:"type:integer,notnull"` UserID int `bun:"type:integer,notnull"` Description string `bun:"type:text"` Position int `bun:"type:smallint,notnull"` Contents []Content `bun:"-"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp,type:TIMESTAMP"` }
type Point ¶
type Point [2]float64
PolygonPoint represents an x,y coordinate in EPSG:4326 for PostGIS.
type Polygon ¶
type Polygon struct {
Points []PolygonPoint
}
type PolygonPoint ¶
type PolygonPoint struct {
Coordinates [2]float64
}
func (PolygonPoint) String ¶
func (p PolygonPoint) String() string
type Properties ¶
type Properties []Property
type Property ¶
type Property struct { bun.BaseModel `bun:"properties,alias:p"` ID int `bun:"type:id,pk,autoincrement"` UserID int `bun:"type:integer,notnull"` Location Point `bun:"type:geometry(point,4326),notnull"` Price float32 `bun:"type:numeric,notnull"` PriceCurrency string `bun:"price_currency"` Address string `bun:"type:text,notnull"` Country string `bun:"country"` City string `bun:"city"` State string `bun:"state"` Street string `bun:"street"` ZipCode string `bun:"zip_code"` HouseNumber string `bun:"house_number"` Neighborhood string `bun:"neighbourhood"` HomeSize float32 `bun:"type:numeric(15,2)"` LotSize float32 `bun:"type:numeric(15,2)"` LivingSize float32 `bun:"type:numeric(15,2)"` YearBuild uint16 `bun:"type:smallint"` Bedroom uint8 `bun:"type:smallint"` Bathroom uint8 `bun:"type:smallint"` Floor uint8 `bun:"floor"` TotalFloors uint8 `bun:"total_floors"` PropertyType uint8 `bun:"type:smallint"` HomeType uint8 `bun:"type:smallint"` Condition uint8 `bun:"type:smallint"` BrokerName string `bun:"broker_name"` Description string `bun:"type:text"` Active *bool `bun:"active"` HasImages *bool `bun:"has_images"` HasGarage *bool `bun:"has_garage"` HasVideo *bool `bun:"has_video"` Has3DTour *bool `bun:"has_3d_tour"` TotalParking uint8 `bun:"total_parking"` HasAC *bool `bun:"has_ac"` PetsAllowed *bool `bun:"pets_allowed"` Appliance *bool `bun:"appliance"` Heating uint8 `bun:"heating"` Images []*Image `bun:"rel:has-many,join:id=property_id"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp,type:TIMESTAMP"` UpdatedAt time.Time `bun:",default:current_timestamp"` }
func (Property) ActualDays ¶
type TwoPointPolygon ¶
type TwoPointPolygon struct {
// contains filtered or unexported fields
}
func NewPolygon ¶
func NewPolygon(topLat string, topLong string, bottomLat string, bottomLong string) TwoPointPolygon
func (TwoPointPolygon) String ¶
func (p TwoPointPolygon) String() string
type UserSavedHome ¶
Click to show internal directories.
Click to hide internal directories.