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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@ApiModel
@NoArgsConstructor
public class GetPrinterResponse {
    
    @ApiModelProperty(name = "id", value = "打印机ID", dataType = "Long", example = "1")
    private Long id;
    
    @ApiModelProperty(name = "orgId", value = "集团ID", dataType = "Integer", example = "1")
    private Integer orgId;
    
    @ApiModelProperty(name = "shopId", value = "门店ID", dataType = "Integer", example = "1")
    private Integer shopId;
    
    @ApiModelProperty(name = "parentId", value = "父节点ID", dataType = "Long", example = "1")
    private Long parentId;
    
    @ApiModelProperty(name = "printerSn", value = "打印机序列号", dataType = "String", example = "1")
    private String printerSn;
    
    @ApiModelProperty(name = "printerName", value = "打印机名称", dataType = "String", example = "1")
    private String printerName;
    
    @ApiModelProperty(name = "printerIp", value = "打印机IP", dataType = "String", example = "1")
    private String printerIp;
    
    @ApiModelProperty(name = "printerPort", value = "打印机端口", dataType = "String", example = "1")
    private String printerPort;
    
    @ApiModelProperty(name = "printerType", value = "打印机设备类型@1:蓝牙打印机@2:网络打印机", dataType = "String", example = "1")
    private String printerType;
    
    @ApiModelProperty(name = "deviceType", value = "设备类型@1:中转设备@2:打印机", dataType = "String", example = "1")
    private String deviceType;
    
    @ApiModelProperty(name = "printerStatus", value = "打印机状态@0:停用@1:启用", dataType = "String", example = "1")
    private String printerStatus;
    
    private Integer version;
    
    private Date createdAt;
    
    private String createdBy;
    
    private String updatedBy;
    
    private Date updatedAt;
    
    @ApiModelProperty(name = "printerTemplate", value = "打印机模板信息", dataType = "List")
    private List<PrinterInfoTemplateResponse> printerTemplateList;
    
    @ApiModelProperty(name = "printerGoodsList", value = "打印机菜品信息", dataType = "List")
    private List<PrinterInfoGoodsResponse> printerGoodsList;
    
    @ApiModelProperty(name = "printerRuleList", value = "打印机规则信息", dataType = "List")
    private List<PrinterInfoRuleResponse> printerRuleList;
    
    @ApiModelProperty(name = "linkedPrinters", value = "连接的打印机信息", dataType = "List")
    private List<GetPrinterResponse> linkedPrinters;
    
    @Data
    public static class PrinterInfoTemplateResponse {
    
        @ApiModelProperty(name = "id", value = "模板关系ID", dataType = "Long", example = "1")
        public Long id;
        
        @ApiModelProperty(name = "templateId", value = "模板ID", dataType = "Long", example = "1")
        public Long templateId;
    
        @ApiModelProperty(name = "printerId", value = "打印机ID", dataType = "Long", example = "1")
        public Long printerId;
    
        @ApiModelProperty(name = "templateName", value = "模板名称", dataType = "String", example = "1")
        public String templateName;
    
        @ApiModelProperty(name = "beanName", value = "实现类名称", dataType = "String", example = "1")
        public String beanName;
    
        @ApiModelProperty(name = "description", value = "描述", dataType = "String", example = "1")
        public String description;
    
        @ApiModelProperty(name = "templateType", value = "模板类型@1:后结下单模板@2:前结结算模板@3:后结结算模板", dataType = "String", example = "1")
        public String templateType;
    
        @ApiModelProperty(name = "templateTypeName", value = "模板类型名称", dataType = "String", example = "1")
        public String templateTypeName;
        
        @ApiModelProperty(name = "createdAt", value = "创建时间", dataType = "Date", example = "1")
        public Date createdAt;
        
    }
    
    @Data
    public static class PrinterInfoGoodsResponse {
        
        @ApiModelProperty(name = "id", value = "商品关系ID", dataType = "Long", example = "1")
        public Long id;
        
        @ApiModelProperty(name = "relationshipId", value = "关联对象ID", dataType = "Integer", example = "1")
        public Integer relationshipId;
        
        @ApiModelProperty(name = "relationshipType", value = "关系类型@1:菜品@2:分类", dataType = "String", example = "1")
        public String relationshipType;
        
        
    }
    
    @Data
    public static class PrinterInfoRuleResponse {
        
        @ApiModelProperty(name = "id", value = "规则关系ID", dataType = "Long", example = "1")
        public Long id;
        
        @ApiModelProperty(name = "ruleId", value = "规则ID", dataType = "Long", example = "1")
        public Long ruleId;
    
        @ApiModelProperty(name = "printerId", value = "打印机ID", dataType = "Long", example = "1")
        public Long printerId;
        
        @ApiModelProperty(name = "sortNo", value = "排序号", dataType = "Integer", example = "1")
        public Integer sortNo;
    
        @ApiModelProperty(name = "ruleName", value = "规则名称", dataType = "String", example = "1")
        public String ruleName;
        
        @ApiModelProperty(name = "isEnable", value = "是否启用@0未启用@1启用", dataType = "String", example = "1")
        public String isEnable;
    
        @ApiModelProperty(name = "printerRuleAttributList", value = "打印机规则属性信息", dataType = "List")
        private List<PrinterInfoRuleAttributeResponse> printerRuleAttributList;
        
    }
    
    @Data
    public static class PrinterInfoRuleAttributeResponse {
        
        @ApiModelProperty(name = "id", value = "规则关系ID", dataType = "Long", example = "1")
        public Long id;
        
        @ApiModelProperty(name = "ruleId", value = "规则ID", dataType = "Long", example = "1")
        public Long ruleId;
        
        @ApiModelProperty(name = "attributeId", value = "规则属性ID", dataType = "Long", example = "1")
        public Long attributeId;
        
        @ApiModelProperty(name = "attributeValue", value = "规则属性值", dataType = "Integer", example = "1")
        public String attributeValue;
    
        @ApiModelProperty(name = "attributeName", value = "规则属性名称", dataType = "Integer", example = "1")
        public String attributeName;
    
        @ApiModelProperty(name = "attributeValue", value = "规则属性值名称", dataType = "Integer", example = "1")
        public String attributeValueName;
        
    }
}
