{ "swagger": "2.0", "info": { "description": "TopFans 后端 API 文档 - 微服务架构 Gateway 层", "title": "TopFans API", "contact": {}, "version": "1.0" }, "host": "localhost:8080", "basePath": "/api/v1", "paths": { "/api/v1/account/password": { "post": { "security": [ { "BearerAuth": [] } ], "description": "更新当前用户的登录密码", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "更新用户密码", "parameters": [ { "description": "更新密码请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.UpdatePasswordRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/activities": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取活动列表,支持按star_id筛选", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "获取活动列表", "parameters": [ { "type": "integer", "format": "int64", "description": "粉丝身份ID", "name": "star_id", "in": "query", "required": true }, { "type": "string", "description": "活动状态: pending/active/completed/expired", "name": "status", "in": "query" }, { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认10", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/activities/{activity_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取活动详情", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "获取活动详情", "parameters": [ { "type": "integer", "format": "int64", "description": "活动ID", "name": "activity_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/activities/{activity_id}/items": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取活动道具列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "获取活动道具列表", "parameters": [ { "type": "integer", "format": "int64", "description": "活动ID", "name": "activity_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/activities/{activity_id}/progress": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取活动进度", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "获取活动进度", "parameters": [ { "type": "integer", "format": "int64", "description": "活动ID", "name": "activity_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/activities/{activity_id}/purchase": { "post": { "security": [ { "BearerAuth": [] } ], "description": "购买活动道具", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "购买道具", "parameters": [ { "type": "integer", "format": "int64", "description": "活动ID", "name": "activity_id", "in": "path", "required": true }, { "description": "购买请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/activity.PurchaseItemRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/activities/{activity_id}/ranking": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取活动贡献点排名", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "activities" ], "summary": "获取贡献点排名", "parameters": [ { "type": "integer", "format": "int64", "description": "活动ID", "name": "activity_id", "in": "path", "required": true }, { "type": "integer", "format": "int64", "description": "粉丝身份ID", "name": "star_id", "in": "query" }, { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认10", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/me/items": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前用户的数字藏品列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "获取我的藏品", "parameters": [ { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认20", "name": "page_size", "in": "query" }, { "type": "string", "description": "藏品状态", "name": "status", "in": "query" }, { "type": "string", "description": "搜索关键词", "name": "keyword", "in": "query" }, { "type": "string", "description": "排序方式,默认created_at_desc", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/mints": { "post": { "security": [ { "BearerAuth": [] } ], "description": "创建一个新的数字藏品铸造订单", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "创建铸造订单", "parameters": [ { "description": "铸造订单请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateMintOrderRequestDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/mints/precreate": { "post": { "security": [ { "BearerAuth": [] } ], "description": "上传素材后先创建 PENDING 订单,返回 order_id,前端决定是否继续铸造或取消", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "预创建铸造订单(阶段一)", "parameters": [ { "description": "预创建铸造订单请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.PreCreateMintOrderRequestDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/mints/{order_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "查询指定铸造订单的状态和详细信息。订单状态包括:PROCESSING(处理中)、SUCCESS(成功)、FAILED(失败)。成功时会返回关联的资产信息,包括 cover_url_signed(预签名URL)和 tx_hash(交易哈希)。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "查询铸造订单状态", "parameters": [ { "type": "string", "description": "订单ID(UUID格式)", "name": "order_id", "in": "path", "required": true } ], "responses": { "200": { "description": "成功返回订单和资产信息", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GetMintOrderResponseDTO" } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/response.Response" } }, "401": { "description": "未授权", "schema": { "$ref": "#/definitions/response.Response" } }, "404": { "description": "订单不存在", "schema": { "$ref": "#/definitions/response.Response" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "取消指定铸造订单", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "取消铸造订单", "parameters": [ { "type": "string", "description": "订单ID", "name": "order_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/oss/batch-presigned-urls": { "get": { "security": [ { "BearerAuth": [] } ], "description": "批量获取OSS预签名URL用于下载多个文件", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "批量获取OSS预签名URL", "parameters": [ { "type": "string", "description": "类型: avatar/asset", "name": "type", "in": "query", "required": true }, { "type": "integer", "description": "过期时间(秒),默认3600", "name": "expires", "in": "query" }, { "type": "integer", "description": "最大返回数量,默认100", "name": "max_keys", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/oss/presigned-url": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取OSS预签名URL用于下载文件。file_name 支持三种形式:1)纯文件名(自动拼接当前用户的路径);2)完整 OSS key(例如 asset/7/88/materials/x.png);3)完整 OSS URL(例如 https://bucket.oss-xx.aliyuncs.com/asset/...)。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "获取OSS预签名URL", "parameters": [ { "type": "string", "description": "类型: avatar/asset", "name": "type", "in": "query", "required": true }, { "type": "string", "description": "文件名或完整OSS key/URL", "name": "file_name", "in": "query", "required": true }, { "type": "integer", "description": "过期时间(秒),默认3600,最大86400", "name": "expires", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/oss/signature": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取阿里云OSS上传签名和策略(阶段一:素材准备)。前端调用此接口获取上传签名后,可以直接上传图片到 OSS,获得 material_url。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "获取OSS上传签名", "parameters": [ { "type": "string", "description": "上传类型: avatar/asset,默认asset", "name": "type", "in": "query" }, { "type": "string", "description": "订单ID(可选)。不传则后端生成,并在响应中返回,用于后续铸造全流程唯一标识", "name": "order_id", "in": "query" } ], "responses": { "200": { "description": "成功返回上传签名信息", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "dir": { "type": "string" }, "expire_time": { "type": "integer" }, "host": { "type": "string" }, "order_id": { "type": "string" }, "policy": { "type": "string" }, "security_token": { "type": "string" }, "signature": { "type": "string" }, "x_oss_credential": { "type": "string" }, "x_oss_date": { "type": "string" }, "x_oss_signature_version": { "type": "string" } } } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/response.Response" } }, "401": { "description": "未授权", "schema": { "$ref": "#/definitions/response.Response" } }, "500": { "description": "OSS配置错误或生成签名失败", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/oss/upload-signature": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取阿里云OSS上传签名和策略(阶段一:素材准备)。前端调用此接口获取上传签名后,可以直接上传图片到 OSS,获得 material_url。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "获取OSS上传签名", "parameters": [ { "type": "string", "description": "上传类型: avatar/asset,默认asset", "name": "type", "in": "query" }, { "type": "string", "description": "订单ID(可选)。不传则后端生成,并在响应中返回,用于后续铸造全流程唯一标识", "name": "order_id", "in": "query" } ], "responses": { "200": { "description": "成功返回上传签名信息", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "type": "object", "properties": { "dir": { "type": "string" }, "expire_time": { "type": "integer" }, "host": { "type": "string" }, "order_id": { "type": "string" }, "policy": { "type": "string" }, "security_token": { "type": "string" }, "signature": { "type": "string" }, "x_oss_credential": { "type": "string" }, "x_oss_date": { "type": "string" }, "x_oss_signature_version": { "type": "string" } } } } } ] } }, "400": { "description": "参数错误", "schema": { "$ref": "#/definitions/response.Response" } }, "401": { "description": "未授权", "schema": { "$ref": "#/definitions/response.Response" } }, "500": { "description": "OSS配置错误或生成签名失败", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/upload": { "post": { "security": [ { "BearerAuth": [] } ], "description": "上传图片到系统(提供图片URL)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "上传图片", "parameters": [ { "description": "图片URL和类型: cover/material", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "properties": { "image_url": { "type": "string" }, "type": { "type": "string" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/{asset_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取指定资产的详细信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "获取资产详情", "parameters": [ { "type": "integer", "description": "资产ID", "name": "asset_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/assets/{asset_id}/status": { "get": { "security": [ { "BearerAuth": [] } ], "description": "查询指定资产的上链状态", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "assets" ], "summary": "查询上链状态", "parameters": [ { "type": "integer", "description": "资产ID", "name": "asset_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/auth/check-nickname": { "post": { "description": "检查指定昵称是否已被他人使用", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "检查昵称是否被注册", "parameters": [ { "description": "检查昵称请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.CheckNicknameRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/user.CheckNicknameResponse" } } } ] } } } } }, "/api/v1/auth/login": { "post": { "description": "用户登录接口,需要提供手机号和密码", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "用户登录", "parameters": [ { "description": "登录请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.LoginResponseDTO" } } } ] } } } } }, "/api/v1/auth/logout": { "post": { "security": [ { "BearerAuth": [] } ], "description": "使用户访问令牌失效", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "用户登出", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/auth/me": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前登录用户的完整信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取当前用户信息", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GetMeResponseDTO" } } } ] } } } } }, "/api/v1/auth/refresh": { "post": { "security": [ { "BearerAuth": [] } ], "description": "使用当前访问令牌刷新获取新的访问令牌", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "刷新访问令牌", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/auth/register": { "post": { "description": "用户注册接口,需要提供手机号、密码、选择明星身份", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "用户注册", "parameters": [ { "description": "注册请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.RegisterRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.RegisterResponseDTO" } } } ] } } } } }, "/api/v1/auth/validate": { "post": { "description": "验证访问令牌的有效性", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "验证访问令牌", "parameters": [ { "description": "验证请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.ValidateTokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/fan-identities": { "get": { "description": "获取所有可选的明星粉丝身份列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取可选粉丝身份列表", "parameters": [ { "type": "string", "description": "搜索关键词", "name": "keyword", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.FanIdentityListResponseDTO" } } } ] } } } } }, "/api/v1/fan-profiles": { "get": { "description": "根据用户ID和明星ID获取粉丝档案信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取粉丝档案", "parameters": [ { "type": "integer", "description": "用户ID", "name": "user_id", "in": "query", "required": true }, { "type": "integer", "description": "明星ID", "name": "star_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/galleries/me": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前用户的展馆信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "galleries" ], "summary": "获取我的展馆", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GetMyGalleryResponseDTO" } } } ] } } } } }, "/api/v1/galleries/place": { "post": { "security": [ { "BearerAuth": [] } ], "description": "在指定展位放置数字藏品进行展示", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "galleries" ], "summary": "放置藏品", "parameters": [ { "description": "展位ID和资产ID", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.PlaceAssetRequestDTO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/galleries/random": { "get": { "security": [ { "BearerAuth": [] } ], "description": "随机返回一个玩家的展馆信息,格式与 GET /api/v1/galleries/:target_uid 一致", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "galleries" ], "summary": "获取随机展馆", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GetUserGalleryResponseDTO" } } } ] } } } } }, "/api/v1/galleries/slots/{slot_id}/asset": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "从指定展位移除展示的藏品", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "galleries" ], "summary": "移除藏品", "parameters": [ { "type": "integer", "description": "展位ID", "name": "slot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/galleries/slots_unlock": { "post": { "security": [ { "BearerAuth": [] } ], "description": "解锁或购买新的展位", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "galleries" ], "summary": "解锁展位", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/galleries/{target_uid}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取指定用户的展馆信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "galleries" ], "summary": "获取他人展馆", "parameters": [ { "type": "integer", "description": "用户ID", "name": "target_uid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.GetUserGalleryResponseDTO" } } } ] } } } } }, "/api/v1/me/avatar": { "put": { "security": [ { "BearerAuth": [] } ], "description": "更新当前用户的头像URL", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "更新用户头像", "parameters": [ { "description": "更新头像请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.UpdateAvatarRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/me/nickname": { "put": { "security": [ { "BearerAuth": [] } ], "description": "更新当前用户的粉丝昵称", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "更新用户昵称", "parameters": [ { "description": "更新昵称请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.UpdateNicknameRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.UpdateNicknameResponseDTO" } } } ] } } } } }, "/api/v1/me/profile": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前登录用户的粉丝档案信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取当前用户粉丝档案", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.ProfileResponseDTO" } } } ] } } } } }, "/api/v1/my/fan-identities": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前用户拥有的所有粉丝身份列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取我的粉丝身份列表", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.MyFanIdentitiesResponseDTO" } } } ] } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "为当前用户添加一个新的明星粉丝身份", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "添加粉丝身份", "parameters": [ { "description": "添加身份请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.AddIdentityRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.AddIdentityResponseDTO" } } } ] } } } } }, "/api/v1/my/fan-identities/switch": { "post": { "security": [ { "BearerAuth": [] } ], "description": "切换到指定的粉丝身份,返回新的访问令牌", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "切换粉丝身份", "parameters": [ { "description": "切换身份请求", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.SwitchIdentityRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/dto.SwitchIdentityResponseDTO" } } } ] } } } } }, "/api/v1/rankings/hot": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取热度排行榜,支持按维度筛选(displaying:展示中, month:本月, total:全部)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rankings" ], "summary": "获取热度排行榜", "parameters": [ { "type": "string", "description": "统计维度: displaying(展示中), month(本月), total(全部),默认total", "name": "dimension", "in": "query" }, { "type": "integer", "format": "int64", "description": "粉丝身份ID,不传则使用当前身份", "name": "star_id", "in": "query" }, { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认10", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/rankings/original": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取自制藏品排行榜,支持按维度筛选(displaying:展示中, month:本月, total:全部)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rankings" ], "summary": "获取自制排行榜", "parameters": [ { "type": "string", "description": "统计维度: displaying(展示中), month(本月), total(全部),默认total", "name": "dimension", "in": "query" }, { "type": "integer", "format": "int64", "description": "粉丝身份ID,不传则使用当前身份", "name": "star_id", "in": "query" }, { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认10", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/assets/{asset_id}/like": { "post": { "security": [ { "BearerAuth": [] } ], "description": "对指定资产进行点赞", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "点赞资产", "parameters": [ { "type": "integer", "description": "资产ID", "name": "asset_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "取消对指定资产的点赞", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "取消点赞", "parameters": [ { "type": "integer", "description": "资产ID", "name": "asset_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/friend-requests": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前用户的好友请求列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "获取好友请求列表", "parameters": [ { "type": "string", "description": "请求类型: received/sent", "name": "type", "in": "query" }, { "type": "string", "description": "请求状态", "name": "status", "in": "query" }, { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认20", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "向指定用户发送好友请求", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "发送好友请求", "parameters": [ { "description": "好友请求参数", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "properties": { "friend_user_id": { "type": "integer" }, "message": { "type": "string" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/friend-requests/handle": { "post": { "security": [ { "BearerAuth": [] } ], "description": "接受或拒绝好友请求", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "处理好友请求", "parameters": [ { "description": "处理请求参数: action=accept/reject", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "properties": { "action": { "type": "string" }, "request_id": { "type": "integer" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/friends": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前用户的好友列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "获取好友列表", "parameters": [ { "type": "string", "description": "搜索关键词", "name": "keyword", "in": "query" }, { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认20", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "删除指定好友", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "删除好友", "parameters": [ { "description": "好友用户ID", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "properties": { "friend_user_id": { "type": "integer" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/friends/count": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取当前用户的好友数量", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "获取好友数量", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/friends/remark": { "put": { "security": [ { "BearerAuth": [] } ], "description": "设置指定好友的备注名称", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "设置好友备注", "parameters": [ { "description": "好友ID和备注", "name": "request", "in": "body", "required": true, "schema": { "type": "object", "properties": { "friend_user_id": { "type": "integer" }, "remark": { "type": "string" } } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/friendship/check": { "get": { "security": [ { "BearerAuth": [] } ], "description": "检查当前用户与指定用户是否为好友关系", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "检查好友关系", "parameters": [ { "type": "integer", "description": "好友用户ID", "name": "friend_user_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/random-users": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取同一明星身份下的随机推荐用户", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "获取随机用户", "parameters": [ { "type": "integer", "description": "获取数量,默认1,最大100", "name": "count", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/search-user": { "get": { "security": [ { "BearerAuth": [] } ], "description": "根据用户ID查找用户信息,用于添加好友", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "查找用户", "parameters": [ { "type": "integer", "description": "粉丝档案ID", "name": "friend_fan_profile_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/social/users": { "get": { "security": [ { "BearerAuth": [] } ], "description": "获取同一明星身份下的分页用户列表,包含用户ID、展馆所有者ID、昵称、等级", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "social" ], "summary": "获取分页用户列表", "parameters": [ { "type": "integer", "description": "页码,默认1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认20,最大100", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } }, "/api/v1/users/{user_id}": { "get": { "description": "根据用户ID获取用户公开信息", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取指定用户信息", "parameters": [ { "type": "integer", "description": "用户ID", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.Response" } } } } } }, "definitions": { "activity.PurchaseItemRequest": { "type": "object", "properties": { "activity_id": { "type": "integer" }, "item_type": { "type": "string" }, "quantity": { "type": "integer" }, "star_id": { "type": "integer" }, "user_id": { "description": "当前用户ID", "type": "integer" } } }, "common.BaseResponse": { "type": "object", "properties": { "code": { "description": "状态码", "allOf": [ { "$ref": "#/definitions/common.StatusCode" } ] }, "message": { "description": "错误信息(成功时为空)", "type": "string" }, "timestamp": { "description": "响应时间戳(Unix时间戳毫秒)", "type": "integer" } } }, "common.StatusCode": { "type": "integer", "format": "int32", "enum": [ 0, 200, 400, 401, 403, 404, 429, 500 ], "x-enum-varnames": [ "StatusCode_STATUS_UNSPECIFIED", "StatusCode_STATUS_OK", "StatusCode_STATUS_BAD_REQUEST", "StatusCode_STATUS_UNAUTHORIZED", "StatusCode_STATUS_FORBIDDEN", "StatusCode_STATUS_NOT_FOUND", "StatusCode_STATUS_TOO_MANY_REQUESTS", "StatusCode_STATUS_INTERNAL_ERROR" ] }, "dto.AddIdentityResponseDTO": { "type": "object", "properties": { "bound": { "type": "boolean" }, "identity_id": { "type": "string" } } }, "dto.AssetDTO": { "type": "object", "properties": { "asset_id": { "description": "资产ID", "type": "integer" }, "block_number": { "description": "区块号(可选)", "type": "integer" }, "cover_url": { "description": "封面图URL", "type": "string" }, "cover_url_signed": { "description": "封面图预签名URL(自动生成)", "type": "string" }, "created_at": { "description": "创建时间(毫秒时间戳)", "type": "integer" }, "description": { "description": "藏品描述(可选)", "type": "string" }, "is_liked": { "description": "当前用户是否已点赞", "type": "boolean" }, "like_count": { "description": "点赞数", "type": "integer" }, "material_url": { "description": "用户上传的素材URL", "type": "string" }, "material_url_signed": { "description": "素材图预签名URL(自动生成)", "type": "string" }, "minted_at": { "description": "上链成功时间(毫秒时间戳,可选)", "type": "integer" }, "name": { "description": "藏品名称", "type": "string" }, "owner": { "description": "持有者信息(可选,保留用于兼容性)", "allOf": [ { "$ref": "#/definitions/dto.OwnerInfoDTO" } ] }, "owner_nickname": { "description": "持有者昵称(在该star下的昵称)", "type": "string" }, "owner_uid": { "description": "当前持有者", "type": "integer" }, "rarity": { "description": "稀有度(可选)", "type": "integer" }, "star_id": { "description": "所属星球", "type": "integer" }, "status": { "description": "状态:0=Pending, 1=Active", "type": "integer" }, "tags": { "description": "标签数组(可选)", "type": "array", "items": { "type": "string" } }, "tx_hash": { "description": "交易哈希(可选)", "type": "string" }, "updated_at": { "description": "更新时间(毫秒时间戳)", "type": "integer" }, "visibility": { "description": "可见性:private, friends, public", "type": "string" } } }, "dto.AssetInfoDTO": { "type": "object", "properties": { "asset_id": { "description": "资产ID", "type": "integer" }, "cover_url": { "description": "封面图URL", "type": "string" }, "like_count": { "description": "点赞数", "type": "integer" }, "name": { "description": "资产名称", "type": "string" }, "remain_time": { "description": "剩余时间(秒)", "type": "integer" } } }, "dto.CreateMintOrderRequestDTO": { "type": "object", "required": [ "material_url", "name", "order_id" ], "properties": { "description": { "description": "藏品描述(可选)", "type": "string" }, "event": { "description": "藏品事件(可选)", "type": "string" }, "material_type": { "description": "素材类型(可选)", "type": "string" }, "material_url": { "description": "用户上传的素材URL(必填,前端已上传到OSS)", "type": "string" }, "name": { "description": "藏品名称(必填)", "type": "string" }, "order_id": { "description": "阶段一生成的订单ID(必填)", "type": "string" }, "rarity": { "description": "稀有度(可选)", "type": "integer" }, "tags": { "description": "标签列表(可选)", "type": "array", "items": { "type": "string" } } } }, "dto.CurrentIdentityDTO": { "type": "object", "properties": { "crystal_balance": { "type": "integer" }, "identity_id": { "description": "\"wyb\"", "type": "string" }, "identity_name": { "description": "\"王一博\"", "type": "string" }, "level": { "type": "integer" }, "star_id": { "description": "明星ID", "type": "integer" }, "tag": { "description": "\"小摩托\"", "type": "string" } } }, "dto.FanIdentityDTO": { "type": "object", "properties": { "identity_id": { "description": "stars.identity_id(如\"wyb\")", "type": "string" }, "name": { "description": "stars.name(原始名称,如\"王一博\")", "type": "string" }, "star_id": { "description": "明星ID", "type": "integer" }, "tag": { "description": "stars.tag(昵称标签,如\"小摩托\")", "type": "string" } } }, "dto.FanIdentityListItemDTO": { "type": "object", "properties": { "identity_id": { "description": "\"wyb\"", "type": "string" }, "name": { "description": "\"王一博\"", "type": "string" }, "pic_url": { "type": "string" }, "star_id": { "description": "88(star 的主键 ID,用于切换身份)", "type": "integer" }, "tag": { "description": "\"小摩托\"", "type": "string" } } }, "dto.FanIdentityListResponseDTO": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/dto.FanIdentityListItemDTO" } }, "total": { "type": "integer" } } }, "dto.GetMeResponseDTO": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "chain_address": { "type": "string" }, "current_identity": { "$ref": "#/definitions/dto.CurrentIdentityDTO" }, "nickname": { "type": "string" }, "uid": { "type": "integer" } } }, "dto.GetMintOrderResponseDTO": { "type": "object", "properties": { "asset": { "description": "关联的资产信息(如果存在)", "allOf": [ { "$ref": "#/definitions/dto.AssetDTO" } ] }, "order": { "description": "订单信息", "allOf": [ { "$ref": "#/definitions/dto.MintOrderDTO" } ] } } }, "dto.GetMyGalleryResponseDTO": { "type": "object", "properties": { "gallery_owner_id": { "description": "展馆所有者ID", "type": "integer" }, "nickname": { "description": "展馆所有者昵称", "type": "string" }, "slot_total": { "description": "展位总数", "type": "integer" }, "slots": { "description": "展位列表", "type": "array", "items": { "$ref": "#/definitions/dto.SlotInfoDTO" } } } }, "dto.GetUserGalleryResponseDTO": { "type": "object", "properties": { "gallery_owner_id": { "description": "展馆所有者ID", "type": "integer" }, "nickname": { "description": "展馆所有者昵称", "type": "string" }, "slot_total": { "description": "展位总数", "type": "integer" }, "slots": { "description": "展位列表", "type": "array", "items": { "$ref": "#/definitions/dto.SlotInfoDTO" } } } }, "dto.LoginResponseDTO": { "type": "object", "properties": { "access_token": { "type": "string" }, "expires_in": { "type": "integer" }, "refresh_token": { "type": "string" }, "user": { "$ref": "#/definitions/dto.UserWithIdentityDTO" } } }, "dto.MintOrderDTO": { "type": "object", "properties": { "asset_id": { "description": "关联资产ID", "type": "integer" }, "cost_crystal": { "description": "消耗的水晶数量", "type": "integer" }, "cover_url": { "description": "订单查询响应中的扩展字段", "type": "string" }, "cover_url_signed": { "description": "封面图预签名URL(成功时)", "type": "string" }, "created_at": { "description": "创建时间(毫秒时间戳)", "type": "integer" }, "description": { "description": "阶段一保存的描述(可选)", "type": "string" }, "error_message": { "description": "错误信息(可选)", "type": "string" }, "event": { "description": "藏品事件(可选)", "type": "string" }, "material_type": { "description": "素材类型(可选)", "type": "string" }, "material_url": { "description": "阶段一保存的素材URL(可选)", "type": "string" }, "minted_at": { "description": "上链成功时间(毫秒时间戳,可选)", "type": "integer" }, "name": { "description": "阶段一保存的名称(可选)", "type": "string" }, "order_id": { "description": "订单ID(UUID)", "type": "string" }, "retry_count": { "description": "重试次数", "type": "integer" }, "star_id": { "description": "明星ID", "type": "integer" }, "status": { "description": "状态:PENDING, PROCESSING, SUCCESS, FAILED", "type": "string" }, "tx_hash": { "description": "交易哈希(成功时)", "type": "string" }, "updated_at": { "description": "更新时间(毫秒时间戳)", "type": "integer" }, "user_id": { "description": "用户ID", "type": "integer" } } }, "dto.MyFanIdentitiesResponseDTO": { "type": "object", "properties": { "current_star_id": { "description": "当前激活的明星ID", "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/dto.MyFanIdentityItemDTO" } }, "total": { "type": "integer" } } }, "dto.MyFanIdentityItemDTO": { "type": "object", "properties": { "crystal_balance": { "description": "水晶余额", "type": "integer" }, "experience": { "description": "经验值", "type": "integer" }, "identity_id": { "description": "身份ID(如 \"xz\")", "type": "string" }, "is_active": { "description": "是否激活(当前使用)", "type": "boolean" }, "level": { "description": "等级", "type": "integer" }, "nickname": { "description": "用户昵称", "type": "string" }, "star_id": { "description": "明星ID", "type": "integer" }, "star_name": { "description": "明星名称", "type": "string" }, "star_tag": { "description": "明星标签", "type": "string" } } }, "dto.OwnerInfoDTO": { "type": "object", "properties": { "avatar": { "description": "头像URL", "type": "string" }, "nickname": { "description": "昵称", "type": "string" }, "user_id": { "description": "用户ID", "type": "integer" } } }, "dto.PlaceAssetRequestDTO": { "type": "object", "required": [ "asset_id", "gallery_owner_id", "slot_id" ], "properties": { "asset_id": { "description": "资产ID(必填)", "type": "integer" }, "gallery_owner_id": { "description": "展馆所有者ID(必填)", "type": "integer" }, "slot_id": { "description": "展位ID(必填)", "type": "integer" } } }, "dto.PreCreateMintOrderRequestDTO": { "type": "object", "required": [ "material_url" ], "properties": { "description": { "description": "描述(可选)", "type": "string" }, "event": { "description": "藏品事件(可选)", "type": "string" }, "material_type": { "description": "素材类型(可选)", "type": "string" }, "material_url": { "description": "素材URL(必填)", "type": "string" }, "name": { "description": "藏品名称(可选)", "type": "string" } } }, "dto.ProfileResponseDTO": { "type": "object", "properties": { "assets_num": { "type": "integer" }, "chain_address": { "type": "string" }, "crystal_balance": { "type": "integer" }, "fan_identity": { "$ref": "#/definitions/dto.FanIdentityDTO" }, "fan_level": { "type": "integer" }, "nickname": { "type": "string" }, "slot_limit": { "type": "integer" }, "starbook_limit": { "type": "integer" }, "uid": { "type": "integer" } } }, "dto.RegisterResponseDTO": { "type": "object", "properties": { "access_token": { "type": "string" }, "expires_in": { "type": "integer" }, "user": { "$ref": "#/definitions/dto.UserWithIdentityDTO" } } }, "dto.SlotInfoDTO": { "type": "object", "properties": { "asset": { "description": "展品信息(仅当status为OCCUPIED时存在)", "allOf": [ { "$ref": "#/definitions/dto.AssetInfoDTO" } ] }, "can_operate": { "description": "当前用户是否可以操作此展位", "type": "boolean" }, "expire_at": { "description": "占用过期时间(毫秒时间戳,仅当status为OCCUPIED时存在)", "type": "integer" }, "is_enabled": { "description": "是否已解锁", "type": "boolean" }, "occupied_at": { "description": "占用开始时间(毫秒时间戳,仅当status为OCCUPIED时存在)", "type": "integer" }, "occupier_uid": { "description": "占位者用户ID(仅当status为OCCUPIED时存在)", "type": "integer" }, "operation": { "description": "操作类型: \"place\" | \"remove\" | \"none\"", "type": "string" }, "slot_id": { "description": "展位ID", "type": "integer" }, "slot_index": { "description": "展位序号", "type": "integer" }, "status": { "description": "状态:EMPTY, OCCUPIED, LOCKED", "type": "string" }, "unlock_condition": { "description": "解锁条件(仅当status为LOCKED时存在)", "allOf": [ { "$ref": "#/definitions/dto.UnlockConditionDTO" } ] }, "visibility": { "description": "public / private", "type": "string" } } }, "dto.SwitchIdentityResponseDTO": { "type": "object", "properties": { "access_token": { "type": "string" }, "current_identity": { "$ref": "#/definitions/dto.CurrentIdentityDTO" }, "expires_in": { "type": "integer" } } }, "dto.UnlockConditionDTO": { "type": "object", "properties": { "type": { "description": "解锁类型:level(等级), crystal(水晶)", "type": "string" }, "value": { "description": "解锁条件值(等级或水晶数量)", "type": "integer" } } }, "dto.UpdateNicknameResponseDTO": { "type": "object", "properties": { "nickname": { "type": "string" } } }, "dto.UserWithIdentityDTO": { "type": "object", "properties": { "assets_num": { "description": "assets_count", "type": "integer" }, "avatar_url": { "type": "string" }, "chain_address": { "type": "string" }, "crystal_balance": { "type": "integer" }, "fan_identity": { "$ref": "#/definitions/dto.FanIdentityDTO" }, "fan_level": { "type": "integer" }, "nickname": { "type": "string" }, "slot_limit": { "type": "integer" }, "starbook_limit": { "type": "integer" }, "uid": { "description": "使用 uid,值为数据库ID", "type": "integer" } } }, "response.Response": { "type": "object", "properties": { "code": { "type": "integer" }, "data": {}, "message": { "type": "string" } } }, "user.AddIdentityRequest": { "type": "object", "properties": { "nickname": { "description": "粉丝身份昵称", "type": "string" }, "star_id": { "description": "选择的明星ID", "type": "integer" } } }, "user.CheckNicknameRequest": { "type": "object", "properties": { "nickname": { "description": "要检查的昵称", "type": "string" } } }, "user.CheckNicknameResponse": { "type": "object", "properties": { "base": { "$ref": "#/definitions/common.BaseResponse" }, "exists": { "description": "昵称是否已存在", "type": "boolean" } } }, "user.LoginRequest": { "type": "object", "properties": { "mobile": { "description": "手机号", "type": "string" }, "password": { "description": "密码", "type": "string" }, "star_id": { "description": "可选:指定登录的明星ID,不指定则使用最早创建的粉丝档案", "type": "integer" } } }, "user.RegisterRequest": { "type": "object", "properties": { "mobile": { "description": "手机号", "type": "string" }, "nickname": { "description": "第一个粉丝身份的昵称", "type": "string" }, "password": { "description": "密码", "type": "string" }, "star_id": { "description": "选择第一个粉丝身份的明星ID", "type": "integer" } } }, "user.SwitchIdentityRequest": { "type": "object", "properties": { "new_star_id": { "description": "切换到的新明星ID", "type": "integer" } } }, "user.UpdateAvatarRequest": { "type": "object", "properties": { "avatar_url": { "description": "头像URL(必填)", "type": "string" } } }, "user.UpdateNicknameRequest": { "type": "object", "properties": { "nickname": { "description": "新昵称", "type": "string" } } }, "user.UpdatePasswordRequest": { "type": "object", "properties": { "new_password": { "description": "新密码", "type": "string" }, "old_password": { "description": "旧密码", "type": "string" } } }, "user.ValidateTokenRequest": { "type": "object", "properties": { "access_token": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }