package com.yc.ship.module.otc.controller.admin.print.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yc.ship.framework.excel.core.annotations.DictFormat;
import com.yc.ship.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 打印模板 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PrintRespVO {

    @Schema(description = "打印模板ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16432")
    private Long id;

    @Schema(description = "模板名称", example = "王五")
    @ExcelProperty("模板名称")
    private String templateName;

    @Schema(description = "打印机名称（空表示默认打印机）", example = "王五")
    @ExcelProperty("打印机名称（空表示默认打印机）")
    private String printerName;

    @Schema(description = "模板类型", example = "1")
    @ExcelProperty(value = "模板类型", converter = DictConvert.class)
    @DictFormat("print_template_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer templateType;

    @Schema(description = "打印模板编号")
    @ExcelProperty("打印模板编号")
    private String templateCode;

    @Schema(description = "背景图片")
    private String backgroundImg;

    @Schema(description = "摆放模式", example = "2")
    @ExcelProperty(value = "摆放模式", converter = DictConvert.class)
    @DictFormat("print_put_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer putType;

    @Schema(description = "宽度")
    @ExcelProperty("宽度")
    private BigDecimal width;

    @Schema(description = "高度")
    @ExcelProperty("高度")
    private BigDecimal height;

    @Schema(description = "模板设计数据")
    private String tempData;

    @Schema(description = "模板内容数据")
    private String contentData;

    @Schema(description = "模板json数据")
    private String content;

    @Schema(description = "是否为默认模板（一个类型只能有一个默认模板）：0否，1是")
    @ExcelProperty(value = "是否为默认模板（一个类型只能有一个默认模板）：0否，1是", converter = DictConvert.class)
    @DictFormat("yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer isDefault;

    @Schema(description = "状态")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    @DictFormat("use_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer isUse;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
