From fe5cd122cf94f83f97a1e71a391cefd62f219938 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 28 二月 2024 20:26:32 +0800 Subject: [PATCH] 字段增删改查接口 --- docs/docs.go | 279 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 279 insertions(+), 0 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 491292f..fc40334 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -16,6 +16,162 @@ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/api-jl/v1/system/dict": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/瀛楀吀" + ], + "summary": "鏌ヨ瀛楀吀鍒楄〃", + "parameters": [ + { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "x-enum-comments": { + "DictTypeColor": "棰滆壊", + "DictTypeMarket": "搴勫彛", + "DictTypeSpec": "瑙勬牸", + "DictTypeWorkshop": "杞﹂棿" + }, + "x-enum-varnames": [ + "DictTypeMarket", + "DictTypeWorkshop", + "DictTypeColor", + "DictTypeSpec" + ], + "description": "瀛楀吀绫诲瀷", + "name": "dictType", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/models.Dict" + } + } + } + } + ] + } + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/瀛楀吀" + ], + "summary": "缂栬緫瀛楀吀", + "parameters": [ + { + "description": "瀛楀吀淇℃伅", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UpdateDict" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/瀛楀吀" + ], + "summary": "娣诲姞瀛楀吀", + "parameters": [ + { + "description": "瀛楀吀淇℃伅", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AddDict" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, + "/api-jl/v1/system/dict/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "绯荤粺璁剧疆/瀛楀吀" + ], + "summary": "鍒犻櫎瀛楀吀", + "parameters": [ + { + "type": "string", + "description": "瀛楀吀淇℃伅", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, "/api-s/v1/organize/department": { "get": { "produces": [ @@ -152,6 +308,39 @@ } }, "definitions": { + "constvar.DictType": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3 + ], + "x-enum-comments": { + "DictTypeColor": "棰滆壊", + "DictTypeMarket": "搴勫彛", + "DictTypeSpec": "瑙勬牸", + "DictTypeWorkshop": "杞﹂棿" + }, + "x-enum-varnames": [ + "DictTypeMarket", + "DictTypeWorkshop", + "DictTypeColor", + "DictTypeSpec" + ] + }, + "gorm.DeletedAt": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "valid": { + "description": "Valid is true if Time is not NULL", + "type": "boolean" + } + } + }, "models.Department": { "type": "object", "properties": { @@ -190,6 +379,43 @@ } } }, + "models.Dict": { + "type": "object", + "properties": { + "createdAt": { + "type": "string" + }, + "deletedAt": { + "$ref": "#/definitions/gorm.DeletedAt" + }, + "dictType": { + "description": "瀛楀吀绫诲瀷", + "allOf": [ + { + "$ref": "#/definitions/constvar.DictType" + } + ] + }, + "id": { + "type": "integer" + }, + "name": { + "description": "鍚嶇О", + "type": "string" + }, + "number": { + "description": "缂栧彿", + "type": "string" + }, + "remark": { + "description": "澶囨敞", + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, "request.AddDepartment": { "type": "object", "properties": { @@ -204,6 +430,31 @@ "parentId": { "description": "涓婄骇閮ㄩ棬ID 涓�绾ч儴闂ㄤ紶0", "type": "integer" + }, + "remark": { + "description": "澶囨敞", + "type": "string" + } + } + }, + "request.AddDict": { + "type": "object", + "properties": { + "dictType": { + "description": "瀛楀吀绫诲瀷", + "allOf": [ + { + "$ref": "#/definitions/constvar.DictType" + } + ] + }, + "name": { + "description": "鍚嶇О", + "type": "string" + }, + "number": { + "description": "缂栫爜", + "type": "string" }, "remark": { "description": "澶囨敞", @@ -235,6 +486,34 @@ } } }, + "request.UpdateDict": { + "type": "object", + "properties": { + "dictType": { + "description": "瀛楀吀绫诲瀷", + "allOf": [ + { + "$ref": "#/definitions/constvar.DictType" + } + ] + }, + "id": { + "type": "integer" + }, + "name": { + "description": "鍚嶇О", + "type": "string" + }, + "number": { + "description": "缂栫爜", + "type": "string" + }, + "remark": { + "description": "澶囨敞", + "type": "string" + } + } + }, "util.Response": { "type": "object", "properties": { -- Gitblit v1.8.0