項(xiàng)目設(shè)計(jì)和框架搭建

在mac環(huán)境下使用的數(shù)據(jù)庫(kù)連接軟件:Sequel Pro.
mysql數(shù)據(jù)庫(kù)默認(rèn)的編碼:utf8;
InnoDB:支持事務(wù),行級(jí)鎖;寫的性能好
MYISAM:支持表級(jí)鎖,讀的性能高;

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);

頭條實(shí)體類

店鋪類別

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;
}

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容