package com.bonus.canteen.core.notice.print.v2.dto;

import cn.hutool.core.util.ObjectUtil;
import com.bonus.canteen.core.notice.print.v2.constant.PrintTemplateModelEnum;
import io.swagger.annotations.ApiModelProperty;

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

public class NoticePrintTemplateAddDTO {
   @ApiModelProperty("模版名称")
   private @NotEmpty(
   message = "{notice_print_template_name_is_null}"
) String templateName;
   @ApiModelProperty("打印机类型（1:小票，2:标签）")
   private @NotNull(
   message = "{notice_print_device_type_is_null}"
) Integer deviceType;
   @ApiModelProperty("打印场景（001:下单退单，002:余额变动）")
   private @NotEmpty(
   message = "{notice_print_column_print_type_is_null}"
) String printScene;
   @ApiModelProperty("打印类型（001001:食堂/档口下单，001002:食堂/档口退单，001003:商超下单，001004:商超退单，002001:充值，002002:提现）")
   private @NotEmpty(
   message = "{notice_print_column_print_type_is_null}"
) String printType;
   @ApiModelProperty("打印模式（1:订单，2:明细）")
   private Integer templateModel;
   @ApiModelProperty("打印纸张大小 标签打印机使用（60,40），(40,30) 两种")
   private String templateSize;
   @ApiModelProperty("模版字段设置")
   private @NotEmpty(
   message = "{notice_print_template_setting_is_null}"
) List<NoticePrintTemplateSettingAddDTO> settingList;

   public Integer getTemplateModel() {
      return ObjectUtil.isNull(this.templateModel) ? PrintTemplateModelEnum.ORDER.getKey() : this.templateModel;
   }

   public String getTemplateName() {
      return this.templateName;
   }

   public Integer getDeviceType() {
      return this.deviceType;
   }

   public String getPrintScene() {
      return this.printScene;
   }

   public String getPrintType() {
      return this.printType;
   }

   public String getTemplateSize() {
      return this.templateSize;
   }

   public List<NoticePrintTemplateSettingAddDTO> getSettingList() {
      return this.settingList;
   }

   public void setTemplateName(final String templateName) {
      this.templateName = templateName;
   }

   public void setDeviceType(final Integer deviceType) {
      this.deviceType = deviceType;
   }

   public void setPrintScene(final String printScene) {
      this.printScene = printScene;
   }

   public void setPrintType(final String printType) {
      this.printType = printType;
   }

   public void setTemplateModel(final Integer templateModel) {
      this.templateModel = templateModel;
   }

   public void setTemplateSize(final String templateSize) {
      this.templateSize = templateSize;
   }

   public void setSettingList(final List<NoticePrintTemplateSettingAddDTO> settingList) {
      this.settingList = settingList;
   }
}
