提交swagger 对象接口补充
This commit is contained in:
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -15,16 +16,20 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user")
|
||||
@Schema(description = "系统用户")
|
||||
public class SysUser {
|
||||
|
||||
/** 用户主键,自增 */
|
||||
@TableId(type = IdType.AUTO)
|
||||
@Schema(description = "用户主键", example = "1")
|
||||
private Long id;
|
||||
|
||||
/** 所属公司 ID(多租户键) */
|
||||
@Schema(description = "所属公司 ID", example = "1")
|
||||
private Long companyId;
|
||||
|
||||
/** 登录用户名(同公司内唯一) */
|
||||
@Schema(description = "登录用户名", example = "admin")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
@@ -32,18 +37,24 @@ public class SysUser {
|
||||
* 序列化时排除,防止密码哈希泄漏到 API 响应。
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Schema(description = "密码哈希(不会在响应中返回)")
|
||||
private String passwordHash;
|
||||
|
||||
/** 真实姓名 */
|
||||
@Schema(description = "真实姓名", example = "张三")
|
||||
private String realName;
|
||||
|
||||
/** 角色:UPLOADER / ANNOTATOR / REVIEWER / ADMIN */
|
||||
@Schema(description = "角色", example = "ADMIN")
|
||||
private String role;
|
||||
|
||||
/** 状态:ACTIVE / DISABLED */
|
||||
@Schema(description = "状态", example = "ACTIVE")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "创建时间", example = "2026-04-15T12:34:56")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@Schema(description = "更新时间", example = "2026-04-15T12:34:56")
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user