package com.mossle.vehicle.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;

/**
 * VehicleInfo 车辆信息.
 * 
 * @author Lingo
 */
@Entity
@Table(name = "VEHICLE_INFO")
public class VehicleInfo implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

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

    /** 名称. */
    private String name;

    /** 车牌号. */
    private String code;

    /** 状态，在库，使用，维修，报废. */
    private Integer status;

    /** 载重，吨. */
    private Integer weight;

    /** 座位，个. */
    private Integer seat;

    /** 类型，小型车. */
    private String type;

    /** 颜色. */
    private String color;

    /** 购买时间. */
    private Date buyDate;

    /** 机动车交通事故责任强制保险时间. */
    private Date clivtaDate;

    /** 商业险时间. */
    private Date viDate;

    /** 价格，分. */
    private Integer price;

    /** 发动机编号. */
    private String engineNumber;

    /** 出厂编号. */
    private String vin;

    /** 备注. */
    private String description;

    /** 使用单位. */
    private String usingUnit;

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

    /** . */
    private Set<VehicleTask> vehicleTasks = new HashSet<VehicleTask>(0);

    /** . */
    private Set<VehicleAccident> vehicleAccidents = new HashSet<VehicleAccident>(
            0);

    public VehicleInfo() {
    }

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

    public VehicleInfo(Long id, String name, String code, Integer status,
            Integer weight, Integer seat, String type, String color,
            Date buyDate, Date clivtaDate, Date viDate, Integer price,
            String engineNumber, String vin, String description,
            String usingUnit, String tenantId, Set<VehicleTask> vehicleTasks,
            Set<VehicleAccident> vehicleAccidents) {
        this.id = id;
        this.name = name;
        this.code = code;
        this.status = status;
        this.weight = weight;
        this.seat = seat;
        this.type = type;
        this.color = color;
        this.buyDate = buyDate;
        this.clivtaDate = clivtaDate;
        this.viDate = viDate;
        this.price = price;
        this.engineNumber = engineNumber;
        this.vin = vin;
        this.description = description;
        this.usingUnit = usingUnit;
        this.tenantId = tenantId;
        this.vehicleTasks = vehicleTasks;
        this.vehicleAccidents = vehicleAccidents;
    }

    /** @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 = "NAME", length = 200)
    public String getName() {
        return this.name;
    }

    /**
     * @param name
     *            名称.
     */
    public void setName(String name) {
        this.name = name;
    }

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

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

    /** @return 状态，在库，使用，维修，报废. */
    @Column(name = "STATUS")
    public Integer getStatus() {
        return this.status;
    }

    /**
     * @param status
     *            状态，在库，使用，维修，报废.
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /** @return 载重，吨. */
    @Column(name = "WEIGHT")
    public Integer getWeight() {
        return this.weight;
    }

    /**
     * @param weight
     *            载重，吨.
     */
    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    /** @return 座位，个. */
    @Column(name = "SEAT")
    public Integer getSeat() {
        return this.seat;
    }

    /**
     * @param seat
     *            座位，个.
     */
    public void setSeat(Integer seat) {
        this.seat = seat;
    }

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

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

    /** @return 颜色. */
    @Column(name = "COLOR", length = 50)
    public String getColor() {
        return this.color;
    }

    /**
     * @param color
     *            颜色.
     */
    public void setColor(String color) {
        this.color = color;
    }

    /** @return 购买时间. */
    @Temporal(TemporalType.DATE)
    @Column(name = "BUY_DATE", length = 10)
    public Date getBuyDate() {
        return this.buyDate;
    }

    /**
     * @param buyDate
     *            购买时间.
     */
    public void setBuyDate(Date buyDate) {
        this.buyDate = buyDate;
    }

    /** @return 机动车交通事故责任强制保险时间. */
    @Temporal(TemporalType.DATE)
    @Column(name = "CLIVTA_DATE", length = 10)
    public Date getClivtaDate() {
        return this.clivtaDate;
    }

    /**
     * @param clivtaDate
     *            机动车交通事故责任强制保险时间.
     */
    public void setClivtaDate(Date clivtaDate) {
        this.clivtaDate = clivtaDate;
    }

    /** @return 商业险时间. */
    @Temporal(TemporalType.DATE)
    @Column(name = "VI_DATE", length = 10)
    public Date getViDate() {
        return this.viDate;
    }

    /**
     * @param viDate
     *            商业险时间.
     */
    public void setViDate(Date viDate) {
        this.viDate = viDate;
    }

    /** @return 价格，分. */
    @Column(name = "PRICE")
    public Integer getPrice() {
        return this.price;
    }

    /**
     * @param price
     *            价格，分.
     */
    public void setPrice(Integer price) {
        this.price = price;
    }

    /** @return 发动机编号. */
    @Column(name = "ENGINE_NUMBER", length = 50)
    public String getEngineNumber() {
        return this.engineNumber;
    }

    /**
     * @param engineNumber
     *            发动机编号.
     */
    public void setEngineNumber(String engineNumber) {
        this.engineNumber = engineNumber;
    }

    /** @return 出厂编号. */
    @Column(name = "VIN", length = 50)
    public String getVin() {
        return this.vin;
    }

    /**
     * @param vin
     *            出厂编号.
     */
    public void setVin(String vin) {
        this.vin = vin;
    }

    /** @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 = "USING_UNIT", length = 50)
    public String getUsingUnit() {
        return this.usingUnit;
    }

    /**
     * @param usingUnit
     *            使用单位.
     */
    public void setUsingUnit(String usingUnit) {
        this.usingUnit = usingUnit;
    }

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

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

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "vehicleInfo")
    public Set<VehicleTask> getVehicleTasks() {
        return this.vehicleTasks;
    }

    /**
     * @param vehicleTasks
     *            .
     */
    public void setVehicleTasks(Set<VehicleTask> vehicleTasks) {
        this.vehicleTasks = vehicleTasks;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "vehicleInfo")
    public Set<VehicleAccident> getVehicleAccidents() {
        return this.vehicleAccidents;
    }

    /**
     * @param vehicleAccidents
     *            .
     */
    public void setVehicleAccidents(Set<VehicleAccident> vehicleAccidents) {
        this.vehicleAccidents = vehicleAccidents;
    }
}
