package com.publiccms.entities.cms;
// Generated 2020-3-26 11:25:55 by Hibernate Tools 6.0.0-SNAPSHOT

import javax.persistence.Column;
import javax.persistence.Embeddable;

import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * CmsVoteUserId generated by hbm2java
 */
@Embeddable
public class CmsUserVoteId implements java.io.Serializable {

    /**
    *
    */
    private static final long serialVersionUID = 1L;

    @GeneratorColumn(title = "用户", condition = true)
    private long userId;
    @GeneratorColumn(title = "投票", condition = true)
    private long voteId;

    public CmsUserVoteId() {
    }

    public CmsUserVoteId(long userId, long voteId) {
        this.userId = userId;
        this.voteId = voteId;
    }

    @Column(name = "user_id", nullable = false)
    public long getUserId() {
        return this.userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @Column(name = "vote_id", nullable = false)
    public long getVoteId() {
        return this.voteId;
    }

    public void setVoteId(long voteId) {
        this.voteId = voteId;
    }

    public boolean equals(Object other) {
        if ((this == other))
            return true;
        if ((other == null))
            return false;
        if (!(other instanceof CmsUserVoteId))
            return false;
        CmsUserVoteId castOther = (CmsUserVoteId) other;

        return (this.getUserId() == castOther.getUserId()) && (this.getVoteId() == castOther.getVoteId());
    }

    public int hashCode() {
        int result = 17;

        result = 37 * result + (int) this.getUserId();
        result = 37 * result + (int) this.getVoteId();
        return result;
    }

}
