package com.erp.print.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("print_template")
public class PrintTemplate {

    @TableId(type = IdType.AUTO)
    private Long id;

    /** 模板编码 */
    private String templateCode;

    /** 模板名称 */
    private String templateName;

    /** 模板类型: invoice/receipt/label/express/shipping */
    private String templateType;

    /** 模板内容(HTML/JSON格式) */
    private String templateContent;

    /** 模板描述 */
    private String description;

    /** 宽度(mm) */
    private Double width;

    /** 高度(mm) */
    private Double height;

    /** 是否默认: 0-否 1-是 */
    private Integer isDefault;

    /** 状态: 0-禁用 1-启用 */
    private Integer status;

    /** 创建人ID */
    private Long creatorId;

    /** 创建人名称 */
    private String creatorName;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @TableLogic
    private Integer deleted;
}
