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;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class PurchaseOrderDetailLabelPrintDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = -8621994827620151851L;
    private String unit;
    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierName",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierName;
    private Long supplierId;
    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierCode",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierCode;

    private String defaultStock;
    private String materialType;
    private String factoryCode;
}
