liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.test.entity.onetomany;
 
import com.jeeplus.modules.sys.entity.User;
import javax.validation.constraints.NotNull;
import com.jeeplus.modules.sys.entity.Office;
import com.jeeplus.modules.sys.entity.Area;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List;
import com.google.common.collect.Lists;
 
import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
 
/**
 * 票务代理Entity
 * @author liugf
 * @version 2016-03-13
 */
public class TestDataMain extends DataEntity<TestDataMain> {
    
    private static final long serialVersionUID = 1L;
    private User user;        // 归属用户
    private Office office;        // 归属部门
    private Area area;        // 归属区域
    private String name;        // 名称
    private String sex;        // 性别
    private Date inDate;        // 加入日期
    private Date beginInDate;        // 开始 加入日期
    private Date endInDate;        // 结束 加入日期
    private List<TestDataChild> testDataChildList = Lists.newArrayList();        // 子表列表
    private List<TestDataChild2> testDataChild2List = Lists.newArrayList();        // 子表列表
    private List<TestDataChild3> testDataChild3List = Lists.newArrayList();        // 子表列表
    
    public TestDataMain() {
        super();
    }
 
    public TestDataMain(String id){
        super(id);
    }
 
    @NotNull(message="归属用户不能为空")
    @ExcelField(title="归属用户", fieldType=User.class, value="user.name", align=2, sort=1)
    public User getUser() {
        return user;
    }
 
    public void setUser(User user) {
        this.user = user;
    }
    
    @NotNull(message="归属部门不能为空")
    @ExcelField(title="归属部门", fieldType=Office.class, value="office.name", align=2, sort=2)
    public Office getOffice() {
        return office;
    }
 
    public void setOffice(Office office) {
        this.office = office;
    }
    
    @NotNull(message="归属区域不能为空")
    @ExcelField(title="归属区域", fieldType=Area.class, value="area.name", align=2, sort=3)
    public Area getArea() {
        return area;
    }
 
    public void setArea(Area area) {
        this.area = area;
    }
    
    @Length(min=1, max=100, message="名称长度必须介于 1 和 100 之间")
    @ExcelField(title="名称", align=2, sort=4)
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
    
    @Length(min=1, max=1, message="性别长度必须介于 1 和 1 之间")
    @ExcelField(title="性别", dictType="sex", align=2, sort=5)
    public String getSex() {
        return sex;
    }
 
    public void setSex(String sex) {
        this.sex = sex;
    }
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message="加入日期不能为空")
    @ExcelField(title="加入日期", align=2, sort=6)
    public Date getInDate() {
        return inDate;
    }
 
    public void setInDate(Date inDate) {
        this.inDate = inDate;
    }
    
    public Date getBeginInDate() {
        return beginInDate;
    }
 
    public void setBeginInDate(Date beginInDate) {
        this.beginInDate = beginInDate;
    }
    
    public Date getEndInDate() {
        return endInDate;
    }
 
    public void setEndInDate(Date endInDate) {
        this.endInDate = endInDate;
    }
        
    public List<TestDataChild> getTestDataChildList() {
        return testDataChildList;
    }
 
    public void setTestDataChildList(List<TestDataChild> testDataChildList) {
        this.testDataChildList = testDataChildList;
    }
    public List<TestDataChild2> getTestDataChild2List() {
        return testDataChild2List;
    }
 
    public void setTestDataChild2List(List<TestDataChild2> testDataChild2List) {
        this.testDataChild2List = testDataChild2List;
    }
    public List<TestDataChild3> getTestDataChild3List() {
        return testDataChild3List;
    }
 
    public void setTestDataChild3List(List<TestDataChild3> testDataChild3List) {
        this.testDataChild3List = testDataChild3List;
    }
}