71 lines
2.0 KiB
Java
71 lines
2.0 KiB
Java
|
|
package com.gunshi.project.ss.model;
|
||
|
|
|
||
|
|
|
||
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||
|
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||
|
|
import com.gunshi.project.ss.common.validate.markers.Update;
|
||
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||
|
|
import jakarta.validation.constraints.NotBlank;
|
||
|
|
import jakarta.validation.constraints.NotNull;
|
||
|
|
import jakarta.validation.constraints.Size;
|
||
|
|
import lombok.Data;
|
||
|
|
|
||
|
|
import java.io.Serializable;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 描述: 风险管控目录
|
||
|
|
* author: xusan
|
||
|
|
* date: 2024-08-22 14:16:34
|
||
|
|
*/
|
||
|
|
@Schema(description="风险管控目录")
|
||
|
|
@Data
|
||
|
|
@TableName("public.risk_control_menu")
|
||
|
|
public class RiskControlMenu implements Serializable {
|
||
|
|
|
||
|
|
|
||
|
|
private static final long serialVersionUID = 1L;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 主键
|
||
|
|
*/
|
||
|
|
@TableId(value="id", type= IdType.AUTO)
|
||
|
|
@Schema(description="主键")
|
||
|
|
@NotNull(message = "主键不能为空",groups = {Update.class})
|
||
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
||
|
|
private Long id;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 父id
|
||
|
|
*/
|
||
|
|
@TableField(value="parent_id")
|
||
|
|
@Schema(description="父id")
|
||
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
||
|
|
private Long parentId;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 名称
|
||
|
|
*/
|
||
|
|
@TableField(value="name")
|
||
|
|
@Schema(description="名称")
|
||
|
|
@Size(max = 255,message = "名称最大长度要小于 255")
|
||
|
|
@NotBlank(message = "名称不能为空")
|
||
|
|
private String name;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 排序
|
||
|
|
*/
|
||
|
|
@TableField(value="order_index")
|
||
|
|
@Schema(description="排序")
|
||
|
|
private Integer orderIndex;
|
||
|
|
|
||
|
|
|
||
|
|
@TableField(exist = false)
|
||
|
|
@Schema(description="子集")
|
||
|
|
private List<RiskControlMenu> children;
|
||
|
|
|
||
|
|
}
|