package com.ruoyi.oa.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * cmc车辆信息对象 cmc_car
 *
 * @author cmc
 * @date 2024-03-05
 */
public class CmcCar extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 车辆id */
    private Integer carId;

    /** 车牌号 */
    @Excel(name = "车牌号")
    private String licensePlate;

    /** 驾驶员（常用） */
    @Excel(name = "驾驶员")
    private String driverUserName;
    private Long driver;

    /** 品牌 */
    @Excel(name = "品牌")
    private String brand;

    /** 车型 */
    @Excel(name = "车型")
    private String series;

    /** 单日成本 */
    @Excel(name = "单日成本")
    private BigDecimal dayCost;

    /** 油耗 */
    @Excel(name = "油耗")
    private BigDecimal fuel;

    /** 保险 */
    @Excel(name = "保险")
    private BigDecimal insurance;

    /** 维修 */
    @Excel(name = "维修")
    private BigDecimal maintenance;

    /** 总价 */
    @Excel(name = "总价（元）")
    private BigDecimal cost;

    /** 购置时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购置时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date acquisitionTime;

    /** 预计使用年限 */
    @Excel(name = "预计使用年限")
    private Integer expectLife;

    /** 预计行驶里程 */
    @Excel(name = "预计行驶里程（万千米）")
    private Integer expectKm;

    /** 是否为租车 */
    @Excel(name = "是否为租车", readConverterExp = "0=否,1=是")
    private String isRent;

    /** 状态 */
    @Excel(name = "状态", readConverterExp = "0=被领用,1=可领用,2=维修中,3=已停用,4=已报废")
    private String status;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    private SysUser driverUser;

    public void setCarId(Integer carId)
    {
        this.carId = carId;
    }

    public Integer getCarId()
    {
        return carId;
    }
    public void setLicensePlate(String licensePlate)
    {
        this.licensePlate = licensePlate;
    }

    public String getLicensePlate()
    {
        return licensePlate;
    }
    public void setDriver(Long driver)
    {
        this.driver = driver;
    }

    public Long getDriver()
    {
        return driver;
    }
    public void setDriverUser(SysUser driverUser)
    {
        this.driverUser = driverUser;
        this.driverUserName = driverUser == null ? "" : driverUser.getNickName();
    }

    public SysUser getDriverUser()
    {
        return driverUser;
    }
    public void setAcquisitionTime(Date acquisitionTime)
    {
        this.acquisitionTime = acquisitionTime;
    }

    public Date getAcquisitionTime()
    {
        return acquisitionTime;
    }
    public void setCost(BigDecimal cost)
    {
        this.cost = cost;
    }

    public BigDecimal getCost()
    {
        return cost;
    }
    public void setExpectLife(Integer expectLife)
    {
        this.expectLife = expectLife;
    }

    public Integer getExpectLife()
    {
        return expectLife;
    }
    public void setExpectKm(Integer expectKm)
    {
        this.expectKm = expectKm;
    }

    public Integer getExpectKm()
    {
        return expectKm;
    }
    public void setSeries(String series)
    {
        this.series = series;
    }

    public String getSeries()
    {
        return series;
    }
    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }
    public void setIsRent(String isRent)
    {
        this.isRent = isRent;
    }

    public String getIsRent()
    {
        return isRent;
    }
    public void setDayCost(BigDecimal dayCost)
    {
        this.dayCost = dayCost;
    }

    public BigDecimal getDayCost()
    {
        return dayCost;
    }
    public void setFuel(BigDecimal fuel)
    {
        this.fuel = fuel;
    }

    public BigDecimal getFuel()
    {
        return fuel;
    }
    public void setInsurance(BigDecimal insurance)
    {
        this.insurance = insurance;
    }

    public BigDecimal getInsurance()
    {
        return insurance;
    }
    public void setMaintenance(BigDecimal maintenance)
    {
        this.maintenance = maintenance;
    }

    public BigDecimal getMaintenance()
    {
        return maintenance;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setRemark(String remark)
    {
        this.remark = remark;
    }

    public String getRemark()
    {
        return remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("carId", getCarId())
                .append("licensePlate", getLicensePlate())
                .append("driver", getDriver())
                .append("acquisitionTime", getAcquisitionTime())
                .append("cost", getCost())
                .append("expectLife", getExpectLife())
                .append("expectKm", getExpectKm())
                .append("series", getSeries())
                .append("brand", getBrand())
                .append("isRent", getIsRent())
                .append("dayCost", getDayCost())
                .append("status", getStatus())
                .append("fuel", getFuel())
                .append("insurance", getInsurance())
                .append("maintenance", getMaintenance())
                .toString();
    }
}
