package com.ozs.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ozs.common.annotation.Excel;
import com.ozs.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 线路管理表
 * </p>
 *
 * @author ozs
 * @since 2023-02-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BaseRailwayManagement extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

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

    /**
     * 线路编码（四位数字）
     */
    @Excel(name = "线路编码")
    private String railwayCode;

    /**
     * 线路类型(1=高铁,2=普铁,3=重载铁路)
     */
    @Excel(name = "线路类型", readConverterExp = "1=高铁,2=普铁,3=重载铁路")
    private Integer railwayType;

    /**
     * 线路名称
     */
    @Excel(name = "线路名称")
    private String railwayName;

    /**
     * 线路类型名称
     */
    @TableField(exist = false)
    private String railwayTypeName;

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

    /**
     * 始发站
     */
    private String startPoint;

    /**
     * 终点站
     */
    private String endPoint;
    /**
     * 起始里程
     */
    @Excel(name = "起始里程", type = Excel.Type.EXPORT)
    private Integer initialMileage;

    @TableField(exist = false)
    @Excel(name = "起始里程", type = Excel.Type.IMPORT)
    private BigDecimal initialMileageBD;
    
    /**
     * 结束里程
     */
    @Excel(name = "结束里程", type = Excel.Type.EXPORT)
    private Integer endMileage;
    @TableField(exist = false)
    @Excel(name = "结束里程", type = Excel.Type.IMPORT)
    private BigDecimal endMileageBD;

    /**
     * 里程范围
     */
    @TableField(exist = false)
    private String milesRange;

}
