package com.mossle.travel.persistence.domain;

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

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

/**
 * TravelItem 差旅明细.
 * 
 * @author Lingo
 */
@Entity
@Table(name = "TRAVEL_ITEM")
public class TravelItem implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

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

    /** null. */
    private TravelInfo travelInfo;

    /** 国内国际. */
    private String international;

    /** 交通工具. */
    private String vehicle;

    /** 单程往返. */
    private String type;

    /** 出发城市. */
    private String startCity;

    /** 目的城市. */
    private String endCity;

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

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

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

    /** 排序. */
    private Integer priority;

    public TravelItem() {
    }

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

    public TravelItem(Long id, TravelInfo travelInfo, String international,
            String vehicle, String type, String startCity, String endCity,
            Date startDate, Date endDate, Integer day, Integer priority) {
        this.id = id;
        this.travelInfo = travelInfo;
        this.international = international;
        this.vehicle = vehicle;
        this.type = type;
        this.startCity = startCity;
        this.endCity = endCity;
        this.startDate = startDate;
        this.endDate = endDate;
        this.day = day;
        this.priority = priority;
    }

    /** @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 null. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "INFO_ID")
    public TravelInfo getTravelInfo() {
        return this.travelInfo;
    }

    /**
     * @param travelInfo
     *            null.
     */
    public void setTravelInfo(TravelInfo travelInfo) {
        this.travelInfo = travelInfo;
    }

    /** @return 国内国际. */
    @Column(name = "INTERNATIONAL", length = 50)
    public String getInternational() {
        return this.international;
    }

    /**
     * @param international
     *            国内国际.
     */
    public void setInternational(String international) {
        this.international = international;
    }

    /** @return 交通工具. */
    @Column(name = "VEHICLE", length = 100)
    public String getVehicle() {
        return this.vehicle;
    }

    /**
     * @param vehicle
     *            交通工具.
     */
    public void setVehicle(String vehicle) {
        this.vehicle = vehicle;
    }

    /** @return 单程往返. */
    @Column(name = "TYPE", length = 100)
    public String getType() {
        return this.type;
    }

    /**
     * @param type
     *            单程往返.
     */
    public void setType(String type) {
        this.type = type;
    }

    /** @return 出发城市. */
    @Column(name = "START_CITY", length = 50)
    public String getStartCity() {
        return this.startCity;
    }

    /**
     * @param startCity
     *            出发城市.
     */
    public void setStartCity(String startCity) {
        this.startCity = startCity;
    }

    /** @return 目的城市. */
    @Column(name = "END_CITY", length = 50)
    public String getEndCity() {
        return this.endCity;
    }

    /**
     * @param endCity
     *            目的城市.
     */
    public void setEndCity(String endCity) {
        this.endCity = endCity;
    }

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

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

    /** @return 结束时间. */
    @Temporal(TemporalType.DATE)
    @Column(name = "END_DATE", length = 10)
    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 = "PRIORITY")
    public Integer getPriority() {
        return this.priority;
    }

    /**
     * @param priority
     *            排序.
     */
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
}
