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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

@TableName("alloc_kind")
@ApiModel("档口品类表")
public class AllocKind {
   @TableId
   @ApiModelProperty("主键id")
   private Long id;
   @ApiModelProperty("品类id")
   private Long kindId;
   @ApiModelProperty("品类名称")
   private String kindName;
   @ApiModelProperty("品类图片链接")
   private String imgUrl;
   @ApiModelProperty("档口id")
   private Long stallId;
   @ApiModelProperty("创建人")
   private String crby;
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @ApiModelProperty("更新人")
   private String upby;
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;

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

   public AllocKind(Long kindId, AllocKind allocKind, Long stallId) {
      this.kindId = kindId;
      this.kindName = allocKind.getKindName();
      this.imgUrl = allocKind.getImgUrl();
      this.stallId = stallId;
   }

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

   public Long getKindId() {
      return this.kindId;
   }

   public String getKindName() {
      return this.kindName;
   }

   public Long getStallId() {
      return this.stallId;
   }

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

   public void setKindName(final String kindName) {
      this.kindName = kindName;
   }

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

   public void setStallId(final Long stallId) {
      this.stallId = stallId;
   }

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

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

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

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

   public AllocKind() {
   }
}
