ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf
1.4 在java项目中创建Dragon类
package com.hx.entity;
public class Dragon {
/**
* 神兽的编号
*/
private int id;
/**
* 所属的世界之主编号
*/
private int masterid;
/**
* 神兽的昵称
*/
private String name;
/**
* 健康值
*/
private int health;
/**
* 亲密度
*/
private int lover;
/**
* 类型
*/
private String type;
/**
* 等级
*/
private String grade;// 神兽青龙所特有的
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getMasterid() {
return masterid;
}
public void setMasterId(int masterId) {
this.masterid = masterId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getHealth() {
return health;
}
public void setHealth(int health) {
this.health = health;
}
public int getLover() {
return lover;
}
public void setLover(int lover) {
this.lover = lover;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getGrade() {
return grade;
}
public void setGrade(String grade) {
this.grade = grade;
}
@Override
public String toString() {