1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| @Data @TableName("pms_brand") public class BrandEntity implements Serializable { private static final long serialVersionUID = 1L;
@NotNull(message = "修改必须指定品牌id", groups = {UpdateGroup.class}) @Null(message = "新增不能指定id", groups = {AddGroup.class}) @TableId private Long brandId;
@NotBlank(message = "品牌名不能为空", groups = {AddGroup.class, UpdateGroup.class}) private String name;
@NotBlank(message = "logo不能为空", groups = {AddGroup.class}) @URL(message = "logo必须是一个合法的url地址", groups = {AddGroup.class, UpdateGroup.class}) private String logo;
private String descript;
@NotNull(groups = {AddGroup.class, UpdateStatusGroup.class}) @ListValue(vals = {0, 1}, groups = {AddGroup.class, UpdateStatusGroup.class}) private Integer showStatus;
@NotEmpty(message = "检索首字母不能为空", groups = {AddGroup.class}) @Pattern(regexp = "^[a-zA-Z]$", message = "检索首字母必须是一个字母", groups = {AddGroup.class, UpdateGroup.class}) private String firstLetter;
@NotNull(message = "排序不能为空", groups = {AddGroup.class}) @Min(value = 0, message = "排序必须大于等于0", groups = {AddGroup.class, UpdateGroup.class}) private Integer sort;
}
|