docs.go 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. // Package docs GENERATED BY SWAG; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import "github.com/swaggo/swag"
  5. const docTemplate = `{
  6. "schemes": {{ marshal .Schemes }},
  7. "swagger": "2.0",
  8. "info": {
  9. "description": "{{escape .Description}}",
  10. "title": "{{.Title}}",
  11. "contact": {},
  12. "version": "{{.Version}}"
  13. },
  14. "host": "{{.Host}}",
  15. "basePath": "{{.BasePath}}",
  16. "paths": {
  17. "/product/create": {
  18. "post": {
  19. "description": "企业创建商品,添加到商品库",
  20. "consumes": [
  21. "application/json"
  22. ],
  23. "produces": [
  24. "application/json"
  25. ],
  26. "summary": "CreateProduct 创建商品",
  27. "parameters": [
  28. {
  29. "type": "string",
  30. "description": "登录TOKEN信息",
  31. "name": "Authorization",
  32. "in": "header",
  33. "required": true
  34. },
  35. {
  36. "description": "创建商品请求结构体",
  37. "name": "req",
  38. "in": "body",
  39. "required": true,
  40. "schema": {
  41. "$ref": "#/definitions/http_model.CreateProductRequest"
  42. }
  43. }
  44. ],
  45. "responses": {
  46. "200": {
  47. "description": "创建商品相应结构体",
  48. "schema": {
  49. "allOf": [
  50. {
  51. "$ref": "#/definitions/http_model.CommonResponse"
  52. },
  53. {
  54. "type": "object",
  55. "properties": {
  56. "data": {
  57. "$ref": "#/definitions/http_model.CreateProductData"
  58. }
  59. }
  60. }
  61. ]
  62. }
  63. }
  64. }
  65. }
  66. },
  67. "/sendCode": {
  68. "post": {
  69. "description": "发送验证码,每次发送到邮箱",
  70. "consumes": [
  71. "application/json"
  72. ],
  73. "produces": [
  74. "application/json"
  75. ],
  76. "summary": "sendCode 发送验证码",
  77. "parameters": [
  78. {
  79. "description": "发送验证码请求参数结构体",
  80. "name": "req",
  81. "in": "body",
  82. "required": true,
  83. "schema": {
  84. "$ref": "#/definitions/http_model.SendCodeRequest"
  85. }
  86. }
  87. ],
  88. "responses": {
  89. "200": {
  90. "description": "发送验证码请求相应结构体",
  91. "schema": {
  92. "allOf": [
  93. {
  94. "$ref": "#/definitions/http_model.CommonResponse"
  95. },
  96. {
  97. "type": "object",
  98. "properties": {
  99. "data": {
  100. "$ref": "#/definitions/http_model.SendCodeData"
  101. }
  102. }
  103. }
  104. ]
  105. }
  106. }
  107. }
  108. }
  109. }
  110. },
  111. "definitions": {
  112. "http_model.CommonResponse": {
  113. "type": "object",
  114. "properties": {
  115. "data": {},
  116. "message": {
  117. "type": "string"
  118. },
  119. "status": {
  120. "type": "integer"
  121. }
  122. }
  123. },
  124. "http_model.CreateProductData": {
  125. "type": "object",
  126. "properties": {
  127. "product_id": {
  128. "description": "商品id",
  129. "type": "integer"
  130. }
  131. }
  132. },
  133. "http_model.CreateProductPhoto": {
  134. "type": "object",
  135. "properties": {
  136. "photo_uid": {
  137. "type": "string"
  138. },
  139. "photo_url": {
  140. "description": "图片或视频url",
  141. "type": "string"
  142. },
  143. "symbol": {
  144. "description": "图片为主图或详情图标志位,1为主图,2为详情图,3为视频",
  145. "type": "integer"
  146. }
  147. }
  148. },
  149. "http_model.CreateProductRequest": {
  150. "type": "object",
  151. "properties": {
  152. "brand_name": {
  153. "type": "string"
  154. },
  155. "product_detail": {
  156. "type": "string"
  157. },
  158. "product_id": {
  159. "type": "integer"
  160. },
  161. "product_name": {
  162. "description": "商品名称",
  163. "type": "string"
  164. },
  165. "product_photos": {
  166. "description": "商品图片列表",
  167. "type": "array",
  168. "items": {
  169. "$ref": "#/definitions/http_model.CreateProductPhoto"
  170. }
  171. },
  172. "product_price": {
  173. "description": "商品价值",
  174. "type": "integer"
  175. },
  176. "product_type": {
  177. "description": "商品类型",
  178. "type": "integer"
  179. },
  180. "product_url": {
  181. "description": "商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;",
  182. "type": "string"
  183. },
  184. "shop_address": {
  185. "description": "店铺地址,商品类型为线下品牌时需填写",
  186. "type": "string"
  187. }
  188. }
  189. },
  190. "http_model.SendCodeData": {
  191. "type": "object"
  192. },
  193. "http_model.SendCodeRequest": {
  194. "type": "object",
  195. "properties": {
  196. "phone": {
  197. "type": "string"
  198. }
  199. }
  200. }
  201. }
  202. }`
  203. // SwaggerInfo holds exported Swagger Info so clients can modify it
  204. var SwaggerInfo = &swag.Spec{
  205. Version: "",
  206. Host: "",
  207. BasePath: "",
  208. Schemes: []string{},
  209. Title: "",
  210. Description: "",
  211. InfoInstanceName: "swagger",
  212. SwaggerTemplate: docTemplate,
  213. }
  214. func init() {
  215. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  216. }