package com.neusoft.smart.pos.dto.printer.request;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class PostPrinterRequest {
    
    private Integer orgId;
    
    private Integer shopId;
    
    private Long parentId;
    
    private String printerSn;
    
    private String printerName;
    
    private String printerIp;
    
    private String printerPort;
    
    private String printerType;
    
    private String deviceType;
    
    List<Long> linkedPrinterIds = new ArrayList<>();
    
    List<PrintRuleRequest> printerRules = new ArrayList<>();
    
    List<Long> printerTemplateIds = new ArrayList<>();
    
    List<PrinterGoodsRequest> printerGoodsRefs = new ArrayList<>();
    
    @Data
    public static class PrintRuleRequest {
        
        private Long ruleId;
        
        private Integer sortNo;
        
        
        List<PrintRuleAttributeRequest> ruleAttributes = new ArrayList<>();
    }
    
    @Data
    public static class PrintRuleAttributeRequest {
        
        private Long attributeId;
        
        private String attributeValue;
        
    }
    
    @Data
    public static class PrinterGoodsRequest {
        
        private Long printerId;
        
        private Integer relationshipId;
        
        private String relationshipType;
    }
    
    
}
