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

import com.bonus.canteen.core.common.utils.SysUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;

@ApiModel("AllocKindUpdateDTO")
public class AllocKindUpdateDTO {
   @ApiModelProperty(
      value = "原品类名称",
      required = true
   )
   private @NotBlank(
   message = "原品类名称 不能为空"
) String oldKindName;
   @ApiModelProperty(
      value = "品类名称",
      required = true
   )
   private @NotBlank(
   message = "品类名称 不能为空"
) String kindName;
   @ApiModelProperty("品类图片链接")
   private String imgUrl;

   public void setImgUrl(String imgUrl) {
      this.imgUrl = SysUtil.getCutPath(imgUrl);
   }

   public String getOldKindName() {
      return this.oldKindName;
   }

   public String getKindName() {
      return this.kindName;
   }

   public String getImgUrl() {
      return this.imgUrl;
   }

   public void setOldKindName(final String oldKindName) {
      this.oldKindName = oldKindName;
   }

   public void setKindName(final String kindName) {
      this.kindName = kindName;
   }

}
