/**
* Created by didi on 2017/9/5.
* control + n 生成set 、get 方法 及赋值
* @Table 链接 Mysql,schema 项目名字 name 表名
*/
@Entity
@Table(name = "banner", schema = "first", catalog = "")
public class BannerModel {
@Id
@Column(name = "id")
private int id;
private String color;
private String title;
private String jumpTo;
private String imgUrl;
private String nativeId;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getJumpTo() {
return jumpTo;
}
public void setJumpTo(String jumpTo) {
this.jumpTo = jumpTo;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
public String getNativeId() {
return nativeId;
}
public void setNativeId(String nativeId) {
this.nativeId = nativeId;
}
}
详解:control + n
1.生成set 和 get 方法

2.构造函数

网友评论