-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
276 lines (242 loc) · 6.01 KB
/
schema.graphql
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
"""Exposes a URL that specifies the behaviour of this scalar."""
directive @specifiedBy(
"""The URL that specifies the behaviour of this scalar."""
url: String!
) on SCALAR
type ActivityEntity {
id: String!
name: String!
code: String!
created_at: DateTime!
updated_at: DateTime!
}
type CategoryEntity {
id: String!
name: String!
code: String!
created_at: DateTime!
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type GeoPointDto {
type: String!
coordinates: [Float!]!
}
type HashtagEntity {
id: String!
name: String!
created_at: DateTime!
}
type ImageLocationEntity {
id: String!
created_at: DateTime!
}
type ImageReviewEntity {
id: String!
created_at: DateTime!
}
type LocationCheckEntity {
id: String!
status: String!
created_at: DateTime!
updated_at: DateTime!
}
input LocationCreateInputModel {
title: String!
x: Float!
y: Float!
description: String!
category: String!
activities: [String!]!
seasons: [String!]!
hashtagList: [String!]
}
input LocationDeleteInputModel {
hashtagList: [String!]
activities: [String!]
seasons: [String!]
files: [String!] = []
}
type LocationEntity {
id: String!
title: String!
description: String!
point: GeoPointDto!
rating: Float!
created_at: DateTime!
}
type LocationFavoriteModel {
id: String!
title: String!
description: String!
point: GeoPointDto!
rating: Float!
created_at: DateTime!
isFavorite: Boolean
}
type LocationFavorites {
locations: [LocationFullModel!]!
total: Float!
}
type LocationFullModel {
id: String!
title: String!
description: String!
point: GeoPointDto!
rating: Float!
created_at: DateTime!
isFavorite: Boolean
hashtags: [HashtagEntity!]!
activities: [ActivityEntity!]!
category: CategoryEntity!
seasons: [SeasonEntity!]!
user: UserEntity!
images: [ImageLocationEntity!]!
}
input LocationPoints {
points: [PointDto!]!
}
type LocationSearchModel {
id: String!
title: String!
description: String!
point: GeoPointDto!
rating: Float!
created_at: DateTime!
isFavorite: Boolean
hashtags: [HashtagEntity!]!
activities: [ActivityEntity!]!
category: CategoryEntity!
seasons: [SeasonEntity!]!
user: UserEntity!
images: [ImageLocationEntity!]!
score: Float
}
type LocationSearchResponseModel {
locations: [LocationSearchModel!]!
total: Float!
}
input LocationUpdateInputModel {
title: String
description: String
category: String
activities: [String!]
seasons: [String!]
hashtagList: [String!] = []
}
type Mutation {
createLocation(fileList: [Upload!]!, createLocationData: LocationCreateInputModel!): LocationEntity!
deleteLocation(id: String!): Void
editLocation(fileList: [Upload!], deleteLocationInput: LocationDeleteInputModel!, updateLocationInput: LocationUpdateInputModel!, id: String!): LocationFullModel!
addLocationToFavorite(id: String!): LocationFavoriteModel!
deleteLocationFavorite(id: String!): LocationFavoriteModel!
createReview(fileList: [Upload!]!, isRecommend: Boolean!, locationId: String!, description: String!): ReviewEntity!
editReview(fileList: [Upload!], deleteFiles: [String!], isRecommend: Boolean, id: String!, description: String): ReviewEntity
deleteReview(id: String!): Void
updateRating(sign: Boolean!, id: String!): ReviewEntity
locationCheckTake(locationId: String!): Void!
locationCheckUpdateStatus(status: String!, locationId: String!): Void!
register(user: UserModel!): Void
activityCreate(file: Upload!, name: String!): Void
activityDelete(id: String!): Void
}
type MyLocationsModel {
locations: [LocationFullModel!]!
total: Float!
}
input PointDto {
x: Float!
y: Float!
}
type Query {
locations(locationPoints: LocationPoints!): [LocationFullModel!]!
locationById(locationId: String!): LocationFullModel
search(size: Float!, from: Float!, messageSearch: String, categories: [String!], activities: [String!], seasons: [String!]): LocationSearchResponseModel
getMyFavoritesLocations(size: Float!, from: Float!): LocationFavorites!
getMyLocations(size: Float!, from: Float!): MyLocationsModel!
reviewsByLocation(options: SortOptions!, locationId: String!): ReviewsLocationModel
reviewById(reviewId: String!): ReviewFullModel
locationCheckById(locationCheckId: String!): LocationCheckEntity
locationChecks(statuses: [String!]!, take: Float!, skip: Float!): [LocationCheckEntity!]!
activityList: [ActivityEntity!]!
activityGetById(id: String!): ActivityEntity!
categoryList: [CategoryEntity!]!
categoryGetById(id: String!): CategoryEntity!
seasonList: [SeasonEntity!]!
seasonGetById(id: String!): SeasonEntity!
}
type ReviewEntity {
id: String!
description: String!
rating: Float!
isRecommend: Boolean!
created_at: DateTime!
updated_at: DateTime!
}
type ReviewFullModel {
id: String!
description: String!
rating: Float!
isRecommend: Boolean!
created_at: DateTime!
updated_at: DateTime!
user: UserEntity!
location: LocationEntity!
images: [ImageReviewEntity!]!
}
type ReviewsLocationModel {
reviews: [ReviewUserRatingModel!]!
userReview: ReviewUserRatingModel
total: Float!
}
type ReviewUserRatingModel {
id: String!
description: String!
rating: Float!
isRecommend: Boolean!
created_at: DateTime!
updated_at: DateTime!
userRating: UserRating
user: UserEntity!
images: [ImageReviewEntity!]!
}
type SeasonEntity {
id: String!
name: String!
code: String!
created_at: DateTime!
}
input SortOptions {
field: String = "rating"
direction: String = "ASC"
skip: Float = 0
take: Float = 1
}
"""The `Upload` scalar type represents a file upload."""
scalar Upload
type UserEntity {
id: String!
email: String!
firstName: String!
lastName: String
displayName: String
password: String
verifyToken: String
created_at: DateTime!
}
input UserModel {
id: String
email: String
firstName: String!
externalId: String
password: String
lastName: String
displayName: String
}
type UserRating {
sign: Boolean!
}
"""Represents NULL values"""
scalar Void