gql.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. const serverbyprops = `
  2. query serverbyprops($name: String) {
  3. serverbyprops: server_by_props(name: $name) {
  4. id
  5. name
  6. description
  7. img
  8. createdAt
  9. updatedAt
  10. }
  11. }
  12. `;
  13. const servicebyprops = `
  14. query servicebyprops($server_id: ID) {
  15. servicebyprops: service_by_props(server_id: $server_id) {
  16. id
  17. server_id {
  18. id
  19. name
  20. description
  21. img
  22. createdAt
  23. updatedAt
  24. }
  25. repertory_id {
  26. id
  27. count
  28. createdAt
  29. updatedAt
  30. }
  31. description
  32. price
  33. startTime
  34. lastTime
  35. }
  36. }
  37. `;
  38. const createorderAndupdaterepertory = `
  39. mutation createorderAndupdaterepertory ($order_id: ID!, $contactTelephone: String, $contactName: String, $payStatus: String, $remark: String, $payCount: String, $payTime: String, $createdAt: String, $orderStatus: String, $user_id: ID, $service_id: ID, $customerNumber: Int, $repertory_id: ID, $updatedAt: String, $count: Int) {
  40. updaterepertory: update_repertory(id: $repertory_id count: $count updatedAt: $updatedAt) {
  41. id
  42. count
  43. updatedAt
  44. }
  45. createorder: create_order(id: $order_id contactTelephone: $contactTelephone contactName: $contactName payStatus: $payStatus remark: $remark payCount: $payCount createdAt: $createdAt updatedAt: $updatedAt payTime: $payTime createdAt: $createdAt orderStatus: $orderStatus user_id: $user_id service_id: $service_id customerNumber: $customerNumber) {
  46. payStatus
  47. remark
  48. payCount
  49. updatedAt
  50. payTime
  51. createdAt
  52. updatedAt
  53. orderStatus
  54. id
  55. customerNumber
  56. contactTelephone
  57. contactName
  58. }
  59. }
  60. `;
  61. const userbyid = `
  62. query userbyid($id: ID) {
  63. userbyid: user_by_id(id: $id) {
  64. id
  65. openid
  66. admin
  67. username
  68. nickname
  69. password
  70. telephone
  71. email
  72. createdAt
  73. updatedAt
  74. }
  75. }
  76. `;
  77. const orderbyprops = `
  78. query orderbyprops($orderStatus: String, $user_id: ID) {
  79. orderbyprops: order_by_props(orderStatus: $orderStatus user_id: $user_id) {
  80. payStatus
  81. remark
  82. payCount
  83. updatedAt
  84. payTime
  85. createdAt
  86. orderStatus
  87. id
  88. contactTelephone
  89. contactName
  90. user_id {
  91. id
  92. openid
  93. admin
  94. username
  95. nickname
  96. password
  97. telephone
  98. email
  99. createdAt
  100. updatedAt
  101. }
  102. service_id {
  103. id
  104. description
  105. price
  106. startTime
  107. lastTime
  108. createdAt
  109. updatedAt
  110. repertory_id {
  111. id
  112. count
  113. createdAt
  114. updatedAt
  115. }
  116. server_id {
  117. id
  118. name
  119. description
  120. img
  121. createdAt
  122. updatedAt
  123. }
  124. }
  125. customerNumber
  126. }
  127. }
  128. `;
  129. const adminorderbyprops = `
  130. query adminorderbyprops($orderStatus: String) {
  131. adminorderbyprops: order_by_props(orderStatus: $orderStatus) {
  132. payStatus
  133. remark
  134. payCount
  135. updatedAt
  136. payTime
  137. createdAt
  138. orderStatus
  139. id
  140. contactTelephone
  141. contactName
  142. user_id {
  143. id
  144. openid
  145. admin
  146. username
  147. nickname
  148. password
  149. telephone
  150. email
  151. createdAt
  152. updatedAt
  153. }
  154. service_id {
  155. id
  156. description
  157. price
  158. startTime
  159. lastTime
  160. createdAt
  161. updatedAt
  162. repertory_id {
  163. id
  164. count
  165. createdAt
  166. updatedAt
  167. }
  168. server_id {
  169. id
  170. name
  171. description
  172. img
  173. createdAt
  174. updatedAt
  175. }
  176. }
  177. customerNumber
  178. }
  179. }
  180. `;
  181. module.exports = {
  182. serverbyprops: serverbyprops,
  183. servicebyprops: servicebyprops,
  184. createorderAndupdaterepertory: createorderAndupdaterepertory,
  185. userbyid: userbyid,
  186. orderbyprops: orderbyprops,
  187. adminorderbyprops: adminorderbyprops
  188. };