wjli
2023-05-15 1c0677b00266bd6556da04a38aabacbff42b09e1
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package ${entity.entityPackage};
 
import cn.exrick.xboot.core.base.XbootBaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
<%
if(entity.activiti&&!entity.isTree){
%>
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
<%
}
%>
<%
if(entity.isTree){
%>
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.TableField;
 
import javax.persistence.Column;
import java.math.BigDecimal;
<%
}
%>
import javax.persistence.Entity;
import javax.persistence.Table;
 
/**
 * @author ${entity.author}
 */
@Data
@Accessors(chain = true)
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "${entity.tableName}")
@TableName("${entity.tableName}")
@ApiModel(value = "${entity.description}")
public class ${entity.className} extends XbootBaseEntity {
 
    private static final long serialVersionUID = 1L;
 
    <%
    if(entity.activiti&&!entity.isTree){
    %>
    @ApiModelProperty(value = "关联流程申请表id")
    private String actBusinessId;
 
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "申请用户")
    private String applyUser;
 
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "表单路由名")
    private String routeName;
 
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "流程实例id")
    private String procInstId;
 
    @Transient
    @TableField(exist=false)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "提交申请时间")
    private Date applyTime;
 
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "状态 0草稿默认 1处理中 2结束")
    private Integer status;
 
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "结果状态 0未提交默认 1处理中 2通过 3驳回")
    private Integer result;
    <%
    }
    %>
    <%
    if(entity.isTree){
    %>
    @ApiModelProperty(value = "名称")
    private String title;
 
    @ApiModelProperty(value = "父id")
    @Column(nullable = false)
    private String parentId;
 
    @ApiModelProperty(value = "是否为父节点(含子节点) 默认false")
    private Boolean isParent = false;
 
    @ApiModelProperty(value = "排序值")
    @Column(precision = 10, scale = 2)
    private BigDecimal sortOrder;
 
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "父节点名称")
    private String parentTitle;
    <%
    }
    %>
}