1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- package com.dt.common.domain;
- import com.baomidou.mybatisplus.annotation.IdType;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableId;
- import com.baomidou.mybatisplus.annotation.TableName;
- import java.util.Date;
- import lombok.Data;
- /**
- * 护理人员与班级关联表
- * @TableName caregiver_group
- */
- @TableName(value ="caregiver_group")
- @Data
- public class CaregiverGroup {
- /**
- * ID
- */
- @TableId(type = IdType.AUTO)
- private Long id;
- /**
- * 护理人员ID
- */
- private Long caregiverId;
- /**
- * 班级/分组ID
- */
- private Long groupId;
- /**
- * 创建时间
- */
- private Date createTime;
- @Override
- public boolean equals(Object that) {
- if (this == that) {
- return true;
- }
- if (that == null) {
- return false;
- }
- if (getClass() != that.getClass()) {
- return false;
- }
- CaregiverGroup other = (CaregiverGroup) that;
- return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
- && (this.getCaregiverId() == null ? other.getCaregiverId() == null : this.getCaregiverId().equals(other.getCaregiverId()))
- && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
- && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
- }
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
- result = prime * result + ((getCaregiverId() == null) ? 0 : getCaregiverId().hashCode());
- result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
- result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", caregiverId=").append(caregiverId);
- sb.append(", groupId=").append(groupId);
- sb.append(", createTime=").append(createTime);
- sb.append("]");
- return sb.toString();
- }
- }
|