refactor: flatten dto entity and mapper packages
This commit is contained in:
49
src/main/java/com/label/entity/SysUser.java
Normal file
49
src/main/java/com/label/entity/SysUser.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package com.label.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 系统用户实体,对应 sys_user 表。
|
||||
* role 取值:UPLOADER / ANNOTATOR / REVIEWER / ADMIN
|
||||
* status 取值:ACTIVE / DISABLED
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user")
|
||||
public class SysUser {
|
||||
|
||||
/** 用户主键,自增 */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 所属公司 ID(多租户键) */
|
||||
private Long companyId;
|
||||
|
||||
/** 登录用户名(同公司内唯一) */
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* BCrypt 哈希密码(strength ≥ 10)。
|
||||
* 序列化时排除,防止密码哈希泄漏到 API 响应。
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String passwordHash;
|
||||
|
||||
/** 真实姓名 */
|
||||
private String realName;
|
||||
|
||||
/** 角色:UPLOADER / ANNOTATOR / REVIEWER / ADMIN */
|
||||
private String role;
|
||||
|
||||
/** 状态:ACTIVE / DISABLED */
|
||||
private String status;
|
||||
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
Reference in New Issue
Block a user