1 Star 0 Fork 1

coder / thinkphp5-o2oShop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
o2o_sql.sql 9.30 KB
一键复制 编辑 原始数据 按行查看 历史
yanjie 提交于 2019-08-16 18:01 . update
#生活服务分类表
CREATE TABLE IF NOT EXISTS `o2o_category`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '', #default null可能会影响性能
`parent_id` int(10) unsigned NOT NULL DEFAULT 0,
`listorder` int(8) unsigned NOT NULL DEFAULT 0, #排序
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY parent_id (`parent_id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#城市表
CREATE TABLE `o2o_city`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '',
`uname` varchar(50) NOT NULL DEFAULT '',
`parent_id` int(10) unsigned NOT NULL DEFAULT 0,
`listorder` int(8) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_tme` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY parent_id (`parent_id`),
UNIQUE KEY uname (`uname`) #唯一索引
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#商圈表
CREATE TABLE `o2o_area`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '',
`city_id` int(11) unsigned NOT NULL DEFAULT 0,
`parent_id` int(10) unsigned NOT NULL DEFAULT 0,
`listorder` int(8) unsigned NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY parent_id (`parent_id`),
KEY city_id (`city_id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#商户表
CREATE TABLE `o2o_bis`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '',
`email` varchar(50) NOT NULL DEFAULT '',
`logo` varchar(255) NOT NULL DEFAULT '',
`licence_logo` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
`city_id` int(11) unsigned NOT NULL DEFAULT 0,
`city_path` varchar(50) NOT NULL DEFAULT '',
`back_info` varchar(50) NOT NULL DEFAULT '',
`back_user` varchar(50) NOT NULL DEFAULT '',
`money` decimal(20, 2) unsigned NOT NULL DEFAULT '0.00',
`back_name` varchar(50) NOT NULL DEFAULT '',
`faren` varchar(20) NOT NULL DEFAULT '',
`faren_tel` varchar(20) NOT NULL DEFAULT '',
`listorder` int(8) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY city_id (`city_id`),
KEY name (`name`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#商户账号表
CREATE TABLE `o2o_bis_order`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL DEFAULT '',
`password` char(32) NOT NULL DEFAULT '',#password需要用md5加密
`code` varchar(10) NOT NULL DEFAULT 0,
`bis_id` int(11) unsigned NOT NULL DEFAULT 0,#商户id
`last_login_ip` varchar(20) NOT NULL DEFAULT '', #商户最后的登录IP地址
`last_login_time` int(11) unsigned NOT NULL DEFAULT 0,
`is_main` tinyint(1) unsigned NOT NULL DEFAULT 0,#是否默认为总管理员
`listorder` int(8) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY bis_id (`bis_id`),
KEY username (`username`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#商户门店表
CREATE TABLE `o2o_bis_location`
(
`id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL DEFAULT '',
`logo` varchar(255) NOT NULL DEFAULT '',
`address` varchar(255) NOT NULL DEFAULT '',
`tel` varchar(11) NOT NULL DEFAULT '',
`contact` varchar(20) NOT NULL DEFAULT '',
`xpoint` varchar(20) NOT NULL DEFAULT '', #精度
`ypoint` varchar(20) NOT NULL DEFAULT '', #纬度
`bis_id` int(11) unsigned NOT NULL DEFAULT 0,
`open_time` int(11) unsigned NOT NULL DEFAULT 0,
`content` text NOT NULL,
`is_main` tinyint(1) unsigned NOT NULL DEFAULT 0,
`api_address` varchar(255) NOT NULL DEFAULT '',
`city_id` int(11) unsigned NOT NULL DEFAULT 0,
`city_path` varchar(50) NOT NULL DEFAULT '',
`category_id` int(11) unsigned NOT NULL DEFAULT 0,
`category_path` varchar(50) NOT NULL DEFAULT '',
`back_info` varchar(50) NOT NULL DEFAULT '',
`listorder` int(8) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY city_id (`city_id`),
KEY category_id (`category_id`),
KEY name (`name`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#团购商品表
CREATE TABLE `o2o_deal`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
`category_id` int(11) unsigned NOT NULL DEFAULT 0,
`se_category_id` int(11) unsigned NOT NULL DEFAULT 0,
`bis_id` int(11) unsigned NOT NULL DEFAULT 0,
`location_ids` varchar(100) NOT NULL DEFAULT '',
`image` varchar(200) NOT NULL DEFAULT '',
`description` text NOT NULL,
`start_time` int(11) unsigned NOT NULL DEFAULT 0,
`end_time` int(11) unsigned NOT NULL DEFAULT 0,
`origin_price` decimal(20, 2) unsigned NOT NULL DEFAULT '0.00',
`current_price` decimal(20, 2) unsigned NOT NULL DEFAULT '0.00',
`city_id` int(11) unsigned NOT NULL DEFAULT 0,
`buy_count` int(11) NOT NULL DEFAULT 0,
`total_count` int(11) NOT NULL DEFAULT 0,
`coupons_begin_time` int(11) unsigned NOT NULL DEFAULT 0,
`coupons_end_time` int(11) unsigned NOT NULL DEFAULT 0,
`xpoint` varchar(20) NOT NULL DEFAULT '',
`ypoint` varchar(20) NOT NULL DEFAULT '',
`bis_account_id` int(10) unsigned NOT NULL DEFAULT 0,
`balance_price` decimal(20, 2) unsigned NOT NULL DEFAULT '0.00',
`notes` text NOT NULL,
`listorder` int(8) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY category_id (`category_id`),
KEY se_category_id (`se_category_id`),
KEY city_id (`city_id`),
KEY start_time (`start_time`),
KEY end_time (`end_time`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#用户表
CREATE TABLE `o2o_user`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL DEFAULT '',
`password` char(32) NOT NULL DEFAULT '',
`code` varchar(10) NOT NULL DEFAULT '',
`last_login_ip` varchar(20) NOT NULL DEFAULT '',
`last_login_time` int(11) unsigned NOT NULL DEFAULT 0,
`email` varchar(30) NOT NULL DEFAULT '',
`mobile` varchar(20) NOT NULL DEFAULT '',
`listorder` int(8) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY username (`username`),
UNIQUE KEY email (`email`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
#推荐位表
CREATE TABLE `o2o_featured`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(1) unsigned NOT NULL DEFAULT 0,
`title` varchar(30) NOT NULL DEFAULT '',
`image` varchar(255) NOT NULL DEFAULT '',
`url` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
`listorder` int(8) NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL DEFAULT 0,
`create_time` int(11) unsigned NOT NULL DEFAULT 0,
`update_time` int(11) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
JavaScript
1
https://gitee.com/sil3nt/thinkphp5-o2oShop.git
git@gitee.com:sil3nt/thinkphp5-o2oShop.git
sil3nt
thinkphp5-o2oShop
thinkphp5-o2oShop
master

搜索帮助