zhangqian
2024-02-28 fe5cd122cf94f83f97a1e71a391cefd62f219938
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": {