package com.ssm.manage.entity;

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

@Table(name = "staff_salary")
public class StaffSalary 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 = "staff_id")
    private Long staffId;

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

    /**
     * 水牌号
     */
    @Column(name = "brand_number")
    private String brandNumber;

    /**
     * 底薪
     */
    @Column(name = "base_salary")
    private BigDecimal baseSalary;

    /**
     * 计件工资
     */
    @Column(name = "comm_salary")
    private BigDecimal commSalary;

    /**
     * 时间(按月份)
     */
    private String date;

    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;
    }

    /**
     * 获取员工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 brand_number - 水牌号
     */
    public String getBrandNumber() {
        return brandNumber;
    }

    /**
     * 设置水牌号
     *
     * @param brandNumber 水牌号
     */
    public void setBrandNumber(String brandNumber) {
        this.brandNumber = brandNumber;
    }

    /**
     * 获取底薪
     *
     * @return base_salary - 底薪
     */
    public BigDecimal getBaseSalary() {
        return baseSalary;
    }

    /**
     * 设置底薪
     *
     * @param baseSalary 底薪
     */
    public void setBaseSalary(BigDecimal baseSalary) {
        this.baseSalary = baseSalary;
    }

    /**
     * 获取计件工资
     *
     * @return comm_salary - 计件工资
     */
    public BigDecimal getCommSalary() {
        return commSalary;
    }

    /**
     * 设置计件工资
     *
     * @param commSalary 计件工资
     */
    public void setCommSalary(BigDecimal commSalary) {
        this.commSalary = commSalary;
    }

    /**
     * 获取时间(按月份)
     *
     * @return date - 时间(按月份)
     */
    public String getDate() {
        return date;
    }

    /**
     * 设置时间(按月份)
     *
     * @param date 时间(按月份)
     */
    public void setDate(String date) {
        this.date = date;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StaffSalary other = (StaffSalary) 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.getStaffId() == null ? other.getStaffId() == null : this.getStaffId().equals(other.getStaffId()))
            && (this.getStaffName() == null ? other.getStaffName() == null : this.getStaffName().equals(other.getStaffName()))
            && (this.getBrandNumber() == null ? other.getBrandNumber() == null : this.getBrandNumber().equals(other.getBrandNumber()))
            && (this.getBaseSalary() == null ? other.getBaseSalary() == null : this.getBaseSalary().equals(other.getBaseSalary()))
            && (this.getCommSalary() == null ? other.getCommSalary() == null : this.getCommSalary().equals(other.getCommSalary()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()));
    }

    @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 + ((getStaffId() == null) ? 0 : getStaffId().hashCode());
        result = prime * result + ((getStaffName() == null) ? 0 : getStaffName().hashCode());
        result = prime * result + ((getBrandNumber() == null) ? 0 : getBrandNumber().hashCode());
        result = prime * result + ((getBaseSalary() == null) ? 0 : getBaseSalary().hashCode());
        result = prime * result + ((getCommSalary() == null) ? 0 : getCommSalary().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().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(", staffId=").append(staffId);
        sb.append(", staffName=").append(staffName);
        sb.append(", brandNumber=").append(brandNumber);
        sb.append(", baseSalary=").append(baseSalary);
        sb.append(", commSalary=").append(commSalary);
        sb.append(", date=").append(date);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}