package com.artfess.yhxt.basedata.vo;

import com.artfess.yhxt.basedata.model.Route;
import com.artfess.base.entity.AutoFillModel;
import com.artfess.base.util.BeanUtils;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 路线实体对象
 *
 * @company 阿特菲斯
 * @author hugh
 * @email
 * @date 2021-07-15 17:49:50
 */
@Data
public class RouteVo extends AutoFillModel<RouteVo> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableField("CODE_")
    private String code;

    @ApiModelProperty(value = "名称")
    @TableField("NAME_")
    private String name;

    @ApiModelProperty(value = "起点地址")
    @TableField("START_")
    private String start;

    @ApiModelProperty(value = "起点桩号")
    @TableField("START_PEG_")
    private String startPeg;

    @ApiModelProperty(value = "终点地址")
    @TableField("END_")
    private String end;

    @ApiModelProperty(value = "终点桩号")
    @TableField("END_PEG_")
    private String endPeg;

    @ApiModelProperty(value = "所属公司ID")
    @TableField("COMPANY_ID")
    private String companyId;

    @ApiModelProperty(value = "所属公司名称")
    @TableField("COMPANY_NAME")
    private String companyName;

    @ApiModelProperty(value = "技术等级")
    @TableField("TECHNICAL_GRADE_NAME")
    private String technicalGradeName;

    @ApiModelProperty(value = "技术等级编码")
    @TableField("TECHNICAL_GRADE_CODE")
    private String technicalGradeCode;

    @ApiModelProperty(value = "车道数量")
    @TableField("NUMBER_LANES_")
    private Integer numberLanes;

    @ApiModelProperty(value = "面层类型")
    @TableField("SURFACE_TYPE_NAME")
    private String surfaceTypeName;

    @ApiModelProperty(value = "面层类型代码")
    @TableField("SURFACE_TYPE_CODE")
    private String surfaceTypeCode;

    @ApiModelProperty(value = "路基宽度(米)")
    @TableField("SUBGRADE_WIDTH_")
    private Double subgradeWidth;

    @ApiModelProperty(value = "路面宽度(米)")
    @TableField("PAVEMENT_WIDTH_")
    private Double pavementWidth;

    @ApiModelProperty(value = "面层厚度(厘米)")
    @TableField("SURFACE_THICKNESS_")
    private Double surfaceThickness;

    @ApiModelProperty(value = "设计时速(千米/小时)")
    @TableField("DESIGN_SPEED_")
    private Double designSpeed;

    @ApiModelProperty(value = "省际出入口")
    @TableField("INTER_PROVINCIAL_PORT_")
    private String interProvincialPort;

    @ApiModelProperty(value = "排序号")
    @TableField("SN_")
    private Integer sn;

    @ApiModelProperty(value = "备注")
    @TableField("REMARKS_")
    private String remarks;


    @ApiModelProperty(value = "是否已删，1：已删除，0：未删除")
    @TableField("IS_DELE_")
    private String isDele;

    @ApiModelProperty(value = "版本号")
    @TableField("VERSION_")
    private Long version;

    public static Route parse(RouteVo routeVo){
        Route route = new Route();
        route.setSn(routeVo.getSn());
        route.setCode(routeVo.getCode());
        route.setName(routeVo.getName());
        route.setRemarks(routeVo.getRemarks());
        route.setName(routeVo.getName());
        route.setStart(routeVo.getStart());
        route.setEnd(routeVo.getEnd());
        return route;
    }
}
