commit c49434e36f293afdd23416e3bafc14eb9e59f500 Author: 8ga Date: Sat Jun 21 08:55:06 2025 +0800 添加 Java21_SpBoot3_Gen_Bean.md diff --git a/Java21_SpBoot3_Gen_Bean.md b/Java21_SpBoot3_Gen_Bean.md new file mode 100644 index 0000000..2e5eb51 --- /dev/null +++ b/Java21_SpBoot3_Gen_Bean.md @@ -0,0 +1,65 @@ +``` +根据SysUser为下面的表结构生成JavaBean,你只需要生成一个JavaBean的内容即可,以下是SysUser: +@Getter +@Setter +@TableName(value = "t_sys_user") +public class SysUser implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ASSIGN_ID) + @Schema(name = "id", description = "ID") + private Long id; + + @Schema(name = "mobile", description = "手机号") + @NotBlank + @MustMobile + @Length(max = 11) + private String mobile; + + @Schema(name = "name", description = "姓名") + @NotBlank + @Length(max = 200) + private String name; + + @Schema(name = "idCardNo", description = "身份证号") + @MustIdCard + private String idCardNo; + + @Schema(name = "password", description = "登录密码") + @NotBlank + @Password + @Length(min = 8, max = 16) + private String password; + + @Schema(name = "salt", description = "密钥salt") + private String salt; + + @Email + @Length(max = 200) + @Schema(name = "email", description = "邮箱") + private String email; + + @Schema(name = "gender", description = "性别 0=女,1=男") + private Gender gender; + + @Schema(name = "state", description = Enable.DESC) + private Enable state; + + @Schema(name = "createAt", description = "创建时间") + private LocalDateTime createAt; + + @Schema(name = "updateAt", description = "变更时间") + private LocalDateTime updateAt; + + @Schema(name = "createAtName", description = "创建人") + private String createAtName; + + @Schema(name = "updateAtName", description = "变更人") + private String updateAtName; + +} +以上是SysUser,以下是表结构: + +``` \ No newline at end of file