swagger.json 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "contact": {}
  5. },
  6. "paths": {
  7. "/login": {
  8. "post": {
  9. "description": "输入手机号和验证码,并登录",
  10. "consumes": [
  11. "application/json"
  12. ],
  13. "produces": [
  14. "application/json"
  15. ],
  16. "summary": "login 登录",
  17. "parameters": [
  18. {
  19. "description": "登录输入内容请求参数结构体",
  20. "name": "req",
  21. "in": "body",
  22. "required": true,
  23. "schema": {
  24. "$ref": "#/definitions/http_model.CodeLoginRequest"
  25. }
  26. }
  27. ],
  28. "responses": {
  29. "200": {
  30. "description": "登录返回相应结构体",
  31. "schema": {
  32. "allOf": [
  33. {
  34. "$ref": "#/definitions/http_model.CommonResponse"
  35. },
  36. {
  37. "type": "object",
  38. "properties": {
  39. "data": {
  40. "$ref": "#/definitions/http_model.CodeLoginData"
  41. }
  42. }
  43. }
  44. ]
  45. }
  46. }
  47. }
  48. }
  49. },
  50. "/product/changeTaskStatus": {
  51. "post": {
  52. "description": "更改项目任务的状态",
  53. "consumes": [
  54. "application/json"
  55. ],
  56. "produces": [
  57. "application/json"
  58. ],
  59. "summary": "ProjectChangeTaskStatus 更改项目任务状态",
  60. "parameters": [
  61. {
  62. "description": "更改项目任务状态的请求结构体",
  63. "name": "req",
  64. "in": "body",
  65. "required": true,
  66. "schema": {
  67. "$ref": "#/definitions/http_model.ProjectChangeTaskStatusRequest"
  68. }
  69. }
  70. ],
  71. "responses": {
  72. "200": {
  73. "description": "更改项目任务状态相应结构体",
  74. "schema": {
  75. "$ref": "#/definitions/http_model.CommonResponse"
  76. }
  77. }
  78. }
  79. }
  80. },
  81. "/product/create": {
  82. "post": {
  83. "description": "企业创建商品,添加到商品库",
  84. "consumes": [
  85. "application/json"
  86. ],
  87. "produces": [
  88. "application/json"
  89. ],
  90. "summary": "CreateProduct 创建商品",
  91. "parameters": [
  92. {
  93. "type": "string",
  94. "description": "登录TOKEN信息",
  95. "name": "Authorization",
  96. "in": "header",
  97. "required": true
  98. },
  99. {
  100. "description": "创建商品请求结构体",
  101. "name": "req",
  102. "in": "body",
  103. "required": true,
  104. "schema": {
  105. "$ref": "#/definitions/http_model.CreateProductRequest"
  106. }
  107. }
  108. ],
  109. "responses": {
  110. "200": {
  111. "description": "创建商品相应结构体",
  112. "schema": {
  113. "allOf": [
  114. {
  115. "$ref": "#/definitions/http_model.CommonResponse"
  116. },
  117. {
  118. "type": "object",
  119. "properties": {
  120. "data": {
  121. "$ref": "#/definitions/http_model.CreateProductData"
  122. }
  123. }
  124. }
  125. ]
  126. }
  127. }
  128. }
  129. }
  130. },
  131. "/product/find": {
  132. "post": {
  133. "description": "根据产品名称查询产品信息",
  134. "consumes": [
  135. "application/json"
  136. ],
  137. "produces": [
  138. "application/json"
  139. ],
  140. "summary": "findProduct 根据产品名称查询产品信息",
  141. "parameters": [
  142. {
  143. "type": "string",
  144. "description": "登录TOKEN信息",
  145. "name": "Authorization",
  146. "in": "header",
  147. "required": true
  148. },
  149. {
  150. "description": "发送产品id请求参数结构体",
  151. "name": "req",
  152. "in": "body",
  153. "required": true,
  154. "schema": {
  155. "$ref": "#/definitions/http_model.FindProductRequest"
  156. }
  157. }
  158. ],
  159. "responses": {
  160. "200": {
  161. "description": "查询对应产品返回相应结构体",
  162. "schema": {
  163. "allOf": [
  164. {
  165. "$ref": "#/definitions/http_model.CommonResponse"
  166. },
  167. {
  168. "type": "object",
  169. "properties": {
  170. "data": {
  171. "$ref": "#/definitions/http_model.FindProductData"
  172. }
  173. }
  174. }
  175. ]
  176. }
  177. }
  178. }
  179. }
  180. },
  181. "/product/list": {
  182. "post": {
  183. "description": "展示企业的商品列表",
  184. "consumes": [
  185. "application/json"
  186. ],
  187. "produces": [
  188. "application/json"
  189. ],
  190. "summary": "ProjectList 商品列表",
  191. "parameters": [
  192. {
  193. "type": "string",
  194. "description": "登录TOKEN信息",
  195. "name": "Authorization",
  196. "in": "header",
  197. "required": true
  198. },
  199. {
  200. "description": "创建全部商品请求结构体",
  201. "name": "req",
  202. "in": "body",
  203. "required": true,
  204. "schema": {
  205. "$ref": "#/definitions/http_model.FullProjectListRequest"
  206. }
  207. }
  208. ],
  209. "responses": {
  210. "200": {
  211. "description": "创建全部商品列表相应结构体",
  212. "schema": {
  213. "allOf": [
  214. {
  215. "$ref": "#/definitions/http_model.CommonResponse"
  216. },
  217. {
  218. "type": "object",
  219. "properties": {
  220. "data": {
  221. "$ref": "#/definitions/http_model.FullProjectListData"
  222. }
  223. }
  224. }
  225. ]
  226. }
  227. }
  228. }
  229. }
  230. },
  231. "/product/taskList": {
  232. "post": {
  233. "description": "展示某个项目的任务列表",
  234. "consumes": [
  235. "application/json"
  236. ],
  237. "produces": [
  238. "application/json"
  239. ],
  240. "summary": "ProjectTaskList 项目任务列表",
  241. "parameters": [
  242. {
  243. "description": "查询项目的任务列表的请求结构体",
  244. "name": "req",
  245. "in": "body",
  246. "required": true,
  247. "schema": {
  248. "$ref": "#/definitions/http_model.ProjectTaskListRequest"
  249. }
  250. }
  251. ],
  252. "responses": {
  253. "200": {
  254. "description": "查询项目的任务列表相应结构体",
  255. "schema": {
  256. "allOf": [
  257. {
  258. "$ref": "#/definitions/http_model.CommonResponse"
  259. },
  260. {
  261. "type": "object",
  262. "properties": {
  263. "data": {
  264. "$ref": "#/definitions/http_model.ProjectTaskListData"
  265. }
  266. }
  267. }
  268. ]
  269. }
  270. }
  271. }
  272. }
  273. },
  274. "/project/show": {
  275. "post": {
  276. "description": "企业查看执行中项目",
  277. "consumes": [
  278. "application/json"
  279. ],
  280. "produces": [
  281. "application/json"
  282. ],
  283. "summary": "CreateProduct 创建商品",
  284. "parameters": [
  285. {
  286. "type": "string",
  287. "description": "登录TOKEN信息",
  288. "name": "Authorization",
  289. "in": "header",
  290. "required": true
  291. },
  292. {
  293. "description": "查看项目请求结构体",
  294. "name": "req",
  295. "in": "body",
  296. "required": true,
  297. "schema": {
  298. "$ref": "#/definitions/http_model.ShowProjectRequest"
  299. }
  300. }
  301. ],
  302. "responses": {
  303. "200": {
  304. "description": "查看项目相应结构体",
  305. "schema": {
  306. "allOf": [
  307. {
  308. "$ref": "#/definitions/http_model.CommonResponse"
  309. },
  310. {
  311. "type": "object",
  312. "properties": {
  313. "data": {
  314. "$ref": "#/definitions/http_model.ShowProjectData"
  315. }
  316. }
  317. }
  318. ]
  319. }
  320. }
  321. }
  322. }
  323. },
  324. "/sendCode": {
  325. "post": {
  326. "description": "发送验证码,每次发送到邮箱",
  327. "consumes": [
  328. "application/json"
  329. ],
  330. "produces": [
  331. "application/json"
  332. ],
  333. "summary": "sendCode 发送验证码",
  334. "parameters": [
  335. {
  336. "description": "发送验证码请求参数结构体",
  337. "name": "req",
  338. "in": "body",
  339. "required": true,
  340. "schema": {
  341. "$ref": "#/definitions/http_model.SendCodeRequest"
  342. }
  343. }
  344. ],
  345. "responses": {
  346. "200": {
  347. "description": "发送验证码请求相应结构体",
  348. "schema": {
  349. "allOf": [
  350. {
  351. "$ref": "#/definitions/http_model.CommonResponse"
  352. },
  353. {
  354. "type": "object",
  355. "properties": {
  356. "data": {
  357. "$ref": "#/definitions/http_model.SendCodeData"
  358. }
  359. }
  360. }
  361. ]
  362. }
  363. }
  364. }
  365. }
  366. }
  367. },
  368. "definitions": {
  369. "http_model.CodeLoginData": {
  370. "type": "object",
  371. "properties": {
  372. "token": {
  373. "type": "string"
  374. }
  375. }
  376. },
  377. "http_model.CodeLoginRequest": {
  378. "type": "object",
  379. "properties": {
  380. "code": {
  381. "type": "string"
  382. },
  383. "phone": {
  384. "type": "string"
  385. }
  386. }
  387. },
  388. "http_model.CommonResponse": {
  389. "type": "object",
  390. "properties": {
  391. "data": {},
  392. "message": {
  393. "type": "string"
  394. },
  395. "status": {
  396. "type": "integer"
  397. }
  398. }
  399. },
  400. "http_model.CreateProductData": {
  401. "type": "object",
  402. "properties": {
  403. "product_id": {
  404. "description": "商品id",
  405. "type": "integer"
  406. }
  407. }
  408. },
  409. "http_model.CreateProductPhoto": {
  410. "type": "object",
  411. "properties": {
  412. "photo_uid": {
  413. "type": "string"
  414. },
  415. "photo_url": {
  416. "description": "图片或视频url",
  417. "type": "string"
  418. },
  419. "symbol": {
  420. "description": "图片为主图或详情图标志位,1为主图,2为详情图,3为视频",
  421. "type": "integer"
  422. }
  423. }
  424. },
  425. "http_model.CreateProductRequest": {
  426. "type": "object",
  427. "properties": {
  428. "brand_name": {
  429. "type": "string"
  430. },
  431. "product_detail": {
  432. "type": "string"
  433. },
  434. "product_id": {
  435. "type": "integer"
  436. },
  437. "product_name": {
  438. "description": "商品名称",
  439. "type": "string"
  440. },
  441. "product_photos": {
  442. "description": "商品图片列表",
  443. "type": "array",
  444. "items": {
  445. "$ref": "#/definitions/http_model.CreateProductPhoto"
  446. }
  447. },
  448. "product_price": {
  449. "description": "商品价值",
  450. "type": "integer"
  451. },
  452. "product_type": {
  453. "description": "商品类型",
  454. "type": "integer"
  455. },
  456. "product_url": {
  457. "description": "商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;",
  458. "type": "string"
  459. },
  460. "shop_address": {
  461. "description": "店铺地址,商品类型为线下品牌时需填写",
  462. "type": "string"
  463. }
  464. }
  465. },
  466. "http_model.FindProductData": {
  467. "type": "object",
  468. "properties": {
  469. "brand_name": {
  470. "description": "品牌名称",
  471. "type": "string"
  472. },
  473. "enterprise_id": {
  474. "description": "所属企业id",
  475. "type": "integer"
  476. },
  477. "product_detail": {
  478. "type": "string"
  479. },
  480. "product_id": {
  481. "type": "integer"
  482. },
  483. "product_name": {
  484. "description": "商品名称",
  485. "type": "string"
  486. },
  487. "product_photos": {
  488. "description": "商品图片列表",
  489. "type": "array",
  490. "items": {
  491. "$ref": "#/definitions/http_model.ProductPhoto"
  492. }
  493. },
  494. "product_price": {
  495. "description": "商品价值",
  496. "type": "integer"
  497. },
  498. "product_type": {
  499. "description": "商品类型",
  500. "type": "integer"
  501. },
  502. "product_url": {
  503. "description": "商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;",
  504. "type": "string"
  505. },
  506. "shop_address": {
  507. "description": "店铺地址,商品类型为线下品牌时需填写",
  508. "type": "string"
  509. }
  510. }
  511. },
  512. "http_model.FindProductRequest": {
  513. "type": "object",
  514. "properties": {
  515. "product_id": {
  516. "type": "integer"
  517. }
  518. }
  519. },
  520. "http_model.FullProjectListData": {
  521. "type": "object",
  522. "properties": {
  523. "full_project_pre_view": {
  524. "type": "array",
  525. "items": {
  526. "$ref": "#/definitions/http_model.FullProjectPreview"
  527. }
  528. },
  529. "total": {
  530. "type": "string"
  531. }
  532. }
  533. },
  534. "http_model.FullProjectListRequest": {
  535. "type": "object",
  536. "properties": {
  537. "page_num": {
  538. "type": "integer"
  539. },
  540. "page_size": {
  541. "type": "integer"
  542. },
  543. "project_content_type": {
  544. "description": "内容形式",
  545. "type": "string"
  546. },
  547. "project_form": {
  548. "description": "项目形式",
  549. "type": "string"
  550. },
  551. "project_id": {
  552. "description": "项目ID",
  553. "type": "string"
  554. },
  555. "project_name": {
  556. "description": "项目名",
  557. "type": "string"
  558. },
  559. "project_platform": {
  560. "description": "项目平台",
  561. "type": "string"
  562. },
  563. "project_status": {
  564. "description": "项目状态",
  565. "type": "string"
  566. },
  567. "project_updated": {
  568. "description": "最后操作时间",
  569. "type": "string"
  570. }
  571. }
  572. },
  573. "http_model.FullProjectPreview": {
  574. "type": "object",
  575. "properties": {
  576. "project_content_type": {
  577. "description": "ProjectFeeForms []string `json:\"project_fee_forms\"` // 稿费形式",
  578. "type": "string"
  579. },
  580. "project_form": {
  581. "description": "项目形式",
  582. "type": "string"
  583. },
  584. "project_id": {
  585. "description": "项目ID",
  586. "type": "string"
  587. },
  588. "project_name": {
  589. "description": "项目名",
  590. "type": "string"
  591. },
  592. "project_platform": {
  593. "description": "项目平台",
  594. "type": "string"
  595. },
  596. "project_status": {
  597. "description": "项目状态",
  598. "type": "string"
  599. },
  600. "project_updated": {
  601. "description": "最后操作时间",
  602. "type": "string"
  603. }
  604. }
  605. },
  606. "http_model.ProductPhoto": {
  607. "type": "object",
  608. "properties": {
  609. "photo_uid": {
  610. "type": "string"
  611. },
  612. "photo_url": {
  613. "description": "图片或视频url",
  614. "type": "string"
  615. },
  616. "symbol": {
  617. "description": "图片为主图或详情图标志位,1为主图,2为详情图,3为视频",
  618. "type": "integer"
  619. }
  620. }
  621. },
  622. "http_model.ProjectChangeTaskStatusRequest": {
  623. "type": "object",
  624. "properties": {
  625. "taskIds": {
  626. "type": "array",
  627. "items": {
  628. "type": "string"
  629. }
  630. },
  631. "task_status": {
  632. "type": "string"
  633. }
  634. }
  635. },
  636. "http_model.ProjectTaskListData": {
  637. "type": "object",
  638. "properties": {
  639. "project_task_pre_view": {
  640. "type": "array",
  641. "items": {
  642. "$ref": "#/definitions/http_model.ProjectTaskPreview"
  643. }
  644. },
  645. "total": {
  646. "type": "string"
  647. }
  648. }
  649. },
  650. "http_model.ProjectTaskListRequest": {
  651. "type": "object",
  652. "properties": {
  653. "page_num": {
  654. "type": "integer"
  655. },
  656. "page_size": {
  657. "type": "integer"
  658. },
  659. "platform_nickname": {
  660. "description": "账号昵称",
  661. "type": "string"
  662. },
  663. "project_id": {
  664. "description": "项目ID",
  665. "type": "string"
  666. },
  667. "strategy_id": {
  668. "description": "策略ID",
  669. "type": "string"
  670. },
  671. "task_id": {
  672. "description": "任务ID",
  673. "type": "string"
  674. },
  675. "task_status": {
  676. "description": "任务状态",
  677. "type": "string"
  678. }
  679. }
  680. },
  681. "http_model.ProjectTaskPreview": {
  682. "type": "object",
  683. "properties": {
  684. "create_date": {
  685. "description": "创建时间",
  686. "type": "string"
  687. },
  688. "fans_count": {
  689. "description": "粉丝数",
  690. "type": "string"
  691. },
  692. "home_page_capture_url": {
  693. "description": "主页链接",
  694. "type": "string"
  695. },
  696. "platform_nickname": {
  697. "description": "账号昵称",
  698. "type": "string"
  699. },
  700. "strategy_id": {
  701. "description": "报名选择的招募策略id",
  702. "type": "string"
  703. },
  704. "talent_personal_info_snap": {
  705. "description": "达人个人信息快照",
  706. "type": "string"
  707. },
  708. "task_id": {
  709. "description": "任务ID",
  710. "type": "string"
  711. },
  712. "task_reward": {
  713. "description": "任务奖励金额",
  714. "type": "string"
  715. },
  716. "task_status": {
  717. "description": "任务状态",
  718. "type": "string"
  719. }
  720. }
  721. },
  722. "http_model.SendCodeData": {
  723. "type": "object"
  724. },
  725. "http_model.SendCodeRequest": {
  726. "type": "object",
  727. "properties": {
  728. "email": {
  729. "type": "string"
  730. },
  731. "phone": {
  732. "type": "string"
  733. }
  734. }
  735. },
  736. "http_model.ShowProjectData": {
  737. "type": "object",
  738. "properties": {
  739. "content_type": {
  740. "description": "内容形式,1代表图文,2代表视频",
  741. "type": "string"
  742. },
  743. "create_at": {
  744. "description": "创建时间",
  745. "type": "string"
  746. },
  747. "enterprise_id": {
  748. "description": "企业id",
  749. "type": "string"
  750. },
  751. "phone": {
  752. "description": "联系方式",
  753. "type": "string"
  754. },
  755. "product_id": {
  756. "description": "关联商品id",
  757. "type": "string"
  758. },
  759. "project_detail": {
  760. "description": "项目详情",
  761. "type": "string"
  762. },
  763. "project_form": {
  764. "description": "项目形式,1-4分别代表实体商品寄拍、虚拟产品测评、线下探店打卡、素材微原创",
  765. "type": "string"
  766. },
  767. "project_id": {
  768. "description": "项目id",
  769. "type": "string"
  770. },
  771. "project_name": {
  772. "description": "项目名称",
  773. "type": "string"
  774. },
  775. "project_photos": {
  776. "description": "项目图片",
  777. "type": "array",
  778. "items": {
  779. "$ref": "#/definitions/http_model.ShowProjectPhoto"
  780. }
  781. },
  782. "project_platform": {
  783. "description": "项目平台,1-7分别代表红book、抖音、微博、快手、b站、大众点评、知乎",
  784. "type": "string"
  785. },
  786. "project_status": {
  787. "description": "项目状态,1-7分别代表创建中、待审核、招募中、待支付、失效、执行中、已结案",
  788. "type": "string"
  789. },
  790. "project_type": {
  791. "description": "项目类型,1代表全流程项目,2代表专项项目",
  792. "type": "string"
  793. },
  794. "recruit_ddl": {
  795. "description": "招募截止时间",
  796. "type": "string"
  797. },
  798. "recruit_strategys": {
  799. "description": "定价策略",
  800. "type": "array",
  801. "items": {
  802. "$ref": "#/definitions/http_model.ShowRecruitStrategy"
  803. }
  804. },
  805. "talent_type": {
  806. "description": "达人类型",
  807. "type": "string"
  808. }
  809. }
  810. },
  811. "http_model.ShowProjectPhoto": {
  812. "type": "object",
  813. "properties": {
  814. "photo_uid": {
  815. "type": "string"
  816. },
  817. "photo_url": {
  818. "description": "图片url",
  819. "type": "string"
  820. }
  821. }
  822. },
  823. "http_model.ShowProjectRequest": {
  824. "type": "object",
  825. "properties": {
  826. "Project_id": {
  827. "description": "项目id",
  828. "type": "integer"
  829. }
  830. }
  831. },
  832. "http_model.ShowRecruitStrategy": {
  833. "type": "object",
  834. "properties": {
  835. "fee_form": {
  836. "description": "稿费形式,1-3分别代表自报价、固定稿费、产品置换",
  837. "type": "string"
  838. },
  839. "followers_low": {
  840. "description": "达人粉丝数下限",
  841. "type": "string"
  842. },
  843. "followers_up": {
  844. "description": "达人粉丝数上限",
  845. "type": "string"
  846. },
  847. "offer": {
  848. "description": "报价",
  849. "type": "string"
  850. },
  851. "recruit_number": {
  852. "description": "招募数量",
  853. "type": "string"
  854. },
  855. "strategy_id": {
  856. "description": "策略id",
  857. "type": "string"
  858. }
  859. }
  860. }
  861. }
  862. }