package com.jwipc.order.dto;

import com.jwipc.aggregation.annotation.RelationAggregationField;
import com.jwipc.supplier.client.SupplierClient;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class LabelPrintSettingBaseDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 3951497982112581609L;
    /**
     * 主键
     */
    private Long id;

    /**
     * 类型:1:内标签;2:内外标签;3:供应商接口调用
     */
    private Integer type;

    /**
     * 采购订单号
     */
    private String purchaseOrderCode;

    /**
     * 物料编号
     */
    private String materialCode;

    /**
     * 配置json
     */
    private String optionJson;

    /**
     * 供应商主键
     */
    private Long supplierId;
    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierName",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierName;
    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierCode",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierCode;
    /**
     * 是否删除
     */
    private Integer deleteFlag;

    private Long createId;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    private Long updateId;

    private LocalDateTime updateTime;

    /**
     * 推送状态:1:成功;0:失败;
     */
    private Integer status;

    /**
     * 打印机类型
     */
    private Integer printerType;

    /**
     * 打印次数
     */
    private Integer printSize;
}
