mitao
2025-02-26 b37f92c1f5bea036b13af38d82a0fa9ca690eb3b
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
48
49
50
package com.panzhihua.sangeshenbian.model.entity;
 
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
import java.util.List;
 
/**
 * @author zhibing.pu
 * @Date 2025/2/19 17:40
 */
@Data
@ApiModel
@TableName("sgsb_department")
public class Department {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("数据ID")
    private Integer id;
    /**
     * 上级id
     */
    @TableField("pid")
    @ApiModelProperty("上级id")
    private Integer pid;
    /**
     * 单位名称
     */
    @TableField("name")
    @ApiModelProperty("单位名称")
    private String name;
    /**
     * 层级,最多4层
     */
    @TableField("tier")
    @ApiModelProperty("层级,最多4层")
    private Integer tier;
    
    
    @TableField(exist = false)
    @ApiModelProperty("下级单位")
    private List<Department> child;
}