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("品类DTO")
public class AllocKindDTO {
   @ApiModelProperty("品类名称")
   private @NotBlank(
   message = "品类名称不能为空"
) String kindName;
   @ApiModelProperty("品类图片链接")
   private String imgUrl;

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

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

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

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

}
