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 lombok.*;
import lombok.experimental.SuperBuilder;

/**
 * 车辆类型表
 * @Author: LiDongJia
 * @Package: com.muyu.vehicle.domain
 * @Project: 2112-car-cloud-server
 * @name: Vehicle
 * @Date: 2024/9/16  15:24
 * @Description: 车辆类型实体类
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "vehicle_type", autoResultMap = true)
public class VehicleType extends BaseEntity {

    /**
     * 车辆类型主键
     */
    @TableId(value = "vehicle_type_id", type = IdType.AUTO)
    @Schema(type = "Long",description = "车辆类型主键")
    private Long vehicleTypeId;

    /**
     * 车辆类型名称
     */
    @Schema(type = "String",description = "车辆类型名称")
    private String vehicleTypeName;

    /**
     * 报文模版外键
     */
    @Schema(type = "Integer",description = "报文模版外键")
    private Long messageTemplateId;

    /**
     * 添加车辆类型
     */
    public static VehicleType addBuilder(VehicleType vehicleType) {
        return VehicleType.builder().
                vehicleTypeId(vehicleType.getVehicleTypeId()).
                vehicleTypeName(vehicleType.getVehicleTypeName()).
                build();
    }

}
