package com.bonus.canteen.core.allocation.canteen.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bonus.canteen.core.common.utils.SysUtil;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;
import java.time.LocalTime;

@TableName("alloc_canteen")
@ApiModel("食堂信息表")
public class AllocCanteen {
   @TableId
   @ApiModelProperty("主键id")
   private Long id;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("食堂编号")
   private String canteenNum;
   @ApiModelProperty("食堂名称")
   private String canteenName;
   @ApiModelProperty("区域id")
   private Long areaId;
   @ApiModelProperty("食堂业务类型")
   private Integer canteenType;
   @ApiModelProperty("第三方食堂id")
   private String thirdCanteenId;
   @ApiModelProperty("授权人员")
   private Long effId;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty("联系电话")
   private String contactTel;
   @ApiModelProperty("主营项目")
   private String mainProject;
   @ApiModelProperty("食堂营业状态")
   private Integer businessState;
   @ApiModelProperty("营业时间")
   @JsonDeserialize(
      using = LocalTimeDeserializer.class
   )
   @JsonSerialize(
      using = LocalTimeSerializer.class
   )
   private LocalTime startBusinessTime;
   @JsonDeserialize(
      using = LocalTimeDeserializer.class
   )
   @JsonSerialize(
      using = LocalTimeSerializer.class
   )
   private LocalTime endBusinessTime;
   @ApiModelProperty("食堂图片链接")
   private String imgUrl;
   @ApiModelProperty("最大容纳人数")
   private Integer capacity;
   @ApiModelProperty("是否启用支付配置")
   private Integer ifEnablePay;
   @ApiModelProperty("支付方式(多个数据之间使用,分隔)")
   private String payTypes;
   @ApiModelProperty("是否启用配送配置")
   private Integer ifEnableDelivery;
   @ApiModelProperty("配送方式(多个数据之间 使用,分隔)")
   private String deliveries;
   @ApiModelProperty("是否启用点餐配置")
   private Integer ifEnableOrder;
   @ApiModelProperty("是否支持报餐")
   private Integer ifBook;
   @ApiModelProperty("是否支持预定餐")
   private Integer ifReserve;
   @ApiModelProperty("是否启用收款码")
   private Integer ifEnablePayCode;
   @ApiModelProperty("食堂收款码链接")
   private String payCodeUrl;
   @ApiModelProperty("食堂特殊标识")
   private Integer specialFlag;
   @ApiModelProperty("是否删除")
   private Integer ifDel;
   @ApiModelProperty("备注")
   private String remark;
   @ApiModelProperty("创建人")
   private String crby;
   @ApiModelProperty("创建时间")
   @JsonDeserialize(
      using = LocalDateTimeDeserializer.class
   )
   @JsonSerialize(
      using = LocalDateTimeSerializer.class
   )
   private LocalDateTime crtime;
   @ApiModelProperty("更新人")
   private String upby;
   @ApiModelProperty("更新时间")
   @JsonDeserialize(
      using = LocalDateTimeDeserializer.class
   )
   @JsonSerialize(
      using = LocalDateTimeSerializer.class
   )
   private LocalDateTime uptime;

   public AllocCanteen(Long canteenId) {
      this.canteenId = canteenId;
   }

   public AllocCanteen(Long canteenId, String canteenName, Long areaId, String thirdCanteenId) {
      this.canteenId = canteenId;
      this.canteenName = canteenName;
      this.areaId = areaId;
      this.thirdCanteenId = thirdCanteenId;
   }

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

   public String getPayCodeUrl() {
      return SysUtil.getCutPath(this.payCodeUrl);
   }

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

   public Long getCanteenId() {
      return this.canteenId;
   }

   public String getCanteenNum() {
      return this.canteenNum;
   }

   public String getCanteenName() {
      return this.canteenName;
   }

   public Long getAreaId() {
      return this.areaId;
   }

   public Integer getCanteenType() {
      return this.canteenType;
   }

   public String getThirdCanteenId() {
      return this.thirdCanteenId;
   }

   public Long getEffId() {
      return this.effId;
   }

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

   public String getContactTel() {
      return this.contactTel;
   }

   public String getMainProject() {
      return this.mainProject;
   }

