mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-08-20 12:29:30 +08:00
83 lines
2.6 KiB
Java
83 lines
2.6 KiB
Java
/*
|
|
* Copyright 2023 杭州白书科技有限公司
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
package xyz.playedu.api.domain;
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
import lombok.Data;
|
|
|
|
import java.io.Serializable;
|
|
|
|
/**
|
|
* @TableName course_department
|
|
*/
|
|
@TableName(value = "course_department")
|
|
@Data
|
|
public class CourseDepartment implements Serializable {
|
|
@JsonProperty("course_id")
|
|
private Integer courseId;
|
|
|
|
@JsonProperty("dep_id")
|
|
private Integer depId;
|
|
|
|
@TableField(exist = false)
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@Override
|
|
public boolean equals(Object that) {
|
|
if (this == that) {
|
|
return true;
|
|
}
|
|
if (that == null) {
|
|
return false;
|
|
}
|
|
if (getClass() != that.getClass()) {
|
|
return false;
|
|
}
|
|
CourseDepartment other = (CourseDepartment) that;
|
|
return (this.getCourseId() == null
|
|
? other.getCourseId() == null
|
|
: this.getCourseId().equals(other.getCourseId()))
|
|
&& (this.getDepId() == null
|
|
? other.getDepId() == null
|
|
: this.getDepId().equals(other.getDepId()));
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
final int prime = 31;
|
|
int result = 1;
|
|
result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode());
|
|
result = prime * result + ((getDepId() == null) ? 0 : getDepId().hashCode());
|
|
return result;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(getClass().getSimpleName());
|
|
sb.append(" [");
|
|
sb.append("Hash = ").append(hashCode());
|
|
sb.append(", courseId=").append(courseId);
|
|
sb.append(", depId=").append(depId);
|
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
sb.append("]");
|
|
return sb.toString();
|
|
}
|
|
}
|