package com.bonus.canteen.core.device.door.model;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

@TableName("dc_cust_door_pwd")
@ApiModel(
   value = "DcCustDoorPwd对象",
   description = ""
)
public class DcCustDoorPwd implements Serializable {
   private static final long serialVersionUID = 1L;
   private Integer id;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty("开门密码 ")
   private String openDoorPwd;
   @ApiModelProperty("是否生效有效期")
   private Integer isValid;
   @ApiModelProperty("开门有效期开始")
   private LocalDateTime startDate;
   @ApiModelProperty("开门有效期结束")
   private LocalDateTime endDate;
   @ApiModelProperty("创建时间")
   @TableField(
      fill = FieldFill.INSERT
   )
   private LocalDateTime crtime;
   @ApiModelProperty("创建人")
   private String crby;
   @ApiModelProperty("更新人")
   private String upby;
   @ApiModelProperty("更新时间")
   @TableField(
      fill = FieldFill.INSERT_UPDATE
   )
   private LocalDateTime uptime;

   public Boolean getIsValid() {
      return ObjectUtil.equal(this.isValid, 1);
   }

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

   public Long getCustId() {
      return this.custId;
   }

   public String getOpenDoorPwd() {
      return this.openDoorPwd;
   }

   public LocalDateTime getStartDate() {
      return this.startDate;
   }

   public LocalDateTime getEndDate() {
      return this.endDate;
   }

   public LocalDateTime getCrtime() {
      return this.crtime;
   }

   public String getCrby() {
      return this.crby;
   }

   public String getUpby() {
      return this.upby;
   }

   public LocalDateTime getUptime() {
      return this.uptime;
   }

   public DcCustDoorPwd setId(final Integer id) {
      this.id = id;
      return this;
   }

   public DcCustDoorPwd setCustId(final Long custId) {
      this.custId = custId;
      return this;
   }

   public DcCustDoorPwd setOpenDoorPwd(final String openDoorPwd) {
      this.openDoorPwd = openDoorPwd;
      return this;
   }

   public DcCustDoorPwd setIsValid(final Integer isValid) {
      this.isValid = isValid;
      return this;
   }

   public DcCustDoorPwd setStartDate(final LocalDateTime startDate) {
      this.startDate = startDate;
      return this;
   }

   public DcCustDoorPwd setEndDate(final LocalDateTime endDate) {
      this.endDate = endDate;
      return this;
   }

   public DcCustDoorPwd setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
      return this;
   }

   public DcCustDoorPwd setCrby(final String crby) {
      this.crby = crby;
      return this;
   }

   public DcCustDoorPwd setUpby(final String upby) {
      this.upby = upby;
      return this;
   }

   public DcCustDoorPwd setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
      return this;
   }
}
