{
  "openapi": "3.0.0",
  "info": {
    "title": "珞珈岛API文档",
    "description": "珞珈岛社交平台API接口文档",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "http://localhost:8081",
      "description": "Generated server url"
    }
  ],
  "tags": [
    {
      "name": "评论模块",
      "description": "评论相关接口"
    },
    {
      "name": "关注模块",
      "description": "用户之间互相关注模块"
    },
    {
      "name": "用户信息管理",
      "description": "用户修改个人信息相关接口"
    },
    {
      "name": "聊天模块",
      "description": "好友聊天模块相关接口"
    },
    {
      "name": "帖子模块",
      "description": "帖子相关接口"
    },
    {
      "name": "用户管理",
      "description": "用户登陆注册相关接口"
    }
  ],
  "paths": {
    "/post": {
      "put": {
        "tags": [
          "帖子模块"
        ],
        "summary": "更新帖子",
        "operationId": "updatePost",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostSaveDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "更新成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "更新失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "帖子模块"
        ],
        "summary": "创建帖子",
        "operationId": "savePost",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostSaveDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "创建成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultLong"
                }
              }
            }
          },
          "500": {
            "description": "创建失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultLong"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "帖子模块"
        ],
        "summary": "删除帖子",
        "operationId": "deletePost",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "删除成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "删除失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/post/like/{id}": {
      "put": {
        "tags": [
          "帖子模块"
        ],
        "summary": "点赞帖子",
        "operationId": "likePost",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "点赞成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "点赞失败，帖子不存在或被删除",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/follow/{id}/{isFollow}": {
      "put": {
        "tags": [
          "关注模块"
        ],
        "summary": "关注用户",
        "description": "关注用户，传入用户id和是否关注的状态",
        "operationId": "follow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "isFollow",
            "in": "path",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "操作成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "操作失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/comment": {
      "put": {
        "tags": [
          "评论模块"
        ],
        "summary": "更新评论",
        "operationId": "updateComment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentSaveDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "更新成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "更新失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "评论模块"
        ],
        "summary": "创建评论",
        "operationId": "saveComment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentSaveDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "创建成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultLong"
                }
              }
            }
          },
          "500": {
            "description": "创建失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultLong"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "评论模块"
        ],
        "summary": "删除评论",
        "operationId": "deleteComment",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "删除成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "删除失败，评论不存在或被删除",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/comment/like/{id}": {
      "put": {
        "tags": [
          "评论模块"
        ],
        "summary": "点赞评论",
        "operationId": "likeComment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "点赞成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "点赞失败，评论不存在或被删除",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/user/verify-captcha": {
      "post": {
        "tags": [
          "用户管理"
        ],
        "summary": "验证图形验证码",
        "description": "验证用户输入的图形验证码是否正确",
        "operationId": "verifyCaptcha",
        "parameters": [
          {
            "name": "captchaKey",
            "in": "cookie",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "验证码验证成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "500": {
            "description": "验证码已失效或验证码错误",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          }
        }
      }
    },
    "/user/register": {
      "post": {
        "tags": [
          "用户管理"
        ],
        "summary": "用户注册",
        "description": "支持用户名/手机号/邮箱注册",
        "operationId": "register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRegisterDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "注册成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultUserDTO"
                }
              }
            }
          },
          "500": {
            "description": "注册失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultUserDTO"
                }
              }
            }
          }
        }
      }
    },
    "/user/logout": {
      "post": {
        "tags": [
          "用户管理"
        ],
        "summary": "用户登出",
        "operationId": "logout",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/user/login": {
      "post": {
        "tags": [
          "用户管理"
        ],
        "summary": "用户登录",
        "description": "支持用户名/手机号/邮箱登录",
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserLoginDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "登录成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/UserDTO"
                }
              }
            }
          },
          "500": {
            "description": "登录失败，用户名或密码错误",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultUserDTO"
                }
              }
            }
          }
        }
      }
    },
    "/user/info/update": {
      "post": {
        "tags": [
          "用户信息管理"
        ],
        "summary": "修改用户信息",
        "operationId": "updateInfo",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserChangeInfoDTO"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "修改成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "修改失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/user/info/password": {
      "post": {
        "tags": [
          "用户信息管理"
        ],
        "summary": "用户修改密码",
        "operationId": "updatePassword",
        "parameters": [
          {
            "name": "password",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "修改成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          },
          "500": {
            "description": "修改失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultVoid"
                }
              }
            }
          }
        }
      }
    },
    "/user/info/avatar": {
      "post": {
        "tags": [
          "用户信息管理"
        ],
        "summary": "用户上传头像",
        "operationId": "uploadAvatar",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "上传成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultString"
                }
              }
            }
          },
          "500": {
            "description": "上传失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultString"
                }
              }
            }
          }
        }
      }
    },
    "/post/cover": {
      "post": {
        "tags": [
          "帖子模块"
        ],
        "summary": "设置帖子封面",
        "operationId": "setCover",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "设置成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultString"
                }
              }
            }
          },
          "500": {
            "description": "设置失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultString"
                }
              }
            }
          }
        }
      }
    },
    "/user/captcha": {
      "get": {
        "tags": [
          "用户管理"
        ],
        "summary": "生成验证码图片",
        "description": "生成图形验证码并设置Cookie存储captchaKey",
        "operationId": "generateCaptcha",
        "responses": {
          "200": {
            "description": "验证码生成成功"
          },
          "500": {
            "description": "验证码生成失败"
          }
        }
      }
    },
    "/post/user": {
      "get": {
        "tags": [
          "帖子模块"
        ],
        "summary": "查看用户的帖子",
        "operationId": "pagePostOfUser",
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponsePostBasicInfoDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponsePostBasicInfoDTO"
                }
              }
            }
          }
        }
      }
    },
    "/post/list": {
      "get": {
        "tags": [
          "帖子模块"
        ],
        "summary": "分页查询帖子",
        "operationId": "pagePost",
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponsePostBasicInfoDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponsePostBasicInfoDTO"
                }
              }
            }
          }
        }
      }
    },
    "/post/detail": {
      "get": {
        "tags": [
          "帖子模块"
        ],
        "summary": "根据ID获取帖子详情",
        "operationId": "getPostDetail",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PostInfoDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，帖子不存在或被删除",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PostInfoDTO"
                }
              }
            }
          }
        }
      }
    },
    "/message/history": {
      "get": {
        "tags": [
          "聊天模块"
        ],
        "summary": "历史记录",
        "description": "传入分页参数，获取与特定用户的完整聊天记录",
        "operationId": "getChatHistory",
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseMessageResponse"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseMessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/chat-list": {
      "get": {
        "tags": [
          "聊天模块"
        ],
        "summary": "聊天列表",
        "description": "传入分页参数，查询私信用户列表（带最新消息）",
        "operationId": "getChatList",
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseChatItemDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseChatItemDTO"
                }
              }
            }
          }
        }
      }
    },
    "/follow/post": {
      "get": {
        "tags": [
          "关注模块"
        ],
        "summary": "关注收件箱",
        "description": "传入分页参数，查询关注的人的发帖推送",
        "operationId": "queryPostFollow",
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponsePostBasicInfoDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponsePostBasicInfoDTO"
                }
              }
            }
          }
        }
      }
    },
    "/follow/or/not/{id}": {
      "get": {
        "tags": [
          "关注模块"
        ],
        "summary": "是否关注用户",
        "description": "传入用户id，返回是否关注该用户",
        "operationId": "isFollow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "已关注",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultBoolean"
                }
              }
            }
          },
          "500": {
            "description": "未关注",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultBoolean"
                }
              }
            }
          }
        }
      }
    },
    "/follow/common/{id}": {
      "get": {
        "tags": [
          "关注模块"
        ],
        "summary": "共同关注",
        "description": "传入用户id，返回该与该用户的共同关注",
        "operationId": "followCommons",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultListUserDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，请稍后重试",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultListUserDTO"
                }
              }
            }
          }
        }
      }
    },
    "/comment/list": {
      "get": {
        "tags": [
          "评论模块"
        ],
        "summary": "根据帖子ID分页获取根评论",
        "operationId": "getCommentsByPostId",
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseCommentInfoDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，帖子ID不合法",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseCommentInfoDTO"
                }
              }
            }
          }
        }
      }
    },
    "/comment/list/reply": {
      "get": {
        "tags": [
          "评论模块"
        ],
        "summary": "根据评论ID获取回复",
        "operationId": "getReplyById",
        "responses": {
          "200": {
            "description": "获取成功",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseCommentInfoDTO"
                }
              }
            }
          },
          "500": {
            "description": "获取失败，评论ID不合法",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResultScrollPageResponseCommentInfoDTO"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PostSaveDTO": {
        "type": "object",
        "description": "帖子保存DTO",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "帖子ID"
          },
          "title": {
            "type": "string",
            "description": "帖子标题",
            "example": "帖子标题三个字",
            "maxLength": 16,
            "minLength": 3
          },
          "image": {
            "type": "string",
            "description": "帖子封面图"
          },
          "content": {
            "type": "string",
            "description": "帖子内容",
            "example": "zsbd",
            "maxLength": 10000,
            "minLength": 4
          },
          "categoryId": {
            "type": "integer",
            "format": "int64",
            "description": "帖子类型id"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "是否匿名发布，1-匿名，0-不匿名",
            "enum": [
              "0",
              "1"
            ],
            "example": 0
          }
        },
        "required": [
          "content",
          "title"
        ]
      },
      "ResultVoid": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "description": "响应数据"
          }
        }
      },
      "CommentSaveDTO": {
        "type": "object",
        "description": "评论保存DTO",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "评论id"
          },
          "content": {
            "type": "string",
            "description": "评论内容",
            "example": "+3",
            "maxLength": 500,
            "minLength": 1
          },
          "postId": {
            "type": "integer",
            "format": "int64",
            "description": "评论的帖子id"
          },
          "parentCommentId": {
            "type": "integer",
            "format": "int64",
            "description": "该评论的父评论id，若不是回复则传入空值"
          }
        },
        "required": [
          "content"
        ]
      },
      "Result": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "description": "响应数据"
          }
        }
      },
      "UserRegisterDTO": {
        "type": "object",
        "description": "用户注册DTO",
        "properties": {
          "username": {
            "type": "string",
            "description": "用户名",
            "example": "ttt",
            "maxLength": 15,
            "minLength": 1
          },
          "password": {
            "type": "string",
            "format": "password",
            "description": "密码",
            "example": 123456,
            "maxLength": 16,
            "minLength": 6
          },
          "phone": {
            "type": "string",
            "description": "手机号",
            "example": 12345678901,
            "pattern": "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$"
          },
          "email": {
            "type": "string",
            "description": "邮箱",
            "example": "123456@qq.com",
            "pattern": "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
          },
          "studentId": {
            "type": "string",
            "description": "学生学号，暂不需要"
          }
        },
        "required": [
          "password",
          "username"
        ]
      },
      "ResultUserDTO": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "$ref": "#/components/schemas/UserDTO",
            "description": "响应数据"
          }
        }
      },
      "UserDTO": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "username": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "UserLoginDTO": {
        "type": "object",
        "description": "用户登录DTO",
        "properties": {
          "userFlag": {
            "type": "string",
            "description": "用户登录用标志，支持用户名，手机号，邮箱"
          },
          "password": {
            "type": "string",
            "description": "用户登陆用密码",
            "maxLength": 16,
            "minLength": 6
          }
        },
        "required": [
          "password"
        ]
      },
      "UserChangeInfoDTO": {
        "type": "object",
        "description": "用户修改信息DTO",
        "properties": {
          "username": {
            "type": "string",
            "description": "用户名"
          },
          "phone": {
            "type": "string",
            "description": "手机号,11位数字"
          },
          "email": {
            "type": "string",
            "description": "邮箱"
          },
          "studentId": {
            "type": "string",
            "description": "学生学号"
          },
          "avatar": {
            "type": "string",
            "description": "头像url"
          },
          "gender": {
            "type": "integer",
            "format": "int32",
            "description": "性别,0-未知，1-男，2-女",
            "enum": [
              "0",
              "1",
              "2"
            ],
            "example": 1
          },
          "college": {
            "type": "string",
            "description": "学院"
          }
        }
      },
      "ResultString": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "type": "string",
            "description": "响应数据"
          }
        }
      },
      "ResultLong": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "type": "integer",
            "format": "int64",
            "description": "响应数据"
          }
        }
      },
      "PostPageQueryDTO": {
        "type": "object",
        "properties": {
          "lastVal": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "userId": {
            "type": "integer",
            "format": "int64",
            "description": "想要查看的用户的id，输入空时为自己的id"
          }
        }
      },
      "PostBasicInfoDTO": {
        "type": "object",
        "description": "帖子基本信息",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "帖子ID"
          },
          "image": {
            "type": "string",
            "description": "帖子封面图"
          },
          "title": {
            "type": "string",
            "description": "帖子标题",
            "example": "帖子标题三个字",
            "maxLength": 16,
            "minLength": 3
          },
          "likeCount": {
            "type": "integer",
            "format": "int32",
            "description": "点赞数"
          },
          "commentCount": {
            "type": "integer",
            "format": "int32",
            "description": "评论数"
          },
          "favoriteCount": {
            "type": "integer",
            "format": "int32",
            "description": "收藏数"
          },
          "isLike": {
            "type": "boolean",
            "description": "是否点赞,1-已点赞,0-未点赞",
            "enum": [
              "0",
              "1"
            ],
            "example": 1
          },
          "userId": {
            "type": "integer",
            "format": "int64",
            "description": "对应的用户ID"
          },
          "userName": {
            "type": "string",
            "description": "匿名情况下用户名"
          },
          "userAvatar": {
            "type": "string",
            "description": "匿名情况下用户头像"
          },
          "createTime": {
            "type": "string",
            "format": "date-time",
            "description": "帖子创建时间"
          }
        },
        "required": [
          "title"
        ]
      },
      "ResultScrollPageResponsePostBasicInfoDTO": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "$ref": "#/components/schemas/ScrollPageResponsePostBasicInfoDTO",
            "description": "响应数据"
          }
        }
      },
      "ScrollPageResponsePostBasicInfoDTO": {
        "type": "object",
        "properties": {
          "lastVal": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostBasicInfoDTO"
            }
          }
        }
      },
      "PostInfoDTO": {
        "type": "object",
        "description": "修改帖子信息",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "帖子ID"
          },
          "image": {
            "type": "string",
            "description": "帖子封面图"
          },
          "title": {
            "type": "string",
            "description": "帖子标题",
            "example": "帖子标题三个字",
            "maxLength": 16,
            "minLength": 3
          },
          "content": {
            "type": "string",
            "description": "帖子内容",
            "example": "zsbd",
            "maxLength": 10000,
            "minLength": 4
          },
          "likeCount": {
            "type": "integer",
            "format": "int32",
            "description": "点赞数"
          },
          "commentCount": {
            "type": "integer",
            "format": "int32",
            "description": "评论数"
          },
          "favoriteCount": {
            "type": "integer",
            "format": "int32",
            "description": "收藏数"
          },
          "isLike": {
            "type": "boolean",
            "description": "是否点赞,1-已点赞，0-未点赞",
            "enum": [
              "0",
              "1"
            ],
            "example": 1
          },
          "userId": {
            "type": "integer",
            "format": "int64",
            "description": "对应用户ID"
          },
          "userName": {
            "type": "string",
            "description": "匿名情况下用户名"
          },
          "userAvatar": {
            "type": "string",
            "description": "匿名情况下用户头像"
          },
          "createTime": {
            "type": "string",
            "format": "date-time",
            "description": "帖子创建时间"
          }
        },
        "required": [
          "content",
          "title"
        ]
      },
      "ChatPageQueryDTO": {
        "type": "object",
        "properties": {
          "lastVal": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "chatUserId": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "MessageResponse": {
        "type": "object",
        "description": "消息返回对象",
        "properties": {
          "messageType": {
            "type": "integer",
            "format": "int32",
            "description": "消息类型，0-私信，1-系统通知",
            "enum": [
              "0",
              "1"
            ],
            "example": 0
          },
          "content": {
            "type": "string",
            "description": "消息内容",
            "maxLength": 500,
            "minLength": 1
          },
          "senderId": {
            "type": "integer",
            "format": "int64",
            "description": "发送者ID"
          },
          "receiverId": {
            "type": "integer",
            "format": "int64",
            "description": "接收者ID"
          },
          "senderName": {
            "type": "string",
            "description": "发送者用户名"
          },
          "senderAvatar": {
            "type": "string",
            "description": "发送者头像"
          },
          "createTime": {
            "type": "string",
            "format": "date-time",
            "description": "消息创建时间"
          }
        },
        "required": [
          "content",
          "senderAvatar",
          "senderName"
        ]
      },
      "ResultScrollPageResponseMessageResponse": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "$ref": "#/components/schemas/ScrollPageResponseMessageResponse",
            "description": "响应数据"
          }
        }
      },
      "ScrollPageResponseMessageResponse": {
        "type": "object",
        "properties": {
          "lastVal": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageResponse"
            }
          }
        }
      },
      "ChatItemDTO": {
        "type": "object",
        "description": "聊天列表项DTO",
        "properties": {
          "chatUserId": {
            "type": "integer",
            "format": "int64",
            "description": "聊天对象的用户ID",
            "example": 123456
          },
          "avatar": {
            "type": "string",
            "description": "聊天对象的头像URL",
            "example": "https://example.com/avatar.jpg"
          },
          "username": {
            "type": "string",
            "description": "聊天对象的用户名",
            "example": "张三"
          },
          "latestMessage": {
            "type": "string",
            "description": "最新消息内容",
            "example": "今天下午开会",
            "maxLength": 500
          },
          "latestTime": {
            "type": "string",
            "format": "date-time",
            "description": "最新消息时间",
            "example": "2023-10-15T14:30:00"
          }
        },
        "required": [
          "chatUserId",
          "latestMessage",
          "latestTime",
          "username"
        ]
      },
      "ResultScrollPageResponseChatItemDTO": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "$ref": "#/components/schemas/ScrollPageResponseChatItemDTO",
            "description": "响应数据"
          }
        }
      },
      "ScrollPageResponseChatItemDTO": {
        "type": "object",
        "properties": {
          "lastVal": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatItemDTO"
            }
          }
        }
      },
      "ResultBoolean": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "type": "boolean",
            "description": "响应数据"
          }
        }
      },
      "ResultListUserDTO": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "type": "array",
            "description": "响应数据",
            "items": {
              "$ref": "#/components/schemas/UserDTO"
            }
          }
        }
      },
      "CommentPageQueryDTO": {
        "type": "object",
        "properties": {
          "lastVal": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "postId": {
            "type": "integer",
            "format": "int64",
            "title": "帖子ID"
          },
          "parentCommentId": {
            "type": "integer",
            "format": "int64",
            "title": "评论ID"
          },
          "orderByTime": {
            "type": "boolean"
          },
          "orderByHot": {
            "type": "boolean"
          }
        },
        "title": "分页查询评论请求DTO"
      },
      "CommentInfoDTO": {
        "type": "object",
        "description": "评论信息",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "评论id"
          },
          "content": {
            "type": "string",
            "description": "评论内容",
            "example": "+3",
            "maxLength": 500,
            "minLength": 1
          },
          "likeCount": {
            "type": "integer",
            "format": "int64",
            "description": "评论点赞数"
          },
          "replyCount": {
            "type": "integer",
            "format": "int64",
            "description": "评论回复数"
          },
          "userId": {
            "type": "integer",
            "format": "int64",
            "description": "评论用户id"
          },
          "postId": {
            "type": "integer",
            "format": "int64",
            "description": "评论对应的帖子id"
          },
          "parentCommentId": {
            "type": "integer",
            "format": "int64",
            "description": "评论对应的父级评论id"
          },
          "topId": {
            "type": "integer",
            "format": "int64",
            "description": "评论对应的顶级评论id"
          },
          "createTime": {
            "type": "string",
            "format": "date-time",
            "description": "评论创建时间"
          },
          "isLike": {
            "type": "boolean",
            "description": "当前用户是否对评论点过赞,1-已点赞，0-未点赞",
            "enum": [
              "0",
              "1"
            ],
            "example": 1
          },
          "userName": {
            "type": "string"
          },
          "userAvatar": {
            "type": "string"
          },
          "commentInfoDTOList": {
            "description": "子评论列表"
          }
        }
      },
      "ResultScrollPageResponseCommentInfoDTO": {
        "type": "object",
        "description": "统一返回前端的结果",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "description": "状态码"
          },
          "msg": {
            "type": "string",
            "description": "提示消息"
          },
          "data": {
            "$ref": "#/components/schemas/ScrollPageResponseCommentInfoDTO",
            "description": "响应数据"
          }
        }
      },
      "ScrollPageResponseCommentInfoDTO": {
        "type": "object",
        "properties": {
          "lastVal": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentInfoDTO"
            }
          }
        }
      }
    }
  }
}