package com.bonus.canteen.core.allocation.canteen.dto;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Map;

@ApiModel("食堂支付设置DTO")
public class AllocCanteenPayDTO {
   @ApiModelProperty("是否启用支付配置")
   private Integer ifEnablePay = 1;
   @ApiModelProperty("支付方式(多个数据之间使用,分隔)")
   private String payTypes;
   @ApiModelProperty("支付设置Map")
   private Map<String, String> payMap;

   public AllocCanteenPayDTO(String ifEnablePay, String payTypes, Map<String, String> payMap) {
      this.ifEnablePay = StrUtil.isBlank(ifEnablePay) ? 1 : NumberUtil.parseInt(ifEnablePay);
      this.payTypes = payTypes;
      this.payMap = payMap;
   }

   public Integer getIfEnablePay() {
      return this.ifEnablePay;
   }

   public String getPayTypes() {
      return this.payTypes;
   }

   public Map<String, String> getPayMap() {
      return this.payMap;
   }

   public void setIfEnablePay(final Integer ifEnablePay) {
      this.ifEnablePay = ifEnablePay;
   }

   public void setPayTypes(final String payTypes) {
      this.payTypes = payTypes;
   }

   public void setPayMap(final Map<String, String> payMap) {
      this.payMap = payMap;
   }

   public AllocCanteenPayDTO() {
   }
}
