/
type.go
181 lines (153 loc) · 5.77 KB
/
type.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
package peda
import "go.mongodb.org/mongo-driver/bson/primitive"
type GeometryPolygon struct {
Coordinates [][][]float64 `json:"coordinates" bson:"coordinates"`
Type string `json:"type" bson:"type"`
}
type GeometryLineString struct {
Coordinates [][]float64 `json:"coordinates" bson:"coordinates"`
Type string `json:"type" bson:"type"`
}
type GeometryPoint struct {
Coordinates []float64 `json:"coordinates" bson:"coordinates"`
Type string `json:"type" bson:"type"`
}
type GeoJsonLineString struct {
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry GeometryLineString `json:"geometry" bson:"geometry"`
}
type GeoJsonPolygon struct {
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry GeometryPolygon `json:"geometry" bson:"geometry"`
}
type Geometry struct {
Coordinates interface{} `json:"coordinates" bson:"coordinates"`
Type string `json:"type" bson:"type"`
}
type GeoJson struct {
Type string `json:"type" bson:"type"`
Properties Properties `json:"properties" bson:"properties"`
Geometry Geometry `json:"geometry" bson:"geometry"`
}
type Properties struct {
Name string `json:"name" bson:"name"`
}
type User struct {
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
Role string `json:"role,omitempty" bson:"role,omitempty"`
Token string `json:"token,omitempty" bson:"token,omitempty"`
Private string `json:"private,omitempty" bson:"private,omitempty"`
Publick string `json:"publick,omitempty" bson:"publick,omitempty"`
}
type Credential struct {
Status bool `json:"status" bson:"status"`
Token string `json:"token,omitempty" bson:"token,omitempty"`
Message string `json:"message,omitempty" bson:"message,omitempty"`
}
type Product struct {
ID primitive.ObjectID `bson:"_id,omitempty" `
Nomorid int `json:"nomorid" bson:"nomorid"`
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Price int `json:"price" bson:"price"`
Stock int `json:"stock" bson:"stock"`
Size string `json:"size" bson:"size"`
Image string `json:"image" bson:"image"`
}
type Response struct {
Status bool `json:"status" bson:"status"`
Message string `json:"message" bson:"message"`
Data interface{} `json:"data" bson:"data"`
}
type Content struct {
ID int `json:"id" bson:"id" `
Content string `json:"content" bson:"content"`
Image string `json:"image" bson:"image"`
Description string `json:"description" bson:"description"`
}
type Blog struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Tanggal string `json:"tanggal" bson:"tanggal"`
Description string `json:"judul" bson:"judul"`
Content []Content `json:"content" bson:"content"`
}
type Tags struct {
Tags []string `json:"tags" bson:"tags"`
}
type Category struct {
Category []string `json:"category" bson:"category"`
}
type Comment struct {
ID int `json:"id" bson:"id"`
Username string `json:"username" bson:"username"`
Answer string `json:"comment" bson:"comment"`
Questions string `json:"questions" bson:"questions"`
Tanggal string `json:"tanggal" bson:"tanggal"`
}
type Share struct {
Share []string `json:"share" bson:"share"`
}
type EventGlobal struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Tanggal string `json:"tanggal" bson:"tanggal"`
Image string `json:"image" bson:"image"`
Harga int `json:"harga" bson:"harga"`
}
type Event struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Tanggal string `json:"tanggal" bson:"tanggal"`
Image string `json:"image" bson:"image"`
Harga int `json:"harga" bson:"harga"`
LinkYoutube string `json:"linkyoutube" bson:"linkyoutube"`
}
type About struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Image string `json:"image" bson:"image"`
}
type Gallery struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Image string `json:"image" bson:"image"`
}
type Contack struct {
ID int `json:"id" bson:"id"`
Name string `json:"title" bson:"title"`
Subject string `json:"description" bson:"description"`
Message string `json:"image" bson:"image"`
Email string `json:"email" bson:"email"`
Phone string `json:"phone" bson:"phone"`
}
type Iklan struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Image string `json:"image" bson:"image"`
}
type Lokasi struct { //lokasi yang bisa melakukan presensi
ID primitive.ObjectID `bson:"_id,omitempty"`
Properties Name `bson:"properties,omitempty"`
Geometry Geometry `bson:"geometry,omitempty"`
Kategori string `bson:"kategori,omitempty"`
}
type Name struct { //lokasi yang bisa melakukan presensi
Name string `bson:"name,omitempty"`
}
type LongLat struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}
type Pesan struct {
Status bool `json:"status" bson:"status"`
Message string `json:"message" bson:"message"`
}