package com.bonus.canteen.core.nutrition.common.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

@TableName("health_chronic")
@ApiModel("慢性病基础表")
public class HealthChronic {
   @TableId
   @ApiModelProperty("主键")
   private Long id;
   @ApiModelProperty("慢性病id")
   private Long chronicId;
   @ApiModelProperty("慢性病名称")
   private String chronicName;
   @ApiModelProperty("是否删除 0-正常 2-删除")
   private Integer delFlag;
   @ApiModelProperty("创建人")
   private String createBy;
   @ApiModelProperty("创建时间")
   private LocalDateTime createTime;
   @ApiModelProperty("更新人")
   private String updateBy;
   @ApiModelProperty("更新时间")
   private LocalDateTime updateTime;

   public HealthChronic() {
   }

   public static HealthChronicBuilder builder() {
      return new HealthChronicBuilder();
   }

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

   public Long getChronicId() {
      return this.chronicId;
   }

   public String getChronicName() {
      return this.chronicName;
   }

   public Integer getDelFlag() {
      return this.delFlag;
   }

   public String getCreateBy() {
      return this.createBy;
   }

   public LocalDateTime getCreateTime() {
      return this.createTime;
   }

   public String getUpdateBy() {
      return this.updateBy;
   }

   public LocalDateTime getUpdateTime() {
      return this.updateTime;
   }

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

   public void setChronicId(final Long chronicId) {
      this.chronicId = chronicId;
   }

   public void setChronicName(final String chronicName) {
      this.chronicName = chronicName;
   }

   public void setDelFlag(final Integer delFlag) {
      this.delFlag = delFlag;
   }

   public void setCreateBy(final String createBy) {
      this.createBy = createBy;
   }

   public void setCreateTime(final LocalDateTime createTime) {
      this.createTime = createTime;
   }

   public void setUpdateBy(final String updateBy) {
      this.updateBy = updateBy;
   }

   public void setUpdateTime(final LocalDateTime updateTime) {
      this.updateTime = updateTime;
   }


   public HealthChronic(final Long id, final Long chronicId, final String chronicName,
                        final Integer delFlag, final String createBy, final LocalDateTime createTime,
                        final String updateBy, final LocalDateTime updateTime) {
      this.id = id;
      this.chronicId = chronicId;
      this.chronicName = chronicName;
      this.delFlag = delFlag;
      this.createBy = createBy;
      this.createTime = createTime;
      this.updateBy = updateBy;
      this.updateTime = updateTime;
   }

   public static class HealthChronicBuilder {
      private Long id;
      private Long chronicId;
      private String chronicName;
      private Integer delFlag;
      private String createBy;
      private LocalDateTime createTime;
      private String updateBy;
      private LocalDateTime updateTime;

      HealthChronicBuilder() {
      }

      public HealthChronicBuilder id(final Long id) {
         this.id = id;
         return this;
      }

      public HealthChronicBuilder chronicId(final Long chronicId) {
         this.chronicId = chronicId;
         return this;
      }

      public HealthChronicBuilder chronicName(final String chronicName) {
         this.chronicName = chronicName;
         return this;
      }

      public HealthChronicBuilder delFlag(final Integer delFlag) {
         this.delFlag = delFlag;
         return this;
      }

      public HealthChronicBuilder createBy(final String createBy) {
         this.createBy = createBy;
         return this;
      }

      public HealthChronicBuilder createTime(final LocalDateTime createTime) {
         this.createTime = createTime;
         return this;
      }

      public HealthChronicBuilder updateBy(final String updateBy) {
         this.updateBy = updateBy;
         return this;
      }

      public HealthChronicBuilder updateTime(final LocalDateTime updateTime) {
         this.updateTime = updateTime;
         return this;
      }

      public HealthChronic build() {
         return new HealthChronic(this.id, this.chronicId, this.chronicName, this.delFlag, this.createBy, this.createTime, this.updateBy, this.updateTime);
      }

   }
}
