package com.casic.missiles.dto.customer.sample;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.casic.missiles.annotation.DictCodeField;
import com.casic.missiles.constants.MeterDictCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel
@TableName("customer_sample_info")
@ColumnWidth(30)
@HeadRowHeight(15)
@ContentRowHeight(20)
@ContentStyle(borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
@ExcelIgnoreUnannotated
public class CustomerSampleListResponse {

    private Long id;

    @TableField(exist = false)
    private Long orderId;

    @ApiModelProperty(value = "样品编号", dataType = "String")
    @ExcelProperty(value = "样品编号", order = 0)
    private String sampleNo;

    @ApiModelProperty(value = "样品名称", dataType = "String")
    @ExcelProperty(value = "样品名称", order = 1)
    private String sampleName;

    @ApiModelProperty(value = "型号", dataType = "String")
    @ExcelProperty(value = "样品型号", order = 2)
    private String sampleModel;

    @ApiModelProperty(value = "出厂编号", dataType = "String")
    @ExcelProperty(value = "出厂编号", order = 3)
    private String manufacturingNo;

    @ApiModelProperty(value = "委托方代码", dataType = "String")
    @ExcelProperty(value = "委托方代码", order = 4)
    private String customerNo;

    @TableField(exist = false)
    @ApiModelProperty(value = "样品状态", dataType = "String")
    @DictCodeField(message = "样品状态描述不合法", cacheName = MeterDictCode.SAMPLE_STATUS)
    private String sampleStatus;

    @TableField(exist = false)
    @ApiModelProperty(value = "样品状态", dataType = "String")
    @ExcelProperty(value = "样品状态", order = 5)
    private String sampleStatusName;

    @ApiModelProperty(value = "委托方名称", dataType = "String")
    @ExcelProperty(value = "委托方名称", order = 6)
    private String customerName;

    @ApiModelProperty(value = "检定周期", dataType = "String")
    @ExcelProperty(value = "检定周期", order = 7)
    private String measurePeriod;

    @ApiModelProperty(value = "证书过期时间", dataType = "String")
    @ExcelProperty(value = "证书过期时间", order = 8)
    private String validDeadline;

    @TableField(exist = false)
    @ApiModelProperty(value = "证书状态", dataType = "String")
    @ExcelProperty(value = "证书状态", order = 9)
    private String certificationStatus;


    @ApiModelProperty(value = "上次检定时间", dataType = "String")
    @ExcelProperty(value = "上次检定时间", order = 10)
    private String measureLastTime;

    @ApiModelProperty(value = "备注", dataType = "String")
    @ExcelProperty(value = "备注", order = 11)
    private String remark;

}
