package com.ssm.manage.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

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

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

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

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

    /**
     * 会员编码
     */
    @Column(name = "member_id")
    private Long memberId;

    /**
     * 会员名称
     */
    @Column(name = "member_name")
    private String memberName;

    /**
     * 会员手机号
     */
    @Column(name = "mobile_phone")
    private String mobilePhone;

    /**
     * 会员身份证号
     */
    @Column(name = "member_identity_card")
    private String memberIdentityCard;

    /**
     * 会员卡
     */
    private String card;

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

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

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

    private static final long serialVersionUID = 1L;

    /**
     * 获取主键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;
    }

    /**
     * 获取会员编码
     *
     * @return member_id - 会员编码
     */
    public Long getMemberId() {
        return memberId;
    }

    /**
     * 设置会员编码
     *
     * @param memberId 会员编码
     */
    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    /**
     * 获取会员名称
     *
     * @return member_name - 会员名称
     */
    public String getMemberName() {
        return memberName;
    }

    /**
     * 设置会员名称
     *
     * @param memberName 会员名称
     */
    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    /**
     * 获取会员手机号
     *
     * @return mobile_phone - 会员手机号
     */
    public String getMobilePhone() {
        return mobilePhone;
    }

    /**
     * 设置会员手机号
     *
     * @param mobilePhone 会员手机号
     */
    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    /**
     * 获取会员身份证号
     *
     * @return member_identity_card - 会员身份证号
     */
    public String getMemberIdentityCard() {
        return memberIdentityCard;
    }

    /**
     * 设置会员身份证号
     *
     * @param memberIdentityCard 会员身份证号
     */
    public void setMemberIdentityCard(String memberIdentityCard) {
        this.memberIdentityCard = memberIdentityCard;
    }

    /**
     * 获取会员卡
     *
     * @return card - 会员卡
     */
    public String getCard() {
        return card;
    }

    /**
     * 设置会员卡
     *
     * @param card 会员卡
     */
    public void setCard(String card) {
        this.card = card;
    }

    /**
     * 获取促销活动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;
        }
        PromotionMember other = (PromotionMember) 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.getMemberId() == null ? other.getMemberId() == null : this.getMemberId().equals(other.getMemberId()))
            && (this.getMemberName() == null ? other.getMemberName() == null : this.getMemberName().equals(other.getMemberName()))
            && (this.getMobilePhone() == null ? other.getMobilePhone() == null : this.getMobilePhone().equals(other.getMobilePhone()))
            && (this.getMemberIdentityCard() == null ? other.getMemberIdentityCard() == null : this.getMemberIdentityCard().equals(other.getMemberIdentityCard()))
            && (this.getCard() == null ? other.getCard() == null : this.getCard().equals(other.getCard()))
            && (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 + ((getMemberId() == null) ? 0 : getMemberId().hashCode());
        result = prime * result + ((getMemberName() == null) ? 0 : getMemberName().hashCode());
        result = prime * result + ((getMobilePhone() == null) ? 0 : getMobilePhone().hashCode());
        result = prime * result + ((getMemberIdentityCard() == null) ? 0 : getMemberIdentityCard().hashCode());
        result = prime * result + ((getCard() == null) ? 0 : getCard().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(", memberId=").append(memberId);
        sb.append(", memberName=").append(memberName);
        sb.append(", mobilePhone=").append(mobilePhone);
        sb.append(", memberIdentityCard=").append(memberIdentityCard);
        sb.append(", card=").append(card);
        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();
    }
}