Skip to content

Commit

Permalink
✨ 增加修改个人信息的 API
Browse files Browse the repository at this point in the history
  • Loading branch information
cfdxkk committed Oct 29, 2023
1 parent 61f240a commit 1dc399c
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions composables/api/User/UserControllerDto.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,83 @@ export type BeforeHashPasswordDataType = {
/** 在前端已经 Hash 过一次的的密码 */
passwordHash: string;
};

/**
* 更新或创建用户信息时的请求参数
*/
export type UpdateOrCreateUserInfoRequestDto = {
/** 用户名 */
username?: string;
/** 用户头像的链接 */
avatar?: string;
/** 用户背景图片的链接 */
userBannerImage?: string;
/** 用户的个性签名 */
signature?: string;
/** 用户的性别,男、女和自定义(字符串)v */
gender?: string;
/** 用户的个人标签 */
label: UserLabelSchema[];
};

/**
* 用户的个人标签
*/
type UserLabelSchema = {
/** 标签 ID */
id: number;
/** 标签名 */
labelName: string;
};

/**
* 更新或创建用户信息的请求结果
*/
export type UpdateOrCreateUserInfoResponseDto = {
/** 执行结果,程序执行成功,返回 true,程序执行失败,返回 false */
success: boolean;
/** 附加的文本消息 */
message?: string;
/** 请求结果 */
result?: {
/** 用户的 UID */
uid: number;
/** 用户名 */
username?: string;
/** 用户头像的链接 */
avatar?: string;
/** 用户背景图片的链接 */
userBannerImage?: string;
/** 用户的个性签名 */
signature?: string;
/** 用户的性别,男、女和自定义(字符串)v */
gender?: string;
/** 用户的个人标签 */
label?: UserLabelSchema[];
};
};

/**
* 通过 UID 获取用户信息的请求结果
*/
export type GetUserInfoByUidResponseDto = {
/** 执行结果,程序执行成功,返回 true,程序执行失败,返回 false */
success: boolean;
/** 附加的文本消息 */
message?: string;
/** 请求结果 */
result?: {
/** 用户名 */
username?: string;
/** 用户头像的链接 */
avatar?: string;
/** 用户背景图片的链接 */
userBannerImage?: string;
/** 用户的个性签名 */
signature?: string;
/** 用户的性别,男、女和自定义(字符串)v */
gender?: string;
/** 用户的个人标签 */
label?: UserLabelSchema[];
};
};

0 comments on commit 1dc399c

Please sign in to comment.