package com.ssm.manage.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

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

@Table(name = "member_order")
public class MemberOrder implements Serializable {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 会员ID
     */
    @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;

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

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

    /**
     * 项目ID
     */
    @Column(name = "project_id")
    private Long projectId;

    /**
     * 项目名称
     */
    @Column(name = "project_name")
    private String projectName;

    /**
     * 业务员ID
     */
    @Column(name = "staff_id")
    private Long staffId;

    /**
     * 业务员名称
     */
    @Column(name = "staff_name")
    private String staffName;

    /**
     * 记录录入时间
     */
    @Column(name = "input_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date inputDate;

    /**
     * 预约时间(精确到小时)
     */
    @Column(name = "order_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderDate;

    /**
     * 记录修改时间
     */
    @Column(name = "update_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;

    /**
     * 状态 0:预约状态/1:开单状态
     */
    private Integer state;

    /**
     * 疗程账户ID
     */
    @Column(name = "course_account_id")
    private Long courseAccountId;

    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 member_id - 会员ID
     */
    public Long getMemberId() {
        return memberId;
    }

    /**
     * 设置会员ID
     *
     * @param memberId 会员ID
     */
    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;
    }

    /**
     * 获取门店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 project_id - 项目ID
     */
    public Long getProjectId() {
        return projectId;
    }

    /**
     * 设置项目ID
     *
     * @param projectId 项目ID
     */
    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    /**
     * 获取项目名称
     *
     * @return project_name - 项目名称
     */
    public String getProjectName() {
        return projectName;
    }

    /**
     * 设置项目名称
     *
     * @param projectName 项目名称
     */
    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    /**
     * 获取业务员ID
     *
     * @return staff_id - 业务员ID
     */
    public Long getStaffId() {
        return staffId;
    }

    /**
     * 设置业务员ID
     *
     * @param staffId 业务员ID
     */
    public void setStaffId(Long staffId) {
        this.staffId = staffId;
    }

    /**
     * 获取业务员名称
     *
     * @return staff_name - 业务员名称
     */
    public String getStaffName() {
        return staffName;
    }

    /**
     * 设置业务员名称
     *
     * @param staffName 业务员名称
     */
    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    /**
     * 获取记录录入时间
     *
     * @return input_date - 记录录入时间
     */
    public Date getInputDate() {
        return inputDate;
    }

    /**
     * 设置记录录入时间
     *
     * @param inputDate 记录录入时间
     */
    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }

    /**
     * 获取预约时间(精确到小时)
     *
     * @return order_date - 预约时间(精确到小时)
     */
    public Date getOrderDate() {
        return orderDate;
    }

    /**
     * 设置预约时间(精确到小时)
     *
     * @param orderDate 预约时间(精确到小时)
     */
    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    /**
     * 获取记录修改时间
     *
     * @return update_date - 记录修改时间
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     * 设置记录修改时间
     *
     * @param updateDate 记录修改时间
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * 获取状态 0:预约状态/1:开单状态
     *
     * @return state - 状态 0:预约状态/1:开单状态
     */
    public Integer getState() {
        return state;
    }

    /**
     * 设置状态 0:预约状态/1:开单状态
     *
     * @param state 状态 0:预约状态/1:开单状态
     */
    public void setState(Integer state) {
        this.state = state;
    }

    /**
     * 获取疗程账户ID
     *
     * @return course_account_id - 疗程账户ID
     */
    public Long getCourseAccountId() {
        return courseAccountId;
    }

    /**
     * 设置疗程账户ID
     *
     * @param courseAccountId 疗程账户ID
     */
    public void setCourseAccountId(Long courseAccountId) {
        this.courseAccountId = courseAccountId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MemberOrder other = (MemberOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (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.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
            && (this.getProjectId() == null ? other.getProjectId() == null : this.getProjectId().equals(other.getProjectId()))
            && (this.getProjectName() == null ? other.getProjectName() == null : this.getProjectName().equals(other.getProjectName()))
            && (this.getStaffId() == null ? other.getStaffId() == null : this.getStaffId().equals(other.getStaffId()))
            && (this.getStaffName() == null ? other.getStaffName() == null : this.getStaffName().equals(other.getStaffName()))
            && (this.getInputDate() == null ? other.getInputDate() == null : this.getInputDate().equals(other.getInputDate()))
            && (this.getOrderDate() == null ? other.getOrderDate() == null : this.getOrderDate().equals(other.getOrderDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getCourseAccountId() == null ? other.getCourseAccountId() == null : this.getCourseAccountId().equals(other.getCourseAccountId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().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 + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
        result = prime * result + ((getProjectId() == null) ? 0 : getProjectId().hashCode());
        result = prime * result + ((getProjectName() == null) ? 0 : getProjectName().hashCode());
        result = prime * result + ((getStaffId() == null) ? 0 : getStaffId().hashCode());
        result = prime * result + ((getStaffName() == null) ? 0 : getStaffName().hashCode());
        result = prime * result + ((getInputDate() == null) ? 0 : getInputDate().hashCode());
        result = prime * result + ((getOrderDate() == null) ? 0 : getOrderDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getCourseAccountId() == null) ? 0 : getCourseAccountId().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(", memberId=").append(memberId);
        sb.append(", memberName=").append(memberName);
        sb.append(", mobilePhone=").append(mobilePhone);
        sb.append(", memberIdentityCard=").append(memberIdentityCard);
        sb.append(", storeId=").append(storeId);
        sb.append(", storeName=").append(storeName);
        sb.append(", projectId=").append(projectId);
        sb.append(", projectName=").append(projectName);
        sb.append(", staffId=").append(staffId);
        sb.append(", staffName=").append(staffName);
        sb.append(", inputDate=").append(inputDate);
        sb.append(", orderDate=").append(orderDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", state=").append(state);
        sb.append(", courseAccountId=").append(courseAccountId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}