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;

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

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

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

    /** 性别. */
    private String gender;

    /** 生日. */
    private Date birthday;

    /** 驾驶证号码. */
    private String code;

    /** 领证时间. */
    private Date licenseDate;

    /** 驾驶证到期时间. */
    private Date expireDate;

    /** 驾龄. */
    private Integer year;

    /** 准驾车型. */
    private String type;

    /** 电话. */
    private String mobile;

    /** 地址. */
    private String location;

    /** 年检记录. */
    private String annualInspection;

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

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

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

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

    public VehicleDriver() {
    }

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

    public VehicleDriver(Long id, String name, String gender, Date birthday,
            String code, Date licenseDate, Date expireDate, Integer year,
            String type, String mobile, String location,
            String annualInspection, Integer status, String description,
            String tenantId, Set<VehicleAccident> vehicleAccidents) {
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.birthday = birthday;
        this.code = code;
        this.licenseDate = licenseDate;
        this.expireDate = expireDate;
        this.year = year;
        this.type = type;
        this.mobile = mobile;
        this.location = location;
        this.annualInspection = annualInspection;
        this.status = status;
        this.description = description;
        this.tenantId = tenantId;
        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 = 50)
    public String getName() {
        return this.name;
    }

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

    /** @return 性别. */
    @Column(name = "GENDER", length = 50)
    public String getGender() {
        return this.gender;
    }

    /**
     * @param gender
     *            性别.
     */
    public void setGender(String gender) {
        this.gender = gender;
    }

    /** @return 生日. */
    @Temporal(TemporalType.DATE)
    @Column(name = "BIRTHDAY", length = 10)
    public Date getBirthday() {
        return this.birthday;
    }

    /**
     * @param birthday
     *            生日.
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /** @return 驾驶证号码. */
    @Column(name = "CODE", length = 50)
    public String getCode() {
        return this.code;
    }

    /**
     * @param code
     *            驾驶证号码.
     */
    public void setCode(String code) {
        this.code = code;
    }

    /** @return 领证时间. */
    @Temporal(TemporalType.DATE)
    @Column(name = "LICENSE_DATE", length = 10)
    public Date getLicenseDate() {
        return this.licenseDate;
    }

    /**
     * @param licenseDate
     *            领证时间.
     */
    public void setLicenseDate(Date licenseDate) {
        this.licenseDate = licenseDate;
    }

    /** @return 驾驶证到期时间. */
    @Temporal(TemporalType.DATE)
    @Column(name = "EXPIRE_DATE", length = 10)
    public Date getExpireDate() {
        return this.expireDate;
    }

    /**
     * @param expireDate
     *            驾驶证到期时间.
     */
    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    /** @return 驾龄. */
    @Column(name = "YEAR")
    public Integer getYear() {
        return this.year;
    }

    /**
     * @param year
     *            驾龄.
     */
    public void setYear(Integer year) {
        this.year = year;
    }

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

    /**
     * @param mobile
     *            电话.
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /** @return 地址. */
    @Column(name = "LOCATION", length = 200)
    public String getLocation() {
        return this.location;
    }

    /**
     * @param location
     *            地址.
     */
    public void setLocation(String location) {
        this.location = location;
    }

    /** @return 年检记录. */
    @Column(name = "ANNUAL_INSPECTION", length = 200)
    public String getAnnualInspection() {
        return this.annualInspection;
    }

    /**
     * @param annualInspection
     *            年检记录.
     */
    public void setAnnualInspection(String annualInspection) {
        this.annualInspection = annualInspection;
    }

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

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

    /** @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 . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "vehicleDriver")
    public Set<VehicleAccident> getVehicleAccidents() {
        return this.vehicleAccidents;
    }

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