-
Notifications
You must be signed in to change notification settings - Fork 0
/
structs.go
74 lines (65 loc) · 1.84 KB
/
structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package htdbtypes
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
// Property is
type Property struct {
ID primitive.ObjectID `bson:"_id,omitempty"`
Address Address `bson:"address,omitempty"`
Location Location `bson:"location,omitempty"`
Price string `bson:"price,omitempty"`
Layout PropertyConfiguration `bson:"layout,omitempty"`
RawScore PropertyScore `bson:"rawscore,omitempty"`
References []Reference `bson:"references,omitempty"`
Tags []string `bson:"tags,omitempty"`
Notes string `bson:"notes,omitempty"`
}
// PropertyConfiguration is
type PropertyConfiguration struct {
Bedrooms int32 `bson:"bedrooms,omitempty"`
Bathrooms int32 `bson:"bathrooms,omitempty"`
Parking int32 `bson:"parking,omitempty"`
ExtraRooms bool `bson:"extrarooms,omitempty"`
Nbn Nbn `bson:"nbn,omitempty"`
}
// Location is
type Location struct {
Latitude float32 `bson:"latitude,omitempty"`
Longitude float32 `bson:"longitude,omitempty"`
PlaceID string `bson:"placeid,omitempty"`
}
// Address is
type Address struct {
Street string `bson:"street,omitempty"`
Suburb string `bson:"suburb,omitempty"`
Postcode string `bson:"postcode,omitempty"`
State string `bson:"state,omitempty"`
}
// PropertyScore is
type PropertyScore struct {
Quality int32
Safety int32
OutdoorArea int32
Bedrooms int32
Kitchen int32
PublicTransport int32
LivingArea int32
Bathrooms int32
LocalArea int32
}
// Reference is
type Reference struct {
Type string
Value string
}
// Nbn is
type Nbn string
//goland:noinspection GoUnusedConst
const (
FTTP Nbn = "FTTP"
FTTN = "FTTN"
FTTC = "FTTC"
FTTB = "FTTB"
HFC = "HFC"
Unknown = "Unknown"
)