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

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

@Data
public class PutPrinterRequest {
    
    @NotNull(message = "打印机/中转设备id不可为空")
    private Long id;
    
    private String printerSn;
    
    private String printerName;
    
    private String printerIp;
    
    private String printerPort;
    
    private String printerType;
    
    private String printerStatus;
    
    private List<Long> linkedPrinterIds;
    
    List<Long> printerTemplateIds = new ArrayList<>();
    
    List<PutPrintRuleRequest> printerRules = new ArrayList<>();
    
    List<PutPrinterGoodsRequest> printerGoodsRefs = new ArrayList<>();
    
    @Data
    public static class PutPrintRuleRequest {
        
        private Long ruleId;
        
        private Integer sortNo;
        
        List<PutPrintRuleAttributeRequest> ruleAttributes = new ArrayList<>();
    }
    
    @Data
    public static class PutPrintRuleAttributeRequest {
        
        private Long attributeId;
        
        private String attributeValue;
        
    }
    
    @Data
    public static class PutPrinterGoodsRequest {
        
        private Integer relationshipId;
        
        private String relationshipType;
    }
}
