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
/**
 * 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.Area;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
 
import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
 
/**
 * 票务代理Entity
 * @author liugf
 * @version 2016-03-13
 */
public class TestDataChild3 extends DataEntity<TestDataChild3> {
    
    private static final long serialVersionUID = 1L;
    private Area start;        // 出发地
    private Area end;        // 目的地
    private Double price;        // 代理价格
    private TestDataMain testDataMain;        // 外键 父类
    
    public TestDataChild3() {
        super();
    }
 
    public TestDataChild3(String id){
        super(id);
    }
 
    public TestDataChild3(TestDataMain testDataMain){
        this.testDataMain = testDataMain;
    }
 
    @NotNull(message="出发地不能为空")
    @ExcelField(title="出发地", fieldType=Area.class, value="start.name", align=2, sort=1)
    public Area getStart() {
        return start;
    }
 
    public void setStart(Area start) {
        this.start = start;
    }
    
    @NotNull(message="目的地不能为空")
    @ExcelField(title="目的地", fieldType=Area.class, value="end.name", align=2, sort=2)
    public Area getEnd() {
        return end;
    }
 
    public void setEnd(Area end) {
        this.end = end;
    }
    
    @ExcelField(title="代理价格", align=2, sort=3)
    public Double getPrice() {
        return price;
    }
 
    public void setPrice(Double price) {
        this.price = price;
    }
    
    @Length(min=1, max=64, message="外键长度必须介于 1 和 64 之间")
    public TestDataMain getTestDataMain() {
        return testDataMain;
    }
 
    public void setTestDataMain(TestDataMain testDataMain) {
        this.testDataMain = testDataMain;
    }
    
}