Guest User

Untitled

a guest
Nov 16th, 2018
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.31 KB | None | 0 0
  1. type User {
  2. id: ID! @id
  3. createdAt: DateTime!
  4. updatedAt: DateTime!
  5. firstName: String!
  6. lastName: String!
  7. email: String! @unique
  8. password: String!
  9. phone: String!
  10. responseRate: Float
  11. responseTime: Int
  12. isSuperHost: Boolean! @default(value: false)
  13. ownedPlaces: [Place!]!
  14. location: Location @relation(link: INLINE)
  15. bookings: [Booking!]!
  16. paymentAccount: [PaymentAccount!]!
  17. sentMessages: [Message!]! @relation(name: "SentMessages")
  18. receivedMessages: [Message!]! @relation(name: "ReceivedMessages")
  19. notifications: [Notification!]!
  20. profilePicture: Picture
  21. hostingExperiences: [Experience!]!
  22. }
  23.  
  24. type Place {
  25. id: ID! @id
  26. name: String!
  27. size: PLACE_SIZES
  28. shortDescription: String!
  29. description: String!
  30. slug: String!
  31. maxGuests: Int!
  32. numBedrooms: Int!
  33. numBeds: Int!
  34. numBaths: Int!
  35. reviews: [Review!]!
  36. amenities: Amenities!
  37. host: User! @relation(link: INLINE)
  38. pricing: Pricing! @relation(link: INLINE)
  39. location: Location! @relation(link: INLINE)
  40. views: Views!
  41. guestRequirements: GuestRequirements
  42. policies: Policies
  43. houseRules: HouseRules
  44. bookings: [Booking!]!
  45. pictures: [Picture!]!
  46. popularity: Int!
  47. }
  48.  
  49. type Pricing {
  50. id: ID! @id
  51. place: Place!
  52. monthlyDiscount: Int
  53. weeklyDiscount: Int
  54. perNight: Int!
  55. smartPricing: Boolean! @default(value: false)
  56. basePrice: Int!
  57. averageWeekly: Int!
  58. averageMonthly: Int!
  59. cleaningFee: Int
  60. securityDeposit: Int
  61. extraGuests: Int
  62. weekendPricing: Int
  63. currency: CURRENCY
  64. }
  65.  
  66. type GuestRequirements {
  67. id: ID! @id
  68. govIssuedId: Boolean! @default(value: false)
  69. recommendationsFromOtherHosts: Boolean! @default(value: false)
  70. guestTripInformation: Boolean! @default(value: false)
  71. place: Place! @relation(link: INLINE)
  72. }
  73.  
  74. type Policies {
  75. id: ID! @id
  76. createdAt: DateTime!
  77. updatedAt: DateTime!
  78. checkInStartTime: Float!
  79. checkInEndTime: Float!
  80. checkoutTime: Float!
  81. place: Place! @relation(link: INLINE)
  82. }
  83.  
  84. type HouseRules @embedded {
  85. id: ID!
  86. createdAt: DateTime!
  87. updatedAt: DateTime!
  88. suitableForChildren: Boolean
  89. suitableForInfants: Boolean
  90. petsAllowed: Boolean
  91. smokingAllowed: Boolean
  92. partiesAndEventsAllowed: Boolean
  93. additionalRules: String
  94. }
  95.  
  96. type Views {
  97. id: ID! @id
  98. lastWeek: Int!
  99. place: Place! @relation(link: INLINE)
  100. }
  101.  
  102. type Location {
  103. id: ID! @id
  104. lat: Float!
  105. lng: Float!
  106. neighbourHood: Neighbourhood @relation(link: INLINE)
  107. user: User
  108. place: Place
  109. address: String
  110. directions: String
  111. experience: Experience
  112. restaurant: Restaurant
  113. }
  114.  
  115. type Neighbourhood {
  116. id: ID! @id
  117. locations: [Location!]!
  118. name: String!
  119. slug: String!
  120. homePreview: Picture
  121. city: City! @relation(link: INLINE)
  122. featured: Boolean!
  123. popularity: Int!
  124. }
  125.  
  126. type City {
  127. id: ID! @id
  128. name: String!
  129. neighbourhoods: [Neighbourhood!]!
  130. }
  131.  
  132. type Picture @embedded {
  133. id: ID!
  134. url: String!
  135. }
  136.  
  137. type Experience {
  138. id: ID! @id
  139. category: ExperienceCategory @relation(link: INLINE)
  140. title: String!
  141. host: User! @relation(link: INLINE)
  142. location: Location! @relation(link: INLINE)
  143. pricePerPerson: Int!
  144. reviews: [Review!]!
  145. preview: Picture!
  146. popularity: Int!
  147. }
  148.  
  149. type ExperienceCategory {
  150. id: ID! @id
  151. mainColor: String! @default(value: "#123456")
  152. name: String!
  153. experience: Experience
  154. }
  155.  
  156. type Amenities {
  157. id: ID! @id
  158. place: Place! @relation(link: INLINE)
  159. elevator: Boolean! @default(value: false)
  160. petsAllowed: Boolean! @default(value: false)
  161. internet: Boolean! @default(value: false)
  162. kitchen: Boolean! @default(value: false)
  163. wirelessInternet: Boolean! @default(value: false)
  164. familyKidFriendly: Boolean! @default(value: false)
  165. freeParkingOnPremises: Boolean! @default(value: false)
  166. hotTub: Boolean! @default(value: false)
  167. pool: Boolean! @default(value: false)
  168. smokingAllowed: Boolean! @default(value: false)
  169. wheelchairAccessible: Boolean! @default(value: false)
  170. breakfast: Boolean! @default(value: false)
  171. cableTv: Boolean! @default(value: false)
  172. suitableForEvents: Boolean! @default(value: false)
  173. dryer: Boolean! @default(value: false)
  174. washer: Boolean! @default(value: false)
  175. indoorFireplace: Boolean! @default(value: false)
  176. tv: Boolean! @default(value: false)
  177. heating: Boolean! @default(value: false)
  178. hangers: Boolean! @default(value: false)
  179. iron: Boolean! @default(value: false)
  180. hairDryer: Boolean! @default(value: false)
  181. doorman: Boolean! @default(value: false)
  182. paidParkingOffPremises: Boolean! @default(value: false)
  183. freeParkingOnStreet: Boolean! @default(value: false)
  184. gym: Boolean! @default(value: false)
  185. airConditioning: Boolean! @default(value: false)
  186. shampoo: Boolean! @default(value: false)
  187. essentials: Boolean! @default(value: false)
  188. laptopFriendlyWorkspace: Boolean! @default(value: false)
  189. privateEntrance: Boolean! @default(value: false)
  190. buzzerWirelessIntercom: Boolean! @default(value: false)
  191. babyBath: Boolean! @default(value: false)
  192. babyMonitor: Boolean! @default(value: false)
  193. babysitterRecommendations: Boolean! @default(value: false)
  194. bathtub: Boolean! @default(value: false)
  195. changingTable: Boolean! @default(value: false)
  196. childrensBooksAndToys: Boolean! @default(value: false)
  197. childrensDinnerware: Boolean! @default(value: false)
  198. crib: Boolean! @default(value: false)
  199. }
  200.  
  201. type Review {
  202. id: ID! @id
  203. createdAt: DateTime!
  204. text: String!
  205. stars: Int!
  206. accuracy: Int!
  207. location: Int!
  208. checkIn: Int!
  209. value: Int!
  210. cleanliness: Int!
  211. communication: Int!
  212. place: Place! @relation(link: INLINE)
  213. experience: Experience @relation(link: INLINE)
  214. }
  215.  
  216. type Booking {
  217. id: ID! @id
  218. createdAt: DateTime!
  219. bookee: User! @relation(link: INLINE)
  220. place: Place! @relation(link: INLINE)
  221. startDate: DateTime!
  222. endDate: DateTime!
  223. payment: Payment
  224. }
  225.  
  226. type Payment @embedded {
  227. id: ID!
  228. createdAt: DateTime!
  229. serviceFee: Float!
  230. placePrice: Float!
  231. totalPrice: Float!
  232. }
  233.  
  234. type PaymentAccount {
  235. id: ID! @id
  236. createdAt: DateTime!
  237. type: PAYMENT_PROVIDER
  238. user: User! @relation(link: INLINE)
  239. payments: [Payment!]!
  240. paypal: PaypalInformation
  241. creditcard: CreditCardInformation @relation(name: "EvenDifferentOne")
  242. }
  243.  
  244. type PaypalInformation @embedded {
  245. id: ID!
  246. createdAt: DateTime!
  247. email: String!
  248. }
  249.  
  250. type CreditCardInformation @embedded {
  251. id: ID!
  252. createdAt: DateTime!
  253. cardNumber: String!
  254. expiresOnMonth: Int!
  255. expiresOnYear: Int!
  256. securityCode: String!
  257. firstName: String!
  258. lastName: String!
  259. postalCode: String!
  260. country: String!
  261. paymentAccount: PaymentAccount @relation(link: INLINE name: "OtherRelation")
  262. }
  263.  
  264. type Message {
  265. id: ID! @id
  266. createdAt: DateTime!
  267. from: User! @relation(name: "SentMessages" link: INLINE)
  268. to: User! @relation(name: "ReceivedMessages" link: INLINE)
  269. deliveredAt: DateTime!
  270. readAt: DateTime!
  271. }
  272.  
  273. type Notification {
  274. id: ID! @id
  275. createdAt: DateTime!
  276. type: NOTIFICATION_TYPE
  277. user: User! @relation(link: INLINE)
  278. link: String!
  279. readDate: DateTime!
  280. }
  281.  
  282. type Restaurant {
  283. id: ID! @id
  284. createdAt: DateTime!
  285. title: String!
  286. avgPricePerPerson: Int!
  287. pictures: [Picture!]!
  288. location: Location! @relation(link: INLINE)
  289. isCurated: Boolean! @default(value: true)
  290. slug: String!
  291. popularity: Int!
  292. }
  293.  
  294. enum CURRENCY {
  295. CAD
  296. CHF
  297. EUR
  298. JPY
  299. USD
  300. ZAR
  301. }
  302.  
  303. enum PLACE_SIZES {
  304. ENTIRE_HOUSE
  305. ENTIRE_APARTMENT
  306. ENTIRE_EARTH_HOUSE
  307. ENTIRE_CABIN
  308. ENTIRE_VILLA
  309. ENTIRE_PLACE
  310. ENTIRE_BOAT
  311. PRIVATE_ROOM
  312. }
  313.  
  314. enum PAYMENT_PROVIDER {
  315. PAYPAL
  316. CREDIT_CARD
  317. }
  318.  
  319. enum NOTIFICATION_TYPE {
  320. OFFER
  321. INSTANT_BOOK
  322. RESPONSIVENESS
  323. NEW_AMENITIES
  324. HOUSE_RULES
  325. }
Add Comment
Please, Sign In to add comment