构造模型 Model(三)

/**
 * 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 方法

构造模型 Model(三)_第1张图片
屏幕快照 2017-09-19 下午3.59.26.png

2.构造函数

构造模型 Model(三)_第2张图片
屏幕快照 2017-09-19 下午3.59.15.png

你可能感兴趣的:(构造模型 Model(三))