SAMS/src/main/java/com/bruce/sams/domain/ams/Registration.java

101 lines
3.2 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.bruce.sams.domain.ams;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;
/**
* 活动报名表
* @TableName ams_registration
*/
@TableName(value ="ams_registration")
@Data
public class Registration {
/**
* 报名ID
*/
@TableId(type = IdType.AUTO)
private Long regId;
/**
* 活动ID
*/
private Long actId;
/**
* 用户ID
*/
private Long userId;
/**
* 角色organizer: 组织者, participant: 参与者)
*/
private Object role;
/**
* 报名状态
*/
private Object status;
/**
* 报名时间
*/
private Date registerTime;
/**
* 参与时间
*/
private Date attendTime;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
Registration other = (Registration) that;
return (this.getRegId() == null ? other.getRegId() == null : this.getRegId().equals(other.getRegId()))
&& (this.getActId() == null ? other.getActId() == null : this.getActId().equals(other.getActId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getRegisterTime() == null ? other.getRegisterTime() == null : this.getRegisterTime().equals(other.getRegisterTime()))
&& (this.getAttendTime() == null ? other.getAttendTime() == null : this.getAttendTime().equals(other.getAttendTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getRegId() == null) ? 0 : getRegId().hashCode());
result = prime * result + ((getActId() == null) ? 0 : getActId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getRegisterTime() == null) ? 0 : getRegisterTime().hashCode());
result = prime * result + ((getAttendTime() == null) ? 0 : getAttendTime().hashCode());
return result;
}
@Override
public String toString() {
return getClass().getSimpleName() +
" [" +
"Hash = " + hashCode() +
", regId=" + regId +
", actId=" + actId +
", userId=" + userId +
", role=" + role +
", status=" + status +
", registerTime=" + registerTime +
", attendTime=" + attendTime +
"]";
}
}