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
/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.test.entity.one;
 
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 java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
 
import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
 
/**
 * 请假单Entity
 * @author lgf
 * @version 2016-03-13
 */
public class FormLeave extends DataEntity<FormLeave> {
    
    private static final long serialVersionUID = 1L;
    private User user;        // 员工
    private Office office;        // 归属部门
    private Area area;        // 归属区域
    private Date beginDate;        // 请假开始日期
    private Date endDate;        // 请假结束日期
    
    public FormLeave() {
        super();
    }
 
    public FormLeave(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;
    }
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message="请假开始日期不能为空")
    @ExcelField(title="请假开始日期", align=2, sort=4)
    public Date getBeginDate() {
        return beginDate;
    }
 
    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message="请假结束日期不能为空")
    @ExcelField(title="请假结束日期", align=2, sort=5)
    public Date getEndDate() {
        return endDate;
    }
 
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
    
}