You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.8 KiB
80 lines
1.8 KiB
package db.model.bilibili;
|
|
|
|
import db.annotation.Aliyun;
|
|
import db.model.AbstractModel;
|
|
|
|
import javax.persistence.*;
|
|
import java.io.Serializable;
|
|
import java.util.Objects;
|
|
|
|
@Aliyun
|
|
@Entity
|
|
@Table(name = "word")
|
|
public class WordModel extends AbstractModel {
|
|
private int id;
|
|
private String courseName;
|
|
private String kana;
|
|
private String chinese;
|
|
|
|
@Id
|
|
@Column(name = "id", nullable = false)
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(int id) {
|
|
this.id = id;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "course_name", nullable = false, length = 32)
|
|
public String getCourseName() {
|
|
return courseName;
|
|
}
|
|
|
|
public void setCourseName(String courseName) {
|
|
this.courseName = courseName;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "kana", nullable = false, length = 32)
|
|
public String getKana() {
|
|
return kana;
|
|
}
|
|
|
|
public void setKana(String kana) {
|
|
this.kana = kana;
|
|
}
|
|
|
|
@Basic
|
|
@Column(name = "chinese", nullable = true, length = 32)
|
|
public String getChinese() {
|
|
return chinese;
|
|
}
|
|
|
|
public void setChinese(String chinese) {
|
|
this.chinese = chinese;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) return true;
|
|
if (o == null || getClass() != o.getClass()) return false;
|
|
WordModel wordModel = (WordModel) o;
|
|
return id == wordModel.id &&
|
|
Objects.equals(courseName, wordModel.courseName) &&
|
|
Objects.equals(kana, wordModel.kana) &&
|
|
Objects.equals(chinese, wordModel.chinese);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
|
|
return Objects.hash(id, courseName, kana, chinese);
|
|
}
|
|
|
|
@Override
|
|
public Serializable primaryKey() {
|
|
return getId();
|
|
}
|
|
}
|
|
|