/
type.go
165 lines (144 loc) · 5.26 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
package BEGIS
import (
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type Userkredensial struct {
Status bool `json:"status" bson:"status"`
Data User `json:"data,omitempty" bson:"data,omitempty"`
Message string `json:"message,omitempty" bson:"message,omitempty"`
}
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 User struct {
No_whatsapp string `json:"no_whatsapp,omitempty" bson:"no_whatsapp"`
Username string `json:"username" bson:"username"`
Password string `json:"password,omitempty" bson:"password"`
Role string `json:"role,omitempty" bson:"role,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 Payload struct {
Username string `json:"username"`
Role string `json:"role"`
Exp time.Time `json:"exp"`
Iat time.Time `json:"iat"`
Nbf time.Time `json:"nbf"`
}
type BeriPesan struct {
Status bool `json:"status" bson:"status"`
Message string `json:"message" bson:"message"`
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type DBInfo2 struct {
DBString string
DBName string
CollectionName string
}
type Geospatial struct {
Type string `json:"type" bson:"type"`
Coordinates interface{} `json:"coordinates" bson:"coordinates"`
Max float64 `json:"max,omitempty" bson:"max,omitempty"`
Min float64 `json:"min,omitempty" bson:"min,omitempty"`
Radius float64 `json:"radius,omitempty" bson:"radius,omitempty"`
}