加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mysql.sql 49.63 KB
一键复制 编辑 原始数据 按行查看 历史
陈镇松 提交于 2021-02-26 09:45 . 提交
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
DROP TABLE IF EXISTS `tr_admin`;
CREATE TABLE `tr_admin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`auth_id` varchar(15) DEFAULT 0 COMMENT '授权UID',
`avatar` varchar(250) DEFAULT NULL COMMENT '头像',
`username` varchar(30) NOT NULL COMMENT '账号名',
`password` varchar(200) NOT NULL COMMENT '密码',
`salt` char(10) NOT NULL COMMENT '加密值',
`mobile` varchar(11) DEFAULT NULL COMMENT '手机号码',
`app_count` tinyint(2) unsigned DEFAULT 1 COMMENT '商城数量',
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
`type` tinyint(3) unsigned default 1 COMMENT '类型;1超级管理员',
`status` tinyint(4) unsigned NOT NULL default 1 COMMENT '状态;1可用,2禁用,3删除',
`expired_time` char(10) DEFAULT NULL COMMENT '到期时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY (`auth_id`),
KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='后台账号表';
INSERT INTO `tr_admin` (`id`, `username`, `password`, `salt`, `type`, `status`, `create_time`, `app_count`, `remark`) VALUES ('1', 'admin', '568a783b953fa451cf48043223db81a8264610d5', 'e6921aff', '1', '1', '1545097068', NULL, '超管账号, 无法删除');
DROP TABLE IF EXISTS `tr_operate_log`;
CREATE TABLE `tr_operate_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`operate_id` int(11) unsigned DEFAULT NULL COMMENT '管理员ID',
`content` text NOT NULL COMMENT '日志内容',
`type` tinyint(3) unsigned default 1 COMMENT '类型;1后台 2前台',
`target` varchar(20) default NULL COMMENT '目标,标记',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_operate_id` (`operate_id`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='接口操作日志表';
DROP TABLE IF EXISTS `tr_admin_session`;
CREATE TABLE `tr_admin_session` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`session_id` varchar(50) DEFAULT NULL,
`admin_id` int(11) unsigned DEFAULT NULL COMMENT '管理员ID',
`is_saas` char(1) DEFAULT '0' COMMENT 'saas状态',
`is_admin` char(1) DEFAULT '0' COMMENT '商城状态',
`login_ip` char(20) DEFAULT NULL COMMENT '登录IP',
`expire_time` char(10) DEFAULT NULL COMMENT '过期时间',
`create_time` char(10) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_admin_id` (`admin_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `tr_user`;
CREATE TABLE `tr_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`number_id` varchar(12) DEFAULT NULL COMMENT '用户ID',
`nickname` varchar(50) DEFAULT NULL COMMENT '用户昵称',
`gender` tinyint(3) NOT NULL DEFAULT '1' COMMENT '性别:1男;2女',
`mobile` varchar(11) DEFAULT NULL COMMENT '手机号码',
`email` varchar(30) DEFAULT NULL COMMENT '邮箱',
`avatar` varchar(250) DEFAULT NULL COMMENT '用户头像',
`openid` varchar(50) DEFAULT NULL COMMENT '微信',
`unionid` varchar(50) DEFAULT NULL COMMENT '微信开放平台的唯一标识符',
`balance` decimal(8,2) DEFAULT '0.00' COMMENT '余额',
`amount` decimal(20,2) DEFAULT '0.00' COMMENT '消费总额',
`address` varchar(200) DEFAULT NULL COMMENT '联系地址',
`session_key` varchar(100) DEFAULT NULL COMMENT '微信返回的session_key',
`status` tinyint(3) DEFAULT '1' COMMENT '状态:1正常;2锁定;3注销',
`remark` varchar(200) DEFAULT NULL COMMENT '备注信息',
`register_time` varchar(10) NOT NULL COMMENT '注册时间',
`update_time` varchar(10) NOT NULL COMMENT '更新时间',
`user_type` char(1) DEFAULT '0' COMMENT '用户身份;0普通,1司机,2核销员',
`share_qr` varchar(225) DEFAULT NULL COMMENT '分享专属二维码',
PRIMARY KEY (`id`),
UNIQUE KEY `number_id` (`number_id`),
UNIQUE KEY `openid` (`openid`),
KEY `mobile` (`mobile`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='用户信息表(客户)';
-- INSERT INTO `tr_user` (`id`, `number_id`, `username`, `register_time`, `update_time`) VALUES ('1', "12345678", 'admin', '1545097068', '1545097068');
DROP TABLE IF EXISTS `tr_user_token`;
CREATE TABLE `tr_user_token` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
`token` varchar(50) COMMENT '登录token',
`ip` varchar(20) COMMENT '登录IP',
`time` char(10) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_mall_id` (`mall_id`),
KEY (`token`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='登录token表(客户)';
DROP TABLE IF EXISTS `tr_user_contact`;
CREATE TABLE `tr_user_contact` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
`name` varchar(50) COMMENT '昵称',
`type` varchar(10) COMMENT '证件类型',
`number` varchar(20) COMMENT '证件号码',
`sex` char(1) COMMENT '性别',
`prefix` varchar(3) COMMENT '手机前缀',
`mobile` char(11) COMMENT '手机号码',
`create_time` char(16) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_mall_id` (`mall_id`),
KEY `ind_user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='客户联系人表';
DROP TABLE IF EXISTS `tr_driver`;
CREATE TABLE `tr_driver` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`nickname` varchar(50) COMMENT '姓名',
`gender` tinyint(3) unsigned NOT NULL DEFAULT 1 COMMENT '性别:1男;2女',
`prefix` varchar(3) DEFAULT 86 COMMENT '手机前缀',
`mobile` char(11) COMMENT '手机号码',
`email` varchar(30) COMMENT '邮箱',
`avatar` varchar(200) COMMENT '用户头像',
`openid` varchar(50) COMMENT '微信',
`id_card` varchar(25) COMMENT '身份证',
`balance` decimal(10,2) default 0 COMMENT '余额',
`order_taking` int(1) unsigned default 0 COMMENT '接单数',
`vehicle` varchar(200) COMMENT '使用车辆集合',
`driving_age` varchar(2) COMMENT '驾龄',
`driver_img` varchar(250) COMMENT '驾照信息图',
`certificate_img` varchar(250) COMMENT '实名认证图',
`status` tinyint(3) unsigned DEFAULT 2 COMMENT '状态:1正常;2休息;3注销',
`address` varchar(150) COMMENT '联系地址',
`remark` varchar(100) COMMENT '备注信息',
`add_time` char(10) NOT NULL COMMENT '添加时间',
`update_time` char(10) COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE (`openid`),
KEY `ind_mall_id` (`mall_id`),
KEY (`mobile`),
KEY `ind_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='司机表';
INSERT INTO `tr_driver` (`id`, `nickname`, `gender`, `prefix`, `mobile`, `email`, `avatar`, `openid`, `id_card`, `balance`, `order_taking`, `vehicle`, `driving_age`, `driver_img`, `certificate_img`, `status`, `address`, `remark`, `add_time`, `update_time`, `mall_id`) VALUES ('1', '默认', '1', NULL, null, '9491166@qq.com', '', NULL, null, '649.36', '0', '1', '2', null, null, '1', '1231231', '', '1557045396', NULL, '1');
DROP TABLE IF EXISTS `tr_verifier`;
CREATE TABLE `tr_verifier` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`nickname` varchar(50) COMMENT '姓名',
`gender` tinyint(3) unsigned NOT NULL DEFAULT 1 COMMENT '性别:1男;2女',
`prefix` varchar(3) DEFAULT 86 COMMENT '手机前缀',
`mobile` char(11) COMMENT '手机号码',
`email` varchar(30) COMMENT '邮箱',
`openid` varchar(50) COMMENT '微信',
`id_card` varchar(25) COMMENT '身份证',
`remark` varchar(100) COMMENT '备注信息',
`status` tinyint(3) unsigned DEFAULT 2 COMMENT '状态:1正常;2休息;3注销',
`add_time` char(10) NOT NULL COMMENT '添加时间',
PRIMARY KEY (`id`),
UNIQUE (`openid`),
KEY `ind_mall_id` (`mall_id`),
UNIQUE (`mobile`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='核销员表';
DROP TABLE IF EXISTS `tr_car_type`;
CREATE TABLE `tr_car_type` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) NOT NULL COMMENT '名称',
`order_by` varchar(6) DEFAULT 0 COMMENT '权重,越大越靠前',
`seat` varchar(2) COMMENT '座位数',
`icon` varchar(100) COMMENT '车型图片',
`remark` varchar(100) COMMENT '备注信息',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1开启;2关闭',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_order_by` (`order_by`),
KEY `ind_mall_id` (`mall_id`),
KEY `ind_status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='车的类型表';
INSERT INTO `tr_car_type` (`id`, `name`, `order_by`, `seat`, `icon`, `remark`, `status`, `create_time`, `mall_id`) VALUES ('1', '丰田大巴', '0', '58', '/attachment/default/cars1.jpg', '司机001', '1', '1567404929', '1');
DROP TABLE IF EXISTS `tr_car`;
CREATE TABLE `tr_car` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) NOT NULL COMMENT '车名',
`model_number` varchar(10) COMMENT '型号',
`plate_number` varchar(20) COMMENT '车牌号',
`appearance` varchar(12) COMMENT '外形',
`seat` varchar(2) COMMENT '座位数',
`car_type` int(2) unsigned COMMENT '所属车类型ID',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1燃油,2电动,3混动',
`icon` varchar(100) COMMENT '车辆图片',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1正常;2停止',
`remark` varchar(100) COMMENT '备注信息',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_car_type` (`car_type`),
KEY `ind_mall_id` (`mall_id`),
KEY `ind_status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='车表';
INSERT INTO `tr_car` (`id`, `name`, `model_number`, `plate_number`, `appearance`, `seat`, `car_type`, `type`, `icon`, `status`, `remark`, `create_time`, `mall_id`) VALUES ('1', '本田', '思域', '粤B123456', '黑', '5', '1', '1', '/attachment/default/cars1.jpg', '1', '', '1557043884', '1');
DROP TABLE IF EXISTS `tr_car_list`;
CREATE TABLE `tr_car_list` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`car_id` int(2) unsigned COMMENT '车ID',
`plate_number` varchar(20) COMMENT '车牌号',
`attr_id` int(2) unsigned DEFAULT 0 COMMENT '所属id',
`type` tinyint(3) unsigned DEFAULT null COMMENT '类型;1机场接送,2巴士路线,3专车接送,4包车路线, 5租车网点',
`use` tinyint(3) unsigned DEFAULT 0 COMMENT '0空闲,1占用',
PRIMARY KEY (`id`),
KEY (`car_id`),
KEY `relate` (`type`, `attr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='车列表';
INSERT INTO `tr_car_list` (`id`, `mall_id`, `car_id`, `plate_number`, `attr_id`, `type`, `use`) VALUES ('1', '1', '1', '粤BFA4648', '0', NULL, '0');
DROP TABLE IF EXISTS `tr_airport`;
CREATE TABLE `tr_airport` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) NOT NULL COMMENT '机场名',
`placards` tinyint(1) unsigned default 1 COMMENT '举牌支持;1不支持,2支持',
`price` decimal(7,2) default 0 COMMENT '举牌价格',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1正常;2停止',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_mall_id` (`mall_id`),
KEY `ind_status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='机场表';
INSERT INTO `tr_airport` (`id`, `name`, `placards`, `price`, `status`, `create_time`, `mall_id`) VALUES ('1', '广州白云国际机场', '1', '50.00', '1', '1557040925', '1');
INSERT INTO `tr_airport` (`id`, `name`, `placards`, `price`, `status`, `create_time`, `mall_id`) VALUES ('2', '深圳宝安国际机场', '2', '60.00', '1', '1557041033', '1');
DROP TABLE IF EXISTS `tr_airport_line`;
CREATE TABLE `tr_airport_line` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) NOT NULL COMMENT '线路名称',
`airport` int(1) unsigned NOT NULL COMMENT '所属机场',
`province_code` varchar(10) DEFAULT NULL COMMENT '省的代码',
`city_code` varchar(10) DEFAULT NULL COMMENT '市的代码',
`area_code` varchar(10) DEFAULT NULL COMMENT '区的代码',
`address` varchar(100) DEFAULT NULL COMMENT '地址',
`car_type` int(2) unsigned DEFAULT 0 COMMENT '选择的车型ID',
`open_default` tinyint(1) unsigned default 0 COMMENT '启动默认车票;1开启,0关闭',
`open_weekend` tinyint(1) unsigned default 0 COMMENT '启动周末车票;1开启,0关闭',
`open_date` tinyint(1) unsigned default 0 COMMENT '启动日期车票;1开启,0关闭',
`date_between` varchar(25) COMMENT '车票日期范围',
`default_price` decimal(10,2) DEFAULT 0 COMMENT '默认价格',
`weekend_price` decimal(10,2) DEFAULT 0 COMMENT '周末价格',
`date_price` decimal(10,2) DEFAULT 0 COMMENT '日期价格',
`default_commission` decimal(10,2) DEFAULT 0 COMMENT '默认佣金',
`weekend_commission` decimal(10,2) DEFAULT 0 COMMENT '周末佣金',
`date_commission` decimal(10,2) DEFAULT 0 COMMENT '日期佣金',
`ride_number` varchar(3) COMMENT '乘车人数',
`charge_type` tinyint(3) unsigned DEFAULT 0 COMMENT '计费模式;0: 按人头, 1: 按车辆',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1接机,2送机',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1展示;0隐藏',
`update_time` char(10) COMMENT '更新时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_airport` (`airport`),
KEY `ind_type` (`type`),
KEY `ind_mall_id` (`mall_id`),
KEY `ind_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机场的线路表';
DROP TABLE IF EXISTS `tr_buses_line`;
CREATE TABLE `tr_buses_line` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) NOT NULL COMMENT '线路名称',
`province_code_from` varchar(10) DEFAULT NULL COMMENT '省的代码(出发地)',
`city_code_from` varchar(10) DEFAULT NULL COMMENT '市的代码(出发地)',
`area_code_from` varchar(10) DEFAULT NULL COMMENT '区的代码(出发地)',
`address_from` varchar(100) DEFAULT NULL COMMENT '出发地地址',
`province_code_to` varchar(10) DEFAULT NULL COMMENT '省的代码(目的地的)',
`city_code_to` varchar(10) DEFAULT NULL COMMENT '市的代码(目的地的)',
`area_code_to` varchar(10) DEFAULT NULL COMMENT '区的代码(目的地的)',
`address_to` varchar(300) DEFAULT NULL COMMENT '目的地的地址',
`car_type` int(2) unsigned DEFAULT 0 COMMENT '选择的车型ID',
`open_default` tinyint(1) unsigned default 0 COMMENT '启动默认车票;1开启,0关闭',
`open_weekend` tinyint(1) unsigned default 0 COMMENT '启动周末车票;1开启,0关闭',
`open_date` tinyint(1) unsigned default 0 COMMENT '启动日期车票;1开启,0关闭',
`date_between` varchar(25) COMMENT '车票日期范围',
`default_adult_price` decimal(10,2) DEFAULT 0 COMMENT '成人默认价格',
`weekend_adult_price` decimal(10,2) DEFAULT 0 COMMENT '成人周末价格',
`date_adult_price` decimal(10,2) DEFAULT 0 COMMENT '成人日期价格',
`default_children_price` decimal(10,2) DEFAULT 0 COMMENT '儿童默认价格',
`weekend_children_price` decimal(10,2) DEFAULT 0 COMMENT '儿童周末价格',
`date_children_price` decimal(10,2) DEFAULT 0 COMMENT '儿童日期价格',
`default_commission` decimal(10,2) DEFAULT 0 COMMENT '成人默认佣金',
`weekend_commission` decimal(10,2) DEFAULT 0 COMMENT '成人周末佣金',
`date_commission` decimal(10,2) DEFAULT 0 COMMENT '成人日期佣金',
`ride_number` varchar(3) COMMENT '乘车人数',
`ticket_number` varchar(3) COMMENT '车票数',
`driver` varchar(100) COMMENT '司机集合',
`shifts` varchar(4) COMMENT '班次,每分钟',
`operation_time` varchar(50) COMMENT '运营时间',
`ticketing_time` varchar(50) COMMENT '售票时间',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1展示;0隐藏',
`hot` char(1) DEFAULT 1 COMMENT '状态:1正常;2热门',
`update_time` char(10) COMMENT '更新时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
`ticket_deadline` varchar(4) NOT NULL DEFAULT '0' COMMENT '售票截止时间,单位分钟',
PRIMARY KEY (`id`),
KEY `ind_hot` (`hot`),
KEY `ind_mall_id` (`mall_id`),
KEY `ind_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='巴士路线的线路表';
DROP TABLE IF EXISTS `tr_classes_cache`;
CREATE TABLE `tr_classes_cache` (
`key` varchar(150) NOT NULL,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`value` longtext,
`time` char(10) DEFAULT NULL,
KEY `ind_key` (`key`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='巴士路线的线路班次缓存表';
DROP TABLE IF EXISTS `tr_car_line`;
CREATE TABLE `tr_car_line` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) NOT NULL COMMENT '线路名称',
`province_code_from` varchar(10) DEFAULT NULL COMMENT '省的代码(出发地)',
`city_code_from` varchar(10) DEFAULT NULL COMMENT '市的代码(出发地)',
`area_code_from` varchar(10) DEFAULT NULL COMMENT '区的代码(出发地)',
`address_from` varchar(100) DEFAULT NULL COMMENT '出发地地址',
`province_code_to` varchar(10) DEFAULT NULL COMMENT '省的代码(目的地的)',
`city_code_to` varchar(10) DEFAULT NULL COMMENT '市的代码(目的地的)',
`area_code_to` varchar(10) DEFAULT NULL COMMENT '区的代码(目的地的)',
`address_to` varchar(300) DEFAULT NULL COMMENT '目的地的地址',
`car_type` int(2) unsigned DEFAULT 0 COMMENT '选择的车型ID',
`open_default` tinyint(1) unsigned default 0 COMMENT '启动默认车票;1开启,0关闭',
`open_weekend` tinyint(1) unsigned default 0 COMMENT '启动周末车票;1开启,0关闭',
`open_date` tinyint(1) unsigned default 0 COMMENT '启动日期车票;1开启,0关闭',
`date_between` varchar(25) COMMENT '车票日期范围',
`default_price` decimal(10,2) DEFAULT 0 COMMENT '默认价格',
`weekend_price` decimal(10,2) DEFAULT 0 COMMENT '周末价格',
`date_price` decimal(10,2) DEFAULT 0 COMMENT '日期价格',
`default_commission` decimal(10,2) DEFAULT 0 COMMENT '默认佣金',
`weekend_commission` decimal(10,2) DEFAULT 0 COMMENT '周末佣金',
`date_commission` decimal(10,2) DEFAULT 0 COMMENT '日期佣金',
`ride_number` varchar(3) COMMENT '乘车人数',
`charge_type` tinyint(3) unsigned DEFAULT 0 COMMENT '计费模式;0: 按人头, 1: 按车辆',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1展示;0隐藏',
`update_time` char(10) COMMENT '更新时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='专车接送的线路表';
DROP TABLE IF EXISTS `tr_order`;
CREATE TABLE `tr_order` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`order_sn` varchar(50) COMMENT '订单编号',
`user_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '客户ID',
`line_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '线路ID',
`address_from` varchar(100) DEFAULT NULL COMMENT '出发地',
`address_to` varchar(100) DEFAULT NULL COMMENT '目的地',
`long_lat_from` varchar(32) DEFAULT NULL COMMENT '出发地的经纬度',
`long_lat_to` varchar(32) DEFAULT NULL COMMENT '目的地的经纬度',
`contact_name` varchar(15) COMMENT '联系人',
`mobile` varchar(14) COMMENT '手机号码',
`ride_number` varchar(10) COMMENT '乘车人数',
`total_money` decimal(10,2) default 0 COMMENT '总价',
`pay_money` decimal(10,2) default 0 COMMENT '支付价',
`discount_money` decimal(6,2) default 0 COMMENT '优惠',
`refund_money` decimal(10,2) default 0 COMMENT '退款金额',
`commission` decimal(6,2) default 0 COMMENT '佣金',
`refund_fee` decimal(8,2) DEFAULT '0.000' COMMENT '退款手续费',
`coupon_id` varchar(150) COMMENT '优惠券',
`reserve_time` varchar(50) DEFAULT NULL COMMENT '预约时间',
`flight_number` varchar(20) DEFAULT NULL COMMENT '航班号',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1机场接送,2巴士路线,3专车接送,4包车路线, 5租车网点',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '订单状态:1待支付,2已支付,3已取消;4待分配;5已分配;6司机拒接;7司机已接单;8已完成;9已退款;10待退款;11部分退款',
`settlement` char(1) default 0 COMMENT '结算状态;1已结算,0未结算',
`payment_no` varchar(50) DEFAULT NULL COMMENT '支付单号',
`trade_no` varchar(50) DEFAULT NULL COMMENT '交易单号',
`pay_time` varchar(10) DEFAULT NULL COMMENT '支付时间',
`allot_car_id` int(1) unsigned default NULL COMMENT '派单的指定的车辆ID',
`allot_driver_id` int(1) unsigned default NULL COMMENT '派单的指定的司机ID',
`allot_notify` varchar(10) default NULL COMMENT '派单通知',
`refuse` varchar(200) COMMENT '司机拒接原因',
`invoice` int(1) unsigned DEFAULT 0 COMMENT '开票ID',
`memo` varchar(200) COMMENT '备注',
`reason` varchar(200) COMMENT '取消原因',
`update_time` char(10) COMMENT '更新时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE (`order_sn`),
UNIQUE (`payment_no`),
KEY `ind_id` (`user_id`),
KEY `ind_line_id` (`line_id`),
KEY `ind_driver_id` (`allot_driver_id`),
KEY `ind_type` (`type`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单表';
DROP TABLE IF EXISTS `tr_order_outlets_detail`;
CREATE TABLE `tr_order_outlets_detail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`order_id` int(10) COMMENT '订单id',
`take_id` int(3) DEFAULT null COMMENT '取车网点id',
`oc_id` int(3) DEFAULT null COMMENT '网点车的id',
`also_id` int(3) DEFAULT null COMMENT '还车网点id',
`serve` text DEFAULT null COMMENT '服务',
`plate_number` varchar(20) COMMENT '车牌号',
`start_time` varchar(30) DEFAULT null COMMENT '开始时间',
`end_time` varchar(30) DEFAULT null COMMENT '结束时间',
PRIMARY KEY (`id`),
key (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单详情表';
DROP TABLE IF EXISTS `tr_order_commission`;
CREATE TABLE `tr_order_commission` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`order_sn` varchar(50) COMMENT '订单编号',
`driver_id` int(10) unsigned NOT NULL COMMENT '司机ID',
`money` decimal(6,2) default 0 COMMENT '金额',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1机场接送,2巴士路线,3专车接送,4包车路线',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '订单状态:1正常,2冻结',
`pay_time` char(10) DEFAULT NULL COMMENT '支付时间',
PRIMARY KEY (`id`),
KEY `ind_sn` (`order_sn`),
KEY `ind_driver_id` (`driver_id`),
KEY `ind_status` (`status`),
KEY `ind_type` (`type`),
UNIQUE KEY `data_unique` (`driver_id`,`order_sn`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='订单分佣表';
DROP TABLE IF EXISTS `tr_invoices`;
CREATE TABLE `tr_invoices` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
`order_sn` varchar(50) COMMENT '订单编号',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1个人,2企业',
`head_name` varchar(60) COMMENT '发票抬头',
`duty_number` varchar(30) COMMENT '税号',
`money` decimal(10,2) default 0 COMMENT '价格',
`mobile` varchar(20) COMMENT '手机号码',
`address` varchar(200) COMMENT '联系地址',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1未开票;2已开票;3已拒绝',
`memo` varchar(150) COMMENT '备注',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_user_id` (`user_id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='发票表';
DROP TABLE IF EXISTS `tr_personal_invoice`;
CREATE TABLE `tr_personal_invoice` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1个人,2企业',
`head_name` varchar(60) COMMENT '发票抬头',
`duty_number` varchar(30) COMMENT '税号',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_user_id` (`user_id`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='个人发票表';
DROP TABLE IF EXISTS `tr_transfer`;
CREATE TABLE `tr_transfer` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`transfer_sn` varchar(50) DEFAULT NULL COMMENT '提现单号',
`driver_id` int(10) unsigned NOT NULL COMMENT '司机ID',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1司机提现,2其它',
`money` decimal(9,2) NOT NULL DEFAULT '0.000' COMMENT '提现金额',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1未提现;2已提现;3已拒绝',
`reason` varchar(200) COMMENT '提现的原因',
`trade_no` varchar(50) DEFAULT NULL COMMENT '交易单号',
`ip` varchar(20) DEFAULT NULL,
`complete_time` char(10) DEFAULT NULL COMMENT '完成时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_id` (`driver_id`),
UNIQUE (`transfer_sn`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='提现单表';
DROP TABLE IF EXISTS `tr_refund`;
CREATE TABLE `tr_refund` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`refund_sn` varchar(50) DEFAULT NULL COMMENT '退款单号',
`user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
`order_sn` varchar(50) COMMENT '订单编号',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1机场接送,2巴士路线,3专车接送,4包车路线',
`refund_fee` decimal(8,2) DEFAULT '0.000' COMMENT '退款手续费',
`money` decimal(9,2) DEFAULT '0.000' COMMENT '退款金额',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1未退款;2已退款;3已拒绝',
`reason` varchar(200) COMMENT '退款的原因',
`trade_no` varchar(50) DEFAULT NULL COMMENT '交易单号',
`ip` varchar(20) DEFAULT NULL,
`complete_time` char(10) DEFAULT NULL COMMENT '完成时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_id` (`user_id`),
UNIQUE (`order_sn`),
UNIQUE (`refund_sn`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='退款单表';
DROP TABLE IF EXISTS `tr_coupon`;
CREATE TABLE `tr_coupon` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`type` tinyint(1) DEFAULT NULL COMMENT '类型,1:机场接送、2:巴士路线、3专车接送,4包车路线、0通用',
`name` varchar(150) NOT NULL COMMENT '名称',
`condition` varchar(2) DEFAULT NULL COMMENT '条件',
`content` text COMMENT '条件的内容',
`amount` float DEFAULT '0' COMMENT '优惠额度',
`time_from` varchar(20) DEFAULT NULL COMMENT '开始时间',
`time_to` varchar(20) DEFAULT NULL COMMENT '结束时间',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态,1启用,0禁用',
`mold` tinyint(3) NOT NULL DEFAULT '1' COMMENT '获得方式 1:普通类型 2:推荐类型 3:被推荐类型',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_type` (`type`),
KEY `ind_condition` (`condition`),
KEY `ind_status` (`status`),
KEY `ind_time_between` (`time_from`,`time_to`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='优惠券表';
DROP TABLE IF EXISTS `tr_user_coupon`;
CREATE TABLE `tr_user_coupon` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`user_id` mediumint(8) unsigned NOT NULL COMMENT '会员ID',
`coupon_id` mediumint(8) unsigned NOT NULL COMMENT '优惠券ID',
`status` tinyint(1) unsigned DEFAULT 1 COMMENT '状态,1:可用,2:已使用',
`order_id` int(2) unsigned DEFAULT NULL COMMENT '订单号',
`type` tinyint(1) DEFAULT NULL COMMENT '类型,1:机场接送、2:巴士路线、3专车接送,4包车路线、0通用',
`mold` tinyint(3) NOT NULL DEFAULT '1' COMMENT '获得方式 1:普通类型 2:推荐类型 3:被推荐类型',
`name` varchar(150) NOT NULL COMMENT '名称',
`condition` varchar(2) DEFAULT NULL COMMENT '条件',
`content` text COMMENT '条件的内容',
`amount` float DEFAULT '0' COMMENT '优惠额度',
`get_time` char(10) COMMENT '领取时间',
`end_time` char(10) COMMENT '结束时间',
PRIMARY KEY (`id`),
KEY `ind_id` (`user_id`),
KEY `ind_coupon_id` (`coupon_id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户优惠券表';
DROP TABLE IF EXISTS `tr_resource`;
CREATE TABLE `tr_resource` (
`id` varchar(50) DEFAULT NULL COMMENT '资源id',
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(60) DEFAULT NULL COMMENT '资源名称',
`url` varchar(150) NOT NULL COMMENT '资源图片',
`user_id` int(5) unsigned default null COMMENT '用户ID',
`location` varchar(10) COMMENT '资源生成位置',
`type` tinyint(2) unsigned DEFAULT 1 COMMENT '类型:1图片;2普通文件;3源码文件',
`is_delete` tinyint(2) unsigned DEFAULT 0 COMMENT '状态:1已删除;0正常',
`time` char(10) DEFAULT NULL,
KEY `ind_id` (`id`),
KEY `ind_is_delete` (is_delete),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='系统图片表';
DROP TABLE IF EXISTS `tr_line_menu`;
CREATE TABLE `tr_line_menu` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`title` varchar(50) COMMENT '标题',
`icon` varchar(100) COMMENT '图片',
`image_size` varchar(90) COMMENT '尺寸',
`url` varchar(50) COMMENT '跳转地址',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1开启;0关闭',
`sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` varchar(25) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='线路菜单';
INSERT INTO `tr_line_menu` (`id`, `title`, `icon`, `url`, `status`, `create_time`, `mall_id`, `image_size`, `sort`) VALUES ('1', '机场接送', '/attachment/default/airport.png', 'pages/route/airport/airport', '1', NULL, '1', '60px * 60px', '0');
INSERT INTO `tr_line_menu` (`id`, `title`, `icon`, `url`, `status`, `create_time`, `mall_id`, `image_size`, `sort`) VALUES ('2', '城际包车', '/attachment/default/vehicle.png', 'pages/route/fixed/index/index', '1', '2020-08-14 14:46', '1', '86px * 86px', '0');
INSERT INTO `tr_line_menu` (`id`, `title`, `icon`, `url`, `status`, `create_time`, `mall_id`, `image_size`, `sort`) VALUES ('3', '城际巴士', '/attachment/default/buses.png', 'pages/route/daily/index/index', '1', '2020-08-14 14:45', '1', '168px * 168px', '0');
INSERT INTO `tr_line_menu` (`id`, `title`, `icon`, `url`, `status`, `create_time`, `mall_id`, `image_size`, `sort`) VALUES ('4', '港珠澳跨境租车', '/attachment/default/car.png', 'pages/route/special/special', '1', '2020-08-14 14:45', '1', '168px * 168px', '0');
DROP TABLE IF EXISTS `tr_banner`;
CREATE TABLE `tr_banner` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`title` varchar(50) COMMENT '标题',
`icon` varchar(100) COMMENT '图片',
`image_size` varchar(90) COMMENT '尺寸',
`url` varchar(50) COMMENT '跳转地址',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1开启;2关闭',
`create_time` char(10) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='banner图';
DROP TABLE IF EXISTS `tr_article_type`;
CREATE TABLE `tr_article_type` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) COMMENT '文章类型标题',
`icon` varchar(100) COMMENT '图片',
`order_by` varchar(5) DEFAULT 0 COMMENT '权重状态:值越大越靠前',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1开启;2关闭',
`create_time` char(10) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='文章类型表';
INSERT INTO `tr_article_type` (`id`, `mall_id`, `name`, `icon`, `status`, `create_time`) VALUES ('1', 1, '机场接送', 'temp', '1', '1556071525');
INSERT INTO `tr_article_type` (`id`, `mall_id`, `name`, `icon`, `status`, `create_time`) VALUES ('2', 1, '巴士路线', 'temp', '1', '1556071700');
INSERT INTO `tr_article_type` (`id`, `mall_id`, `name`, `icon`, `status`, `create_time`) VALUES ('3', 1, '专车接送', 'temp', '1', '1556071719');
INSERT INTO `tr_article_type` (`id`, `mall_id`, `name`, `icon`, `status`, `create_time`) VALUES ('4', 1, '其它', 'temp', '1', '1556071719');
INSERT INTO `tr_article_type` (`id`, `mall_id`, `name`, `icon`, `status`, `create_time`) VALUES ('5', 1, '包车路线', 'temp', '1', '1556071719');
DROP TABLE IF EXISTS `tr_article`;
CREATE TABLE `tr_article` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`type_id` int(2) unsigned NOT NULL default 0 COMMENT '文章类型',
`title` varchar(50) COMMENT '标题',
`content` longtext COMMENT '内容',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1开启;2关闭',
`create_time` char(10) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='文章表';
DROP TABLE IF EXISTS `tr_wx_path`;
CREATE TABLE `tr_wx_path` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(20) DEFAULT NULL COMMENT '标题',
`url` varchar(90) DEFAULT NULL COMMENT '页面url',
`show` tinyint(1) unsigned DEFAULT 1 COMMENT '状态:1显示;2隐藏',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='微信小程序路径';
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('1', '巴士路线', 'pages/route/daily/index/index');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('2', '巴士热门路线', 'pages/route/daily/hotRoute/hotRoute');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('3', '机场接送', 'pages/route/airport/airport');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('4', '专车接送', 'pages/route/special/special');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`, `show`) VALUES ('5', '包车路线', 'pages/route/fixed/index/index', '1');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`, `show`) VALUES ('6', '包车热门路线', 'pages/route/fixed/hotRoute/hotRoute', '1');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('7', '我的优惠券列表', 'pages/center/coupon/coupon');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('8', '我的发票列表', 'pages/center/invoice/index/index');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('9', '我的联系人列表', 'pages/center/liaison/liaison');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('10', '关于我们', 'pages/center/aboutUs/aboutUs');
INSERT INTO `tr_wx_path` (`id`, `title`, `url`) VALUES ('11', '网点租车', 'pages/rentCar/rentCar');
DROP TABLE IF EXISTS `tr_form_id`;
CREATE TABLE `tr_form_id` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`user_id` int(11) unsigned NOT NULL COMMENT '用户id',
`form_id` char(32) NOT NULL DEFAULT '',
`type` varchar(15) NOT NULL DEFAULT '' COMMENT '可选值:form_id或prepay_id',
`send_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '使用次数',
`create_time` char(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `ind_id` (`user_id`),
UNIQUE `ind_form_id` (`form_id`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='小程序form_id和prepay_id记录';
DROP TABLE IF EXISTS `tr_sms_record`;
CREATE TABLE `tr_sms_record` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`mobile` char(11) DEFAULT NULL COMMENT '手机号',
`tpl` varchar(100) DEFAULT NULL COMMENT '使用的模板',
`content` varchar(500) DEFAULT NULL COMMENT '短信内容',
`code` varchar(10) DEFAULT NULL COMMENT '验证码',
`status` tinyint(2) unsigned default 2 COMMENT '状态;1未使用,2已使用',
`ip` varchar(30) DEFAULT NULL COMMENT 'IP',
`create_time` varchar(20) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_mobile` (`mobile`),
KEY `status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='短信发送记录';
DROP TABLE IF EXISTS `tr_cache`;
CREATE TABLE `tr_cache` (
`key` varchar(150) NOT NULL,
`value` longtext,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`time` char(10) DEFAULT NULL,
KEY `ind_key` (`key`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='缓存表';
DROP TABLE IF EXISTS `tr_system_set`;
CREATE TABLE `tr_system_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`key` varchar(150) NOT NULL DEFAULT '',
`value` text,
PRIMARY KEY (`id`),
KEY `ind_key` (`key`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='系统设置表';
INSERT INTO `tr_system_set` (`id`, `mall_id`, `key`, `value`) VALUES ('1', 1, 'loginConfig', 'a:3:{s:9:\"siteTitle\";s:18:\"网商跨境租车\";s:8:\"seoTitle\";s:18:\"网商跨境租车\";s:9:\"copyright\";s:60:\"Copyright © 2017-2019 网商云计算. All rights reserved.\";}');
DROP TABLE IF EXISTS `tr_reason`;
CREATE TABLE `tr_reason` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`type` tinyint(3) unsigned DEFAULT 1 COMMENT '类型;1机场接送,2巴士路线,3专车接送,4包车路线,0通用',
`content` varchar(100) COMMENT '内容',
`status` tinyint(2) unsigned NOT NULL default 1 COMMENT '状态;1启用,2禁用',
`create_time` char(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='理由原因表';
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('1', '0', '订单信息有误', '1', '1557752429', '1');
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('2', '0', '订单重复了', '1', '1558148863', '1');
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('3', '0', '订单时间冲突', '1', '1557752466', '1');
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('4', '1', '车辆维修中', '1', '1558148881', '1');
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('5', '1', '时间赶不上了', '1', '1558148898', '1');
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('6', '2', '临时有事情', '1', '1558148928', '1');
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('7', '1', '放第三', '1', '1584007605', '5');
INSERT INTO `tr_reason` (`id`, `type`, `content`, `status`, `create_time`, `mall_id`) VALUES ('8', '0', '超过退款时间\r\n机场接送:提前2小时\r\n巴士线路:提现3小时', '1', '1584023457', '6');
DROP TABLE IF EXISTS `tr_cron_job`;
CREATE TABLE `tr_cron_job` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`key` varchar(100) NOT NULL DEFAULT '',
`value` text,
`time` char(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `ind_key` (`key`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='定时任务表';
DROP TABLE IF EXISTS `tr_vehicle_line`;
CREATE TABLE `tr_vehicle_line` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(50) NOT NULL COMMENT '线路名称',
`province_code_from` varchar(10) DEFAULT NULL COMMENT '省的代码(出发地)',
`city_code_from` varchar(10) DEFAULT NULL COMMENT '市的代码(出发地)',
`area_code_from` varchar(10) DEFAULT NULL COMMENT '区的代码(出发地)',
`address_from` varchar(100) DEFAULT NULL COMMENT '出发地地址',
`province_code_to` varchar(10) DEFAULT NULL COMMENT '省的代码(目的地的)',
`city_code_to` varchar(10) DEFAULT NULL COMMENT '市的代码(目的地的)',
`area_code_to` varchar(10) DEFAULT NULL COMMENT '区的代码(目的地的)',
`address_to` varchar(300) DEFAULT NULL COMMENT '目的地的地址',
`car_type` int(2) unsigned DEFAULT 0 COMMENT '选择的车型ID',
`price` decimal(10,2) DEFAULT 0 COMMENT '成人默认价格',
`status` tinyint(3) unsigned DEFAULT 1 COMMENT '状态:1展示;0隐藏',
`hot` char(1) DEFAULT 1 COMMENT '状态:1正常;2热门',
`update_time` char(10) COMMENT '更新时间',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `ind_hot` (`hot`),
KEY `ind_status` (`status`),
KEY `ind_mall_id` (`mall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='包车线路表';
DROP TABLE IF EXISTS `tr_upgrade`;
CREATE TABLE `tr_upgrade` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL COMMENT '名称',
`status` char(1) DEFAULT 0 COMMENT '状态',
`create_time` char(10) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY (`name`),
KEY (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='版本更新表';
DROP TABLE IF EXISTS `tr_mall`;
CREATE TABLE `tr_mall` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) DEFAULT NULL COMMENT '商城名称',
`manager_id` int(10) unsigned NOT NULL COMMENT '用户ID',
`instance_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '实例ID',
`source` varchar(20) DEFAULT NULL COMMENT '来源',
`is_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
`is_disable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否禁用',
`expired_time` char(10) DEFAULT '0' COMMENT '到期时间',
`create_time` char(10) DEFAULT NULL COMMENT '创建时间',
`update_time` char(10) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `ind_manager_id` (`manager_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商城';
INSERT INTO `tr_mall` VALUES ('1', '租车商城', '1', '0', null, '0', '0', NULL, '1583895258', '0');
DROP TABLE IF EXISTS `tr_saas_setting`;
CREATE TABLE `tr_saas_setting` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`logo` varchar(50) DEFAULT NULL COMMENT 'logo',
`site_title` varchar(50) DEFAULT NULL COMMENT '站点标题',
`seo_title` varchar(100) DEFAULT NULL COMMENT '网站seo的标题',
`copyright` varchar(200) DEFAULT NULL COMMENT '版权信息',
`sms_id` varchar(30) DEFAULT NULL COMMENT '短信appid',
`sms_secret` varchar(60) DEFAULT NULL COMMENT '短信appkey',
`sms_sign` varchar(60) DEFAULT NULL COMMENT '短信签名',
`sms_code` varchar(20) DEFAULT NULL COMMENT '验证码模板ID',
`secret_id` varchar(40) DEFAULT NULL COMMENT '腾讯云访问密钥ID',
`secret_key` varchar(40) DEFAULT NULL COMMENT '腾讯云访问密钥KEY',
`bucket` varchar(35) DEFAULT NULL COMMENT '腾讯云存储桶名',
`region` varchar(20) DEFAULT NULL COMMENT '存储桶地域',
`open_app_id` varchar(25) DEFAULT NULL COMMENT '第三方平台appId',
`open_app_secret` varchar(35) DEFAULT NULL COMMENT '第三方平台appSecret',
`msg_verify_token` varchar(50) DEFAULT NULL COMMENT '消息校验Token',
`encoding_key` varchar(50) DEFAULT NULL COMMENT '消息加解密Key',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='saas配置';
DROP TABLE IF EXISTS `tr_wxapp_upgrade`;
CREATE TABLE `tr_wxapp_upgrade` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`version` varchar(20) DEFAULT NULL COMMENT '版本号',
`remarks` text COMMENT '版本说明',
`title` varchar(255) DEFAULT NULL COMMENT '日志标题',
`content` text COMMENT '更新说明',
`create_time` varchar(20) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
key (`mall_id`),
KEY (`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='小程序版本更新表';
DROP TABLE IF EXISTS `tr_rental_outlets`;
CREATE TABLE `tr_rental_outlets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`number_id` varchar(10) not null COMMENT '网点ID',
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(60) DEFAULT NULL COMMENT '网点名',
`mobile` varchar(15) NOT NULL DEFAULT '' COMMENT '联系电话',
`address` varchar(255) NOT NULL DEFAULT '' COMMENT '地址',
`province_code` int(11) NOT NULL DEFAULT '0',
`city_code` int(11) NOT NULL DEFAULT '0',
`area_code` int(11) NOT NULL DEFAULT '0',
`longitude` varchar(20) NOT NULL DEFAULT '' COMMENT '经度',
`latitude` varchar(20) NOT NULL DEFAULT '' COMMENT '纬度',
`score` int(11) NOT NULL DEFAULT '5' COMMENT '店铺评分',
`pic_id` text NOT NULL COMMENT '门店实景图',
`business_hours` varchar(125) NOT NULL DEFAULT '' COMMENT '营业时间',
`service_fee` decimal(6,2) DEFAULT '0.00' COMMENT '上门服务费',
`deliver_range` int(10) DEFAULT 0 COMMENT '送车范围',
`status` tinyint(4) unsigned default 1 COMMENT '状态;1可用,2禁用',
`create_time` char(10) DEFAULT NULL COMMENT '创建时间',
`update_time` char(10) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
key (`mall_id`),
key (`number_id`),
key (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='租车网点表';
DROP TABLE IF EXISTS `tr_outlets_car`;
CREATE TABLE `tr_outlets_car` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`outlet_id` int(10) unsigned not null COMMENT '网点',
`car_id` int(10) unsigned not null COMMENT '车辆ID',
`price` decimal(7,2) DEFAULT '0.00' COMMENT '日均价',
`week_price` text DEFAULT null COMMENT '周价格',
`special_price` text DEFAULT null COMMENT '特殊价',
`stock` int(10) DEFAULT 0 COMMENT '总车辆',
`over_stock` int(10) DEFAULT 0 COMMENT '剩余车辆',
`status` tinyint(4) unsigned default 1 COMMENT '状态;1可用,2禁用',
`update_time` char(10) DEFAULT NULL COMMENT '更新时间',
`create_time` char(10) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
key (`outlet_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='网点的车表';
DROP TABLE IF EXISTS `tr_outlets_surcharge`;
CREATE TABLE `tr_outlets_surcharge` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(60) DEFAULT NULL COMMENT '名称',
`price` decimal(7,2) DEFAULT '0.00' COMMENT '价格',
`desc` varchar(500) DEFAULT null COMMENT '简要描述',
`mode` tinyint(1) unsigned default 1 COMMENT '模式;1默认,2自选',
`status` tinyint(1) unsigned default 1 COMMENT '状态;1可用,2禁用',
`update_time` char(10) DEFAULT NULL COMMENT '更新时间',
`create_time` char(10) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
key (`mall_id`),
key (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='网点附加费用表';
DROP TABLE IF EXISTS `tr_outlets_agreement`;
CREATE TABLE `tr_outlets_agreement` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`name` varchar(60) DEFAULT NULL COMMENT '名称',
`content` varchar(500) DEFAULT null COMMENT '内容',
`status` tinyint(1) unsigned default 1 COMMENT '状态;1可用,2禁用',
PRIMARY KEY (`id`),
key (`mall_id`),
key (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='网点协议表';
DROP TABLE IF EXISTS `tr_outlets_search`;
CREATE TABLE `tr_outlets_search` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mall_id` int(10) unsigned DEFAULT 0 COMMENT '所属商城ID',
`user_id` int(10) DEFAULT 0 COMMENT '用户id',
`content` text DEFAULT null COMMENT '内容',
PRIMARY KEY (`id`),
key (`mall_id`),
key (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='网点搜索记录表';
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化