package com.ssm.manage.entity;

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

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

    /**
     * 收款方式编码
     */
    @Column(name = "collection_type")
    private String collectionType;

    /**
     * 方式名称
     */
    @Column(name = "collection_type_name")
    private String collectionTypeName;

    /**
     * 状态 1：可用，0：停用
     */
    private Integer state;

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

    /**
     * 获取收款方式编码
     *
     * @return collection_type - 收款方式编码
     */
    public String getCollectionType() {
        return collectionType;
    }

    /**
     * 设置收款方式编码
     *
     * @param collectionType 收款方式编码
     */
    public void setCollectionType(String collectionType) {
        this.collectionType = collectionType;
    }

    /**
     * 获取方式名称
     *
     * @return collection_type_name - 方式名称
     */
    public String getCollectionTypeName() {
        return collectionTypeName;
    }

    /**
     * 设置方式名称
     *
     * @param collectionTypeName 方式名称
     */
    public void setCollectionTypeName(String collectionTypeName) {
        this.collectionTypeName = collectionTypeName;
    }

    /**
     * 获取状态 1：可用，0：停用
     *
     * @return state - 状态 1：可用，0：停用
     */
    public Integer getState() {
        return state;
    }

    /**
     * 设置状态 1：可用，0：停用
     *
     * @param state 状态 1：可用，0：停用
     */
    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BaseCollectionType other = (BaseCollectionType) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCollectionType() == null ? other.getCollectionType() == null : this.getCollectionType().equals(other.getCollectionType()))
            && (this.getCollectionTypeName() == null ? other.getCollectionTypeName() == null : this.getCollectionTypeName().equals(other.getCollectionTypeName()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCollectionType() == null) ? 0 : getCollectionType().hashCode());
        result = prime * result + ((getCollectionTypeName() == null) ? 0 : getCollectionTypeName().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().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(", collectionType=").append(collectionType);
        sb.append(", collectionTypeName=").append(collectionTypeName);
        sb.append(", state=").append(state);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}