package com.mossle.travel.persistence.domain;

// Generated by Hibernate Tools
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TravelInfo 差旅信息.
 * 
 * @author Lingo
 */
@Entity
@Table(name = "TRAVEL_INFO")
public class TravelInfo implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

    /** 主键. */
    private Long id;

    /** 单号. */
    private String code;

    /** 类型. */
    private String type;

    /** 申请人. */
    private String userId;

    /** 申请人部门编码. */
    private String deptCode;

    /** 申请人部门名称. */
    private String deptName;

    /** 创建时间. */
    private Date createTime;

    /** 状态. */
    private String status;

    /** 项目. */
    private String project;

    /** 申请原因. */
    private String description;

    /** 多租户. */
    private String tenantId;

    /** 出差人. */
    private String traveller;

    /** 成本中心公司. */
    private String costCenterCompany;

    /** 成本中心部门. */
    private String costCenterDepartment;

    /** 开始时间. */
    private Date startDate;

    /** 结束时间. */
    private Date endDate;

    /** 天数. */
    private Integer day;

    /** 同行人. */
    private String peer;

    /** 成本预估. */
    private Integer cost;

    /** . */
    private Set<TravelItem> travelItems = new HashSet<TravelItem>(0);

    public TravelInfo() {
    }

    public TravelInfo(Long id) {
        this.id = id;
    }

    public TravelInfo(Long id, String code, String type, String userId,
            String deptCode, String deptName, Date createTime, String status,
            String project, String description, String tenantId,
            String traveller, String costCenterCompany,
            String costCenterDepartment, Date startDate, Date endDate,
            Integer day, String peer, Integer cost, Set<TravelItem> travelItems) {
        this.id = id;
        this.code = code;
        this.type = type;
        this.userId = userId;
        this.deptCode = deptCode;
        this.deptName = deptName;
        this.createTime = createTime;
        this.status = status;
        this.project = project;
        this.description = description;
        this.tenantId = tenantId;
        this.traveller = traveller;
        this.costCenterCompany = costCenterCompany;
        this.costCenterDepartment = costCenterDepartment;
        this.startDate = startDate;
        this.endDate = endDate;
        this.day = day;
        this.peer = peer;
        this.cost = cost;
        this.travelItems = travelItems;
    }

    /** @return 主键. */
    @Id
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    /**
     * @param id
     *            主键.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /** @return 单号. */
    @Column(name = "CODE", length = 100)
    public String getCode() {
        return this.code;
    }

    /**
     * @param code
     *            单号.
     */
    public void setCode(String code) {
        this.code = code;
    }

    /** @return 类型. */
    @Column(name = "TYPE", length = 200)
    public String getType() {
        return this.type;
    }

    /**
     * @param type
     *            类型.
     */
    public void setType(String type) {
        this.type = type;
    }

    /** @return 申请人. */
    @Column(name = "USER_ID", length = 64)
    public String getUserId() {
        return this.userId;
    }

    /**
     * @param userId
     *            申请人.
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /** @return 申请人部门编码. */
    @Column(name = "DEPT_CODE", length = 50)
    public String getDeptCode() {
        return this.deptCode;
    }

    /**
     * @param deptCode
     *            申请人部门编码.
     */
    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }

    /** @return 申请人部门名称. */
    @Column(name = "DEPT_NAME", length = 50)
    public String getDeptName() {
        return this.deptName;
    }

    /**
     * @param deptName
     *            申请人部门名称.
     */
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    /** @return 创建时间. */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATE_TIME", length = 26)
    public Date getCreateTime() {
        return this.createTime;
    }

    /**
     * @param createTime
     *            创建时间.
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /** @return 状态. */
    @Column(name = "STATUS", length = 50)
    public String getStatus() {
        return this.status;
    }

    /**
     * @param status
     *            状态.
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /** @return 项目. */
    @Column(name = "PROJECT", length = 50)
    public String getProject() {
        return this.project;
    }

    /**
     * @param project
     *            项目.
     */
    public void setProject(String project) {
        this.project = project;
    }

    /** @return 申请原因. */
    @Column(name = "DESCRIPTION", length = 200)
    public String getDescription() {
        return this.description;
    }

    /**
     * @param description
     *            申请原因.
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /** @return 多租户. */
    @Column(name = "TENANT_ID", length = 64)
    public String getTenantId() {
        return this.tenantId;
    }

    /**
     * @param tenantId
     *            多租户.
     */
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    /** @return 出差人. */
    @Column(name = "TRAVELLER", length = 64)
    public String getTraveller() {
        return this.traveller;
    }

    /**
     * @param traveller
     *            出差人.
     */
    public void setTraveller(String traveller) {
        this.traveller = traveller;
    }

    /** @return 成本中心公司. */
    @Column(name = "COST_CENTER_COMPANY", length = 50)
    public String getCostCenterCompany() {
        return this.costCenterCompany;
    }

    /**
     * @param costCenterCompany
     *            成本中心公司.
     */
    public void setCostCenterCompany(String costCenterCompany) {
        this.costCenterCompany = costCenterCompany;
    }

    /** @return 成本中心部门. */
    @Column(name = "COST_CENTER_DEPARTMENT", length = 50)
    public String getCostCenterDepartment() {
        return this.costCenterDepartment;
    }

    /**
     * @param costCenterDepartment
     *            成本中心部门.
     */
    public void setCostCenterDepartment(String costCenterDepartment) {
        this.costCenterDepartment = costCenterDepartment;
    }

    /** @return 开始时间. */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "START_DATE", length = 26)
    public Date getStartDate() {
        return this.startDate;
    }

    /**
     * @param startDate
     *            开始时间.
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /** @return 结束时间. */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "END_DATE", length = 26)
    public Date getEndDate() {
        return this.endDate;
    }

    /**
     * @param endDate
     *            结束时间.
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /** @return 天数. */
    @Column(name = "DAY")
    public Integer getDay() {
        return this.day;
    }

    /**
     * @param day
     *            天数.
     */
    public void setDay(Integer day) {
        this.day = day;
    }

    /** @return 同行人. */
    @Column(name = "PEER", length = 200)
    public String getPeer() {
        return this.peer;
    }

    /**
     * @param peer
     *            同行人.
     */
    public void setPeer(String peer) {
        this.peer = peer;
    }

    /** @return 成本预估. */
    @Column(name = "COST")
    public Integer getCost() {
        return this.cost;
    }

    /**
     * @param cost
     *            成本预估.
     */
    public void setCost(Integer cost) {
        this.cost = cost;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "travelInfo")
    public Set<TravelItem> getTravelItems() {
        return this.travelItems;
    }

    /**
     * @param travelItems
     *            .
     */
    public void setTravelItems(Set<TravelItem> travelItems) {
        this.travelItems = travelItems;
    }
}
