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

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@ApiModel
public class DrpSupplierQualificationUpdateDTO {
   @ApiModelProperty("id")
   private @NotNull(
   message = "id不能为空!"
) Long id;
   @ApiModelProperty("资质编号")
   private String qualificationNum;
   @ApiModelProperty("资质名称")
   private @NotBlank(
   message = "资质名称不能为空!"
) String qualificationName;
   @ApiModelProperty("有效期")
   private LocalDate validity;
   @ApiModelProperty("资质照片")
   private String imgUrl;
   @ApiModelProperty("供应商id")
   private @NotNull(
   message = "供应商id不能为空 ^_^"
) Long supplierId;

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

   public Long getId() {
      return this.id;
   }

   public String getQualificationNum() {
      return this.qualificationNum;
   }

   public String getQualificationName() {
      return this.qualificationName;
   }

   public LocalDate getValidity() {
      return this.validity;
   }

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

   public Long getSupplierId() {
      return this.supplierId;
   }

   public void setId(final Long id) {
      this.id = id;
   }

   public void setQualificationNum(final String qualificationNum) {
      this.qualificationNum = qualificationNum;
   }

   public void setQualificationName(final String qualificationName) {
      this.qualificationName = qualificationName;
   }

   public void setValidity(final LocalDate validity) {
      this.validity = validity;
   }

   public void setSupplierId(final Long supplierId) {
      this.supplierId = supplierId;
   }




   public String toString() {
      Long var10000 = this.getId();
      return "DrpSupplierQualificationUpdateDTO(id=" + var10000 + ", qualificationNum=" + this.getQualificationNum() + ", qualificationName=" + this.getQualificationName() + ", validity=" + String.valueOf(this.getValidity()) + ", imgUrl=" + this.getImgUrl() + ", supplierId=" + this.getSupplierId() + ")";
   }
}
