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

import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;

public class MenuEleDishRowRecipeDTO implements Serializable {
   @ApiModelProperty("设备sn码")
   private @NotNull(
   message = "{menu_machine_sn_null}"
) String machineSn;
   @ApiModelProperty("菜谱日期")
   private LocalDate applyDate;

   public LocalDate getApplyDate() {
      return ObjectUtil.isNull(this.applyDate) ? LocalDate.now() : this.applyDate;
   }

   public String getMachineSn() {
      return this.machineSn;
   }

   public void setMachineSn(final String machineSn) {
      this.machineSn = machineSn;
   }

   public void setApplyDate(final LocalDate applyDate) {
      this.applyDate = applyDate;
   }

}
