package com.ywt.domain.entity.glasses;

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

/**
 * 字典表
 */
@Table(name = "dict_type")
@Entity
public class DictType implements Serializable {
    private static final long serialVersionUID = 1L;

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

    @Column(name = "shop_id")
    private Integer shopId;


    @Column(name = "type_code")
    private String typeCode;

    @Column(name = "value")
    private Integer value;

    @Column(name = "item_name")
    private String itemName;

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

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark = "";

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

    @Column(name = "creat_time", nullable = false)
    private Date creatTime;

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

    public Integer getId() {
        return id;
    }

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

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public Integer getShopId() {
        return shopId;
    }

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

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

    /**
     * 权重越大，越靠前
     */
    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    /**
     * 备注
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 备注
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

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

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

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

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

    public String toString() {
        return "DictType{id=" + id +
                ", typeCode=" + typeCode +
                ", value=" + value +
                ", itemName=" + itemName +
                ", weight=" + weight +
                ", remark=" + remark +
                ", deleted=" + deleted +
                ", creatTime=" + creatTime +
                ", updateTime=" + updateTime +
                "}";
    }
}