package com.muyu.car.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

/**
 * 车辆基础信息对象 sys_car
 *
 * @author muyu
 * @date 2024-09-17
 */

@Data
@Setter
@Getter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_car")
public class SysCar {
    private static final long serialVersionUID = 1L;

    /** 自增主键 */
    @TableId( type = IdType.AUTO)
    private Long id;

    /** 车辆VIN码 */
    @Excel(name = "车辆VIN码")
    private String carVin;

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

    /** 车辆品牌 */
    @Excel(name = "车辆品牌")
    private String carBrand;

    /** 车辆型号 */
    @Excel(name = "车辆型号")
    private String carModel;

    /** 车辆车型(如客车,卡车,公交车等) */
    @Excel(name = "车辆车型(如客车,卡车,公交车等)")
    private String carType;

    /** 最后一次连线时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后一次连线时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date carLastJoinTime;

    /** 最后一次离线时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后一次离线时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date carLastOfflineTime;

    /** 启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中 */
    @Excel(name = "启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中")
    private String state;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("carVin", getCarVin())
            .append("carPlate", getCarPlate())
            .append("carBrand", getCarBrand())
            .append("carModel", getCarModel())
            .append("carType", getCarType())
            .append("carLastJoinTime", getCarLastJoinTime())
            .append("carLastOfflineTime", getCarLastOfflineTime())
            .append("state", getState())
            .toString();
    }
}
