package com.publiccms.entities.log;
// Generated 2021-1-14 22:33:12 by Hibernate Tools 6.0.0-SNAPSHOT


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;

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

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

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

    @GeneratorColumn(title = "站点", condition = true)
    private short siteId;
    @GeneratorColumn(title = "访问日期", condition = true)
    private Date visitDate;
    @GeneratorColumn(title = "访问小时", condition = true)
    private byte visitHour;

    public LogVisitDayId() {
    }

    public LogVisitDayId(short siteId, Date visitDate, byte visitHour) {
       this.siteId = siteId;
       this.visitDate = visitDate;
       this.visitHour = visitHour;
    }
   

    @Column(name="site_id", nullable=false)
    public short getSiteId() {
        return this.siteId;
    }
    
    public void setSiteId(short siteId) {
        this.siteId = siteId;
    }

    @Column(name="visit_date", nullable=false, length=10)
    public Date getVisitDate() {
        return this.visitDate;
    }
    
    public void setVisitDate(Date visitDate) {
        this.visitDate = visitDate;
    }

    @Column(name="visit_hour", nullable=false)
    public byte getVisitHour() {
        return this.visitHour;
    }
    
    public void setVisitHour(byte visitHour) {
        this.visitHour = visitHour;
    }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
         if ( (other == null ) ) return false;
         if ( !(other instanceof LogVisitDayId) ) return false;
         LogVisitDayId castOther = ( LogVisitDayId ) other; 
         
         return (this.getSiteId()==castOther.getSiteId())
 && ( (this.getVisitDate()==castOther.getVisitDate()) || ( this.getVisitDate()!=null && castOther.getVisitDate()!=null && this.getVisitDate().equals(castOther.getVisitDate()) ) )
 && (this.getVisitHour()==castOther.getVisitHour());
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + this.getSiteId();
         result = 37 * result + ( getVisitDate() == null ? 0 : this.getVisitDate().hashCode() );
         result = 37 * result + this.getVisitHour();
         return result;
   }   


}


