package com.gci.boot.modules.projects.entity;

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

import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.alibaba.excel.annotation.format.DateTimeFormat;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.annotation.Query.SelectQuery;
import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.dict.excel.DictConverter;
import com.gci.boot.common.validated.SaveValidated;
import com.gci.boot.common.validated.UpdateValidated;
import com.gci.boot.modules.basedata.entity.TbVehicle;

import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 车辆验收车辆详情
 * </p>
 *
 * @author xushuhan
 * @since 2023-09-11
 */
@Getter
@Setter
@TableName("tb_vehicle_check_detail")
@ApiModel(value = "TbVehicleCheckDetail对象", description = "车辆验收车辆详情")
public class TbVehicleCheckDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("验收id")
    private String checkId;

    @ApiModelProperty("车辆id")
    private String vehicleId;

    //弃用
    @Deprecated
    @ApiModelProperty("车辆型号")
    private String vehicleNo;

    @ApiModelProperty("车架号")
    @ExcelProperty(value = "车架号")
    private String frameNumber;

    @ApiModelProperty("所属机构")
    @ExcelIgnore
    private String sysOrgCode;

    @ApiModelProperty("创建时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private Date createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private Date updateTime;

    @ApiModelProperty("创建人")
    @ExcelIgnore
    private String createBy;

    @ApiModelProperty("更新人")
    @ExcelIgnore
    private String updateBy;

    /*@ApiModelProperty("删除标志")
    @ExcelIgnore
    private Integer delFlag;*/

    /*@TableField(exist = false)
    @ExcelIgnore
    private TbVehicle vehicle;*/

    @ApiModelProperty("车辆品牌")
    @Dict(dicCode = "vehicle_brand")
    @ExcelProperty(value = "车辆品牌", converter = DictConverter.class)
    private String vehicleBrand;
    
    @ApiModelProperty("车辆型号")
    @ExcelProperty(value = "车辆型号")
    private String vehicleModel;
    
    @ApiModelProperty("车辆种类")
    @Dict(dicCode = "vehicle_type")
    @ExcelProperty(value = "车辆种类", converter = DictConverter.class)
    private String vehicleType;

    @ExcelProperty(value = "车牌号")
    private String plateNumber;


    @Digits(integer = 6 , fraction = 2,message = "整备质量整数不能超过6位，小数不能超过2位",groups = {SaveValidated.class,UpdateValidated.class})
    private BigDecimal curbWeight;

    @ExcelProperty(value = "整备质量(kg)")
    @TableField(exist = false)
    private String curbWeightString;

    @TableField(exist = false)
    @ExcelIgnore
    private Double price;

    @ApiModelProperty("保险单号")
    @TableField(exist = false)
    @ExcelIgnore
    private String insuranceNo;
    
    @ApiModelProperty("保险公司名称")
    @TableField(exist = false)
    @ExcelIgnore
    private String insuranceName;
    
}