   public Integer getBusinessState() {
      return this.businessState;
   }

   public LocalTime getStartBusinessTime() {
      return this.startBusinessTime;
   }

   public LocalTime getEndBusinessTime() {
      return this.endBusinessTime;
   }

   public Integer getCapacity() {
      return this.capacity;
   }

   public Integer getIfEnablePay() {
      return this.ifEnablePay;
   }

   public String getPayTypes() {
      return this.payTypes;
   }

   public Integer getIfEnableDelivery() {
      return this.ifEnableDelivery;
   }

   public String getDeliveries() {
      return this.deliveries;
   }

   public Integer getIfEnableOrder() {
      return this.ifEnableOrder;
   }

   public Integer getIfBook() {
      return this.ifBook;
   }

   public Integer getIfReserve() {
      return this.ifReserve;
   }

   public Integer getIfEnablePayCode() {
      return this.ifEnablePayCode;
   }

   public Integer getSpecialFlag() {
      return this.specialFlag;
   }

   public Integer getIfDel() {
      return this.ifDel;
   }

   public String getRemark() {
      return this.remark;
   }

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

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

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

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

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

   public void setCanteenId(final Long canteenId) {
      this.canteenId = canteenId;
   }

   public void setCanteenNum(final String canteenNum) {
      this.canteenNum = canteenNum;
   }

   public void setCanteenName(final String canteenName) {
      this.canteenName = canteenName;
   }

   public void setAreaId(final Long areaId) {
      this.areaId = areaId;
   }

   public void setCanteenType(final Integer canteenType) {
      this.canteenType = canteenType;
   }

   public void setThirdCanteenId(final String thirdCanteenId) {
      this.thirdCanteenId = thirdCanteenId;
   }

   public void setEffId(final Long effId) {
      this.effId = effId;
   }

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

   public void setContactTel(final String contactTel) {
      this.contactTel = contactTel;
   }

   public void setMainProject(final String mainProject) {
      this.mainProject = mainProject;
   }

   public void setBusinessState(final Integer businessState) {
      this.businessState = businessState;
   }

   @JsonDeserialize(
      using = LocalTimeDeserializer.class
   )
   public void setStartBusinessTime(final LocalTime startBusinessTime) {
      this.startBusinessTime = startBusinessTime;
   }

   @JsonDeserialize(
      using = LocalTimeDeserializer.class
   )
   public void setEndBusinessTime(final LocalTime endBusinessTime) {
      this.endBusinessTime = endBusinessTime;
   }

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

   public void setCapacity(final Integer capacity) {
      this.capacity = capacity;
   }

   public void setIfEnablePay(final Integer ifEnablePay) {
      this.ifEnablePay = ifEnablePay;
   }

   public void setPayTypes(final String payTypes) {
      this.payTypes = payTypes;
   }

   public void setIfEnableDelivery(final Integer ifEnableDelivery) {
      this.ifEnableDelivery = ifEnableDelivery;
   }

   public void setDeliveries(final String deliveries) {
      this.deliveries = deliveries;
   }

   public void setIfEnableOrder(final Integer ifEnableOrder) {
      this.ifEnableOrder = ifEnableOrder;
   }

   public void setIfBook(final Integer ifBook) {
      this.ifBook = ifBook;
   }

   public void setIfReserve(final Integer ifReserve) {
      this.ifReserve = ifReserve;
   }

   public void setIfEnablePayCode(final Integer ifEnablePayCode) {
      this.ifEnablePayCode = ifEnablePayCode;
   }

   public void setPayCodeUrl(final String payCodeUrl) {
      this.payCodeUrl = payCodeUrl;
   }

   public void setSpecialFlag(final Integer specialFlag) {
      this.specialFlag = specialFlag;
   }

   public void setIfDel(final Integer ifDel) {
      this.ifDel = ifDel;
   }

   public void setRemark(final String remark) {
      this.remark = remark;
   }

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

   @JsonDeserialize(
      using = LocalDateTimeDeserializer.class
   )
   public void setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
   }

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

   @JsonDeserialize(
      using = LocalDateTimeDeserializer.class
   )
   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

   public AllocCanteen() {
   }
}
