| package com.dy.pmsGlobal.pojoBa; | 
|   | 
|   | 
| import com.alibaba.fastjson2.annotation.JSONField; | 
| import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
| import com.baomidou.mybatisplus.annotation.IdType; | 
| import com.baomidou.mybatisplus.annotation.TableId; | 
| import com.baomidou.mybatisplus.annotation.TableName; | 
| import com.dy.common.po.BaseEntity; | 
| import jakarta.validation.constraints.NotEmpty; | 
| import lombok.*; | 
| import org.hibernate.validator.constraints.Length; | 
|   | 
| /** | 
|  * 用户 | 
|  */ | 
| //2024-04-12下面TableName不用配置表名称(value="BaUser"或“ba_user”) | 
| //只要通过驼峰命名法则类名与表名对应起来就可以了,如果不能对应起来,需要指定表名称 | 
| //例如@TableName(value="TestUser" autoResultMap = true) | 
| @TableName(value="ba_sys_set", autoResultMap = true) | 
| @Data | 
| @Builder | 
| @ToString | 
| @NoArgsConstructor | 
| @AllArgsConstructor | 
| public class BaSysSet implements BaseEntity { | 
|   | 
|     public static final long serialVersionUID = 202404151528001L; | 
|     /** | 
|      * 主键 | 
|      */ | 
|     /* 如果不明确 type类型,MP将自动为其赋值(雪花ID) | 
|     IdType: | 
|     AUTO(0),  //自增 | 
|     NONE(1), //未设置主键 | 
|     INPUT(2), //手动输入 | 
|     ASSIGN_ID(3),  //默认全局唯一ID | 
|     ASSIGN_UUID(4), //全局唯一的 uuid | 
|     */ | 
|     @JSONField(serializeUsing= ObjectWriterImplToString.class) | 
|     @TableId(value = "id", type = IdType.INPUT) | 
|     public Long id; | 
|   | 
|     /** | 
|     * 系统名称 | 
|     */ | 
|     @NotEmpty(message = "系统名称不能为空") //不能为空也不能为null | 
|     @Length(message = "系统名称不大于{max}字,不小于{min}字", min = 2, max = 30) | 
|     public String sysName; | 
|   | 
|   | 
| } |