package com.publiccms.entities.cms;
// Generated 2021-09-23 16:55:08 by Hibernate Tools 6.0.0-SNAPSHOT

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;

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

/**
 * CmsUserSurveyQuestionId generated by hbm2java
 */
@Embeddable
public class CmsUserSurveyId implements java.io.Serializable {

    /**
    *
    */
    private static final long serialVersionUID = 1L;
    /**
     * user id<p>
     * 用户id
     */
    @GeneratorColumn(title = "用户", condition = true)
    private long userId;
    /**
     * survey id<p>
     * 问卷调查id
     */
    @GeneratorColumn(title = "问卷ID", condition = true)
    private long surveyId;

    public CmsUserSurveyId() {
    }

    public CmsUserSurveyId(long userId, long surveyId) {
        this.userId = userId;
        this.surveyId = surveyId;
    }

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

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

    @Column(name = "survey_id", nullable = false)
    public long getSurveyId() {
        return this.surveyId;
    }

    public void setSurveyId(long surveyId) {
        this.surveyId = surveyId;
    }

    public boolean equals(Object other) {
        if ((this == other))
            return true;
        if ((other == null))
            return false;
        if (!(other instanceof CmsUserSurveyId))
            return false;
        CmsUserSurveyId castOther = (CmsUserSurveyId) other;
        return (this.getUserId() == castOther.getUserId()) && (this.getSurveyId() == castOther.getSurveyId());
    }

    public int hashCode() {
        int result = 17;
        result = 37 * result + (int) this.getUserId();
        result = 37 * result + (int) this.getSurveyId();
        return result;
    }

}
