package com.ssm.manage.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Table(name = "promotion_store")
@JsonIgnoreProperties(ignoreUnknown = true)
public class PromotionStore implements Serializable {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 门店ID
     */
    @Column(name = "store_id")
    private Long storeId;

    /**
     * 门店名称
     */
    @Column(name = "store_name")
    private String storeName;

    /**
     * 促销活动ID
     */
    @Column(name = "promotion_id")
    private Long promotionId;

    /**
     * 促销方案编码
     */
    @Column(name = "promotion_num")
    private String promotionNum;

    /**
     * 促销方案名称
     */
    @Column(name = "promotion_name")
    private String promotionName;

    /**
     * 门店编码
     */
    @Column(name = "store_num")
    private String storeNum;

    private static final long serialVersionUID = 1L;

    public String getStoreNum() {
        return storeNum;
    }

    public void setStoreNum(String storeNum) {
        this.storeNum = storeNum;
    }

    /**
     * 获取主键ID
     *
     * @return id - 主键ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置主键ID
     *
     * @param id 主键ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取门店ID
     *
     * @return store_id - 门店ID
     */
    public Long getStoreId() {
        return storeId;
    }

    /**
     * 设置门店ID
     *
     * @param storeId 门店ID
     */
    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    /**
     * 获取门店名称
     *
     * @return store_name - 门店名称
     */
    public String getStoreName() {
        return storeName;
    }

    /**
     * 设置门店名称
     *
     * @param storeName 门店名称
     */
    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    /**
     * 获取促销活动ID
     *
     * @return promotion_id - 促销活动ID
     */
    public Long getPromotionId() {
        return promotionId;
    }

    /**
     * 设置促销活动ID
     *
     * @param promotionId 促销活动ID
     */
    public void setPromotionId(Long promotionId) {
        this.promotionId = promotionId;
    }

    /**
     * 获取促销方案编码
     *
     * @return promotion_num - 促销方案编码
     */
    public String getPromotionNum() {
        return promotionNum;
    }

    /**
     * 设置促销方案编码
     *
     * @param promotionNum 促销方案编码
     */
    public void setPromotionNum(String promotionNum) {
        this.promotionNum = promotionNum;
    }

    /**
     * 获取促销方案名称
     *
     * @return promotion_name - 促销方案名称
     */
    public String getPromotionName() {
        return promotionName;
    }

    /**
     * 设置促销方案名称
     *
     * @param promotionName 促销方案名称
     */
    public void setPromotionName(String promotionName) {
        this.promotionName = promotionName;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PromotionStore other = (PromotionStore) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
            && (this.getPromotionId() == null ? other.getPromotionId() == null : this.getPromotionId().equals(other.getPromotionId()))
            && (this.getPromotionNum() == null ? other.getPromotionNum() == null : this.getPromotionNum().equals(other.getPromotionNum()))
            && (this.getPromotionName() == null ? other.getPromotionName() == null : this.getPromotionName().equals(other.getPromotionName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
        result = prime * result + ((getPromotionId() == null) ? 0 : getPromotionId().hashCode());
        result = prime * result + ((getPromotionNum() == null) ? 0 : getPromotionNum().hashCode());
        result = prime * result + ((getPromotionName() == null) ? 0 : getPromotionName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", storeId=").append(storeId);
        sb.append(", storeName=").append(storeName);
        sb.append(", promotionId=").append(promotionId);
        sb.append(", promotionNum=").append(promotionNum);
        sb.append(", promotionName=").append(promotionName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}