springboot+mybatis搭建迷你小程序(一)

表设计与实体类创建

CREATE TABLE tb_area (

area_id int(2) NOT NULL auto_increment,   // NOT NULL  为空的话有默认值

area_name varchar(200) NOT NULL,

priority int(2) NOT NULL DEFAULT'0',

create_time datetime DEFAULT NULL,

last_edit_time datetime DEFAULT NULL,

PRIMARY KEY(area_id),

UNIQUE KEY UK_AREA(area_name)

)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;


package com.ydcoding.bootshop.entity;

import java.util.Date;

public class Area {
    //主键ID
    private  Integer areaId;
    //名称
    private  String areaNmae;
    //权重,数值越大越靠前
    private  int priority;
    //创建时间
    private Date createTime;
    //更新时间
    private Date lastEditTime;   //alt+enter  快捷键提示  ctrl+n getter ann setter 方法创建

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public String getAreaNmae() {
        return areaNmae;
    }

    public void setAreaNmae(String areaNmae) {
        this.areaNmae = areaNmae;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastEditTime() {
        return lastEditTime;
    }

    public void setLastEditTime(Date lastEditTime) {
        this.lastEditTime = lastEditTime;
    }
}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值