123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599 |
- // Package docs Code generated by swaggo/swag. DO NOT EDIT
- package docs
- import "github.com/swaggo/swag"
- const docTemplate = `{
- "schemes": {{ marshal .Schemes }},
- "swagger": "2.0",
- "info": {
- "description": "{{escape .Description}}",
- "title": "{{.Title}}",
- "termsOfService": "http://swagger.io/terms/",
- "contact": {
- "name": "API Support",
- "url": "http://www.swagger.io/support",
- "email": "support@swagger.io"
- },
- "license": {
- "name": "Apache 2.0",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
- },
- "version": "{{.Version}}"
- },
- "host": "{{.Host}}",
- "basePath": "{{.BasePath}}",
- "paths": {
- "/v1/api/admin/login": {
- "post": {
- "description": "登录API",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Common"
- ],
- "summary": "登录",
- "parameters": [
- {
- "description": "请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/admin_common.Request"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/common.UserInfo"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/profile": {
- "get": {
- "description": "查询个人信息",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Common"
- ],
- "summary": "获取个人信息",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/common.UserInfo"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- },
- "post": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Common"
- ],
- "summary": "退出登录",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/role": {
- "post": {
- "description": "创建角色",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Role 角色管理"
- ],
- "summary": "新增角色",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "description": "请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/admin_role.CreateAdminRoleRequest"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/role/labels": {
- "get": {
- "description": "获取所有已启用角色列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Role 角色管理"
- ],
- "summary": "已启用角色列表",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/admin_role.EnabledRoles"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/role/{roleID}": {
- "get": {
- "description": "获取角色详情",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Role 角色管理"
- ],
- "summary": "详情",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "角色ID",
- "name": "id",
- "in": "path",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/admin.RoleItem"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- },
- "put": {
- "description": "更新角色内容",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Role 角色管理"
- ],
- "summary": "更新角色",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "角色ID",
- "name": "id",
- "in": "path",
- "required": true
- },
- {
- "description": "请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/admin_role.UpdateRequest"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- },
- "delete": {
- "description": "删除角色",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Role 角色管理"
- ],
- "summary": "删除",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "角色ID",
- "name": "id",
- "in": "path",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/role/{roleID}/toggle": {
- "put": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Role 角色管理"
- ],
- "summary": "启用/禁用",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "description": "请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/admin_role.ToggleRequest"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/roles": {
- "get": {
- "description": "获取角色列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Role 角色管理"
- ],
- "summary": "角色列表",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "页码",
- "name": "page",
- "in": "query",
- "required": true
- },
- {
- "type": "integer",
- "description": "每页数量",
- "name": "page_size",
- "in": "query",
- "required": true
- },
- {
- "type": "string",
- "description": "关键字",
- "name": "keyword",
- "in": "query"
- },
- {
- "enum": [
- "enabled",
- "disabled"
- ],
- "type": "string",
- "description": "状态",
- "name": "status",
- "in": "query"
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/admin_role.ListAdminRolesResponse"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/user": {
- "post": {
- "description": "创建用户",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User 用户管理"
- ],
- "summary": "新增用户",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "description": "请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/admin_user.UserRequest"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/user/labels": {
- "get": {
- "description": "获取所有已启用 用户列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User 用户管理"
- ],
- "summary": "已启用 用户列表",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/admin_user.EnabledUserItem"
- }
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/user/{id}": {
- "get": {
- "description": "获取用户详情",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User 用户管理"
- ],
- "summary": "详情",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "角色ID",
- "name": "id",
- "in": "path",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/authorization_client.GetAdminUser"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/user/{userID}": {
- "put": {
- "description": "更新用户内容",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User 用户管理"
- ],
- "summary": "修改个人信息",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "角色ID",
- "name": "id",
- "in": "path",
- "required": true
- },
- {
- "description": "请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/admin_user.UpdateRequest"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- },
- "delete": {
- "description": "删除管理员",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User 用户管理"
- ],
- "summary": "删除",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "用户ID",
- "name": "id",
- "in": "path",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/user/{userID}/toggle": {
- "put": {
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User 用户管理"
- ],
- "summary": "启用/禁用",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "description": "请求body",
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/admin_user.ToggleRequest"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- },
- "/v1/api/admin/users": {
- "get": {
- "description": "获取用户列表",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User 用户管理"
- ],
- "summary": "用户列表",
- "parameters": [
- {
- "type": "string",
- "description": "Bearer 用户令牌",
- "name": "Authorization",
- "in": "header",
- "required": true
- },
- {
- "type": "integer",
- "description": "页码",
- "name": "page",
- "in": "query",
- "required": true
- },
- {
- "type": "integer",
- "description": "每页数量",
- "name": "page_size",
- "in": "query",
- "required": true
- },
- {
- "type": "string",
- "description": "关键字",
- "name": "keyword",
- "in": "query"
- },
- {
- "enum": [
- "enabled",
- "disabled"
- ],
- "type": "string",
- "description": "状态",
- "name": "status",
- "in": "query"
- }
- ],
- "responses": {
- "200": {
- "description": "成功",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.ApiResponse"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/admin_user.ListAdminUserResponse"
- }
- }
- }
- ]
- }
- },
- "400": {
- "description": "请求错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- },
- "500": {
- "description": "内部错误",
- "schema": {
- "$ref": "#/definitions/response.ApiResponse"
- }
- }
- }
- }
- }
- },
- "definitions": {
- "admin.RoleItem": {
- "type": "object",
- "properties": {
- "created_at": {
- "description": "创建时间",
- "type": "string"
- },
- "created_by": {
- "description": "创建人",
- "type": "string"
- },
- "description": {
- "description": "描述",
- "type": "string"
- },
- "id": {
- "type": "integer"
- },
- "is_reserved": {
- "description": "是否可操作",
- "type": "boolean"
- },
- "name": {
- "description": "名称",
- "type": "string"
- },
- "permissions": {
- "description": "权限",
- "type": "array",
- "items": {
- "$ref": "#/definitions/base.ListMapItem"
- }
- },
- "status": {
- "description": "\"enabled\", \"disabled\"",
- "type": "string"
- },
- "updated_at": {
- "description": "更新时间",
- "type": "string"
- },
- "users": {
- "description": "关联用户",
- "type": "array",
- "items": {
- "$ref": "#/definitions/base.ListMapItem"
- }
- }
- }
- },
- "admin.UserItem": {
- "type": "object",
- "properties": {
- "avatar": {
- "description": "头像",
- "type": "string"
- },
- "created_at": {
- "description": "创建时间",
- "type": "string"
- },
- "email": {
- "description": "邮箱",
- "type": "string"
- },
- "id": {
- "type": "integer"
- },
- "is_reserved": {
- "type": "boolean"
- },
- "name": {
- "description": "名称",
- "type": "string"
- },
- "phone_number": {
- "description": "手机号",
- "type": "string"
- },
- "roles": {
- "description": "角色",
- "type": "array",
- "items": {
- "$ref": "#/definitions/base.ListMapItem"
- }
- },
- "status": {
- "description": "状态 \"enabled\"|\"disabled\"",
- "allOf": [
- {
- "$ref": "#/definitions/base.Status"
- }
- ]
- },
- "teams": {
- "description": "团队",
- "type": "array",
- "items": {
- "$ref": "#/definitions/base.ListMapItem"
- }
- },
- "updated_at": {
- "description": "更新时间",
- "type": "string"
- }
- }
- },
- "admin_common.Request": {
- "type": "object",
- "required": [
- "password",
- "username"
- ],
- "properties": {
- "password": {
- "description": "密码",
- "type": "string",
- "maxLength": 18,
- "minLength": 6
- },
- "username": {
- "description": "用户名",
- "type": "string",
- "maxLength": 15,
- "minLength": 5
- }
- }
- },
- "admin_role.CreateAdminRoleRequest": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "description": {
- "description": "非必填,描述",
- "type": "string"
- },
- "name": {
- "description": "角色名称",
- "type": "string",
- "maxLength": 15,
- "minLength": 3
- }
- }
- },
- "admin_role.EnabledRoleItem": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- },
- "id": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "admin_role.EnabledRoles": {
- "type": "object",
- "properties": {
- "roles": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/admin_role.EnabledRoleItem"
- }
- }
- }
- },
- "admin_role.ListAdminRolesResponse": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/admin.RoleItem"
- }
- },
- "total_count": {
- "type": "integer"
- }
- }
- },
- "admin_role.ToggleRequest": {
- "type": "object",
- "required": [
- "status"
- ],
- "properties": {
- "status": {
- "description": "\"enabled\"|\"disabled\"",
- "allOf": [
- {
- "$ref": "#/definitions/base.Status"
- }
- ]
- }
- }
- },
- "admin_role.UpdateRequest": {
- "type": "object",
- "properties": {
- "description": {
- "description": "非必填,描述",
- "type": "string"
- },
- "permissions": {
- "description": "权限",
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "users": {
- "description": "管理员",
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "admin_user.EnabledUserItem": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "admin_user.ListAdminUserResponse": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/admin.UserItem"
- }
- },
- "total_count": {
- "type": "integer"
- }
- }
- },
- "admin_user.ToggleRequest": {
- "type": "object",
- "required": [
- "status"
- ],
- "properties": {
- "status": {
- "description": "\"enabled\"|\"disabled\"",
- "allOf": [
- {
- "$ref": "#/definitions/base.Status"
- }
- ]
- }
- }
- },
- "admin_user.UpdateRequest": {
- "type": "object",
- "required": [
- "email",
- "phone_number"
- ],
- "properties": {
- "avatar": {
- "description": "头像",
- "type": "string"
- },
- "email": {
- "description": "邮箱",
- "type": "string"
- },
- "phone_number": {
- "description": "手机号",
- "type": "string"
- },
- "roles": {
- "description": "角色ID",
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "teams": {
- "description": "团队ID",
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "admin_user.UserRequest": {
- "type": "object",
- "required": [
- "password",
- "phone_number",
- "username"
- ],
- "properties": {
- "avatar": {
- "description": "头像",
- "type": "string"
- },
- "email": {
- "description": "邮箱",
- "type": "string"
- },
- "password": {
- "description": "密码",
- "type": "string",
- "maxLength": 18,
- "minLength": 6
- },
- "phone_number": {
- "description": "手机号",
- "type": "string"
- },
- "roles": {
- "description": "角色ID",
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "teams": {
- "description": "团队ID",
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "username": {
- "description": "用户名",
- "type": "string",
- "maxLength": 15,
- "minLength": 5
- }
- }
- },
- "authorization_client.AdminUserBase": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
- }
- },
- "authorization_client.AdminUserProfile": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string"
- },
- "avatar": {
- "type": "string"
- },
- "bio": {
- "type": "string"
- },
- "birthdate": {
- "type": "integer"
- },
- "educations": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/authorization_client.AdminUserProfileEducation"
- }
- },
- "email": {
- "type": "string"
- },
- "gender": {
- "type": "integer"
- },
- "phone_number": {
- "type": "string"
- },
- "social_links": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/authorization_client.AdminUserProfileSocialLink"
- }
- },
- "website": {
- "type": "string"
- },
- "work_histories": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/authorization_client.AdminUserProfileWorkHistory"
- }
- }
- }
- },
- "authorization_client.AdminUserProfileEducation": {
- "type": "object",
- "properties": {
- "degree": {
- "type": "string"
- },
- "graduated": {
- "type": "integer"
- },
- "school": {
- "type": "string"
- }
- }
- },
- "authorization_client.AdminUserProfileSocialLink": {
- "type": "object",
- "properties": {
- "platform": {
- "type": "string"
- },
- "url": {
- "type": "string"
- }
- }
- },
- "authorization_client.AdminUserProfileWorkHistory": {
- "type": "object",
- "properties": {
- "company": {
- "type": "string"
- },
- "end_date": {
- "type": "integer"
- },
- "position": {
- "type": "string"
- },
- "responsibilities": {
- "type": "string"
- },
- "start_date": {
- "type": "integer"
- }
- }
- },
- "authorization_client.GetAdminUser": {
- "type": "object",
- "properties": {
- "profile": {
- "$ref": "#/definitions/authorization_client.AdminUserProfile"
- },
- "roles": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/authorization_client.AdminUserBase"
- }
- },
- "status": {
- "type": "string"
- },
- "teams": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/authorization_client.AdminUserBase"
- }
- },
- "user_id": {
- "type": "integer"
- },
- "username": {
- "type": "string"
- }
- }
- },
- "base.ListMapItem": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
- }
- },
- "base.Status": {
- "type": "string",
- "enum": [
- "ENABLED",
- "DISABLED",
- "DELETED"
- ],
- "x-enum-varnames": [
- "ToggleEnabled",
- "ToggleDisabled",
- "ToggleDeleted"
- ]
- },
- "common.UserInfo": {
- "type": "object",
- "properties": {
- "avatar": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "id": {
- "type": "integer"
- },
- "phone_number": {
- "type": "string"
- },
- "roles": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/base.ListMapItem"
- }
- },
- "teams": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/base.ListMapItem"
- }
- },
- "username": {
- "type": "string"
- }
- }
- },
- "response.ApiResponse": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "data": {},
- "message": {
- "type": "string"
- }
- }
- }
- },
- "securityDefinitions": {
- "BasicAuth": {
- "type": "basic"
- }
- },
- "externalDocs": {
- "description": "OpenAPI",
- "url": "https://swagger.io/resources/open-api/"
- }
- }`
- // SwaggerInfo holds exported Swagger Info so clients can modify it
- var SwaggerInfo = &swag.Spec{
- Version: "1.0",
- Host: "localhost:8080",
- BasePath: "/v1/api",
- Schemes: []string{},
- Title: "Swagger Example API",
- Description: "This is a sample server celler server.",
- InfoInstanceName: "swagger",
- SwaggerTemplate: docTemplate,
- LeftDelim: "{{",
- RightDelim: "}}",
- }
- func init() {
- swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
- }
|