package com.muyu.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

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

@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "sys_car", autoResultMap = true)
@Tag(name = "车辆基础信息")
public class SysCar extends BaseEntity{

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

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

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

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

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

    /** 车辆类型 */
    @Schema(name = "车辆类型")
    private Integer carType;

    /** 策略ID */
    @Schema(name = "策略ID")
    private Integer warnStrategy;

    /** 围栏组编码 */
    @Schema(name = "围栏组编码")
    private String groupCode;

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

    /** 车辆所属公司 */
    @Schema(name = "公司Id")
    private Integer deptId;



    @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("warnStrategy", getWarnStrategy())
            .append("groupCode", getGroupCode())
            .append("state", getState())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
