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

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

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

public class DrpSupplierQualificationEditDTO {
   @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 Long certId;

   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 getCertId() {
      return this.certId;
   }

   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 setCertId(final Long certId) {
      this.certId = certId;
   }

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