package org.jeecg.modules.print.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;

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

/**
 * 打印模板（Hiprint JSON 存储）
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(description = "打印模板")
@TableName("print_template")
public class PrintTemplate extends JeecgEntity implements Serializable {

    @Excel(name = "模板编码", width = 20)
    @Schema(description = "模板编码，业务调用唯一标识")
    @TableField("template_code")
    private String templateCode;

    @Excel(name = "模板名称", width = 25)
    @Schema(description = "模板名称")
    @TableField("template_name")
    private String templateName;

    @Excel(name = "分类", width = 12)
    @Schema(description = "barcode=条码标签 form=表单套打 report=报表")
    @TableField("category")
    private String category;

    @Schema(description = "纸张宽度(mm)")
    @TableField("paper_width_mm")
    private BigDecimal paperWidthMm;

    @Schema(description = "纸张高度(mm)")
    @TableField("paper_height_mm")
    private BigDecimal paperHeightMm;

    @Excel(name = "方向", width = 10)
    @Schema(description = "portrait 纵向 landscape 横向")
    @TableField("paper_orientation")
    private String paperOrientation;

    @Schema(description = "Hiprint 模板 JSON")
    @TableField("template_json")
    private String templateJson;

    @Excel(name = "备注", width = 30)
    @Schema(description = "备注")
    @TableField("remark")
    private String remark;
}
