项目设计和框架搭建

在mac环境下使用的数据库连接软件:Sequel Pro.
mysql数据库默认的编码:utf8;
InnoDB:支持事务,行级锁;写的性能好
MYISAM:支持表级锁,读的性能高;

use o2o;
create table 'tb_area'(
  'area_id' int(2) NOT NULL AUTO_INCREMNET,
'area_name' varchar(200) NOT NULL,
'privority' 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_INCREAMENT=1 DEFALUT CHARSET=utf8;
use o2o;
create table 'tb_wechat_auth'(
'wechat_auth_id' int(10) NOT NULL AUTO_INCREMENT,
'user_id' int(10) NOT NULL,
'open_id' varchar(1024) NOT NULL,
'create_time' datetime DEFAULT NULL,
primary key('wechat_auth_id'),
constraint 'fk_wechatauth_profile' foreign key('user_id') references 'tb_person_info'('user_id')
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
增加唯一索引
alter table tb_wechat_auth add unique index(open_id);

头条实体类

店铺类别

public class ShopCategory{
    private Long shopCategoryId;
    private String shopCategoryName;
    private String shopCategoryDesc;
    private String shopCategoryImg;
    private Integer priority;
    private Date createTime;
    private Date lastEditTime;
    private ShopCategory parent;
}

你可能感兴趣的:(项目设计和框架搭建)