package com.ywt.domain.entity.glasses;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 商品表
 */
@Table(name = "goods")
@Entity
public class Goods implements Serializable {
  private static final long serialVersionUID = 1L;

  /**
   * 主键id
   */
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", insertable = false, nullable = false)
  private Integer id;


  /**
   * 标题
   */
  @Column(name = "name", nullable = false)
  private String name = "";


  /**
   * 店铺id
   */
  @Column(name = "shop_id", nullable = false)
  private  Integer shopId = 1;

  /**
   * 品牌名称
   */
  @Column(name = "brand_name", nullable = false)
  private String brandName = "";

  /**
   * 类型ID，对应dict_type表主键id
   */
  @Column(name = "type_id", nullable = false)
  private Integer typeId;

  /**
   * 类型名称
   */
  @Column(name = "type_name", nullable = false)
  private String typeName = "";

  /**
   * 规格
   */
  @Column(name = "spec")
  private String spec = "";

  /**
   * 单位ID，对应dict_type表主键id
   */
  @Column(name = "unit_id", nullable = false)
  private Integer unitId;

  /**
   * 单位名称
   */
  @Column(name = "unit_name", nullable = false)
  private String unitName = "";

  /**
   * 单价，单位：分
   */
  @Column(name = "unit_price", nullable = false)
  private Integer unitPrice = 0;

  /**
   * 库存，只能为整数
   */
  @Column(name = "inventory", nullable = false)
  private Integer inventory = 0;

  /**
   * 权重，权重越大越靠前
   */
  @Column(name = "weight", nullable = false)
  private Integer weight = 0;

  /**
   * 图片
   */
  @Column(name = "pic")
  private String pic;

  /**
   * 状态，1-正常，0-禁用
   */
  @Column(name = "status")
  private Integer status;

  /**
   * 是否删除
   */
  @Column(name = "deleted", nullable = false)
  private Integer deleted = 0;

  @Column(name = "create_time", nullable = false)
  private Date createTime;

  @Column(name = "update_time")
  private Date updateTime;

  /**
   * 主键id
   */
  public Integer getId() {
    return id;
  }

  /**
   * 主键id
   */
  public void setId(Integer id) {
    this.id = id;
  }


  /**
   * 店铺id
   */
  public Integer getShopId() {
    return shopId;
  }

  public void setShopId(Integer shopId) {
    this.shopId = shopId;
  }

  /**
   * 标题
   */
  public String getName() {
    return name;
  }

  /**
   * 标题
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * 品牌名称
   */
  public String getBrandName() {
    return brandName;
  }

  /**
   * 品牌名称
   */
  public void setBrandName(String brandName) {
    this.brandName = brandName;
  }

  /**
   * 类型ID，对应dict_type表主键id
   */
  public Integer getTypeId() {
    return typeId;
  }

  /**
   * 类型ID，对应dict_type表主键id
   */
  public void setTypeId(Integer typeId) {
    this.typeId = typeId;
  }

  /**
   * 类型名称
   */
  public String getTypeName() {
    return typeName;
  }

  /**
   * 类型名称
   */
  public void setTypeName(String typeName) {
    this.typeName = typeName;
  }

  /**
   * 规格
   */
  public String getSpec() {
    return spec;
  }

  /**
   * 规格
   */
  public void setSpec(String spec) {
    this.spec = spec;
  }

  /**
   * 单位ID，对应dict_type表主键id
   */
  public Integer getUnitId() {
    return unitId;
  }

  /**
   * 单位ID，对应dict_type表主键id
   */
  public void setUnitId(Integer unitId) {
    this.unitId = unitId;
  }

  /**
   * 单位名称
   */
  public String getUnitName() {
    return unitName;
  }

  /**
   * 单位名称
   */
  public void setUnitName(String unitName) {
    this.unitName = unitName;
  }

  /**
   * 单价，单位：分
   */
  public Integer getUnitPrice() {
    return unitPrice;
  }

  /**
   * 单价，单位：分
   */
  public void setUnitPrice(Integer unitPrice) {
    this.unitPrice = unitPrice;
  }

  /**
   * 库存，只能为整数
   */
  public Integer getInventory() {
    return inventory;
  }

  /**
   * 库存，只能为整数
   */
  public void setInventory(Integer inventory) {
    this.inventory = inventory;
  }



  /**
   * 权重，权重越大越靠前
   */
  public Integer getWeight() {
    return weight;
  }

  public void setWeight(Integer weight) {
    this.weight = weight;
  }

  /**
   * 图片
   */
  public String getPic() {
    return pic;
  }

  /**
   * 图片
   */
  public void setPic(String pic) {
    this.pic = pic;
  }

  /**
   * 状态，1-正常，0-禁用
   */
  public Integer getStatus() {
    return status;
  }

  /**
   * 状态，1-正常，0-禁用
   */
  public void setStatus(Integer status) {
    this.status = status;
  }

  /**
   * 是否删除
   */
  public Integer getDeleted() {
    return deleted;
  }

  /**
   * 是否删除
   */
  public void setDeleted(Integer deleted) {
    this.deleted = deleted;
  }

  public Date getCreateTime() {
    return createTime;
  }

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

  public Date getUpdateTime() {
    return updateTime;
  }

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

  public String toString() {
    return "Goods{id=" + id + 
      ", name=" + name + 
      ", brandName=" + brandName + 
      ", typeId=" + typeId + 
      ", typeName=" + typeName + 
      ", spec=" + spec + 
      ", unitId=" + unitId + 
      ", unitName=" + unitName + 
      ", unitPrice=" + unitPrice + 
      ", inventory=" + inventory + 
      ", wight=" + weight +
      ", pic=" + pic + 
      ", status=" + status + 
      ", deleted=" + deleted + 
      ", createTime=" + createTime + 
      ", updateTime=" + updateTime + 
      "}";
  }
}