Oneshop商城,2018-8-1日数据库设计表结构

# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 140.143.137.39 (MySQL 5.6.37-log)
# Database: oneshop
# Generation Time: 2018-08-01 14:03:39 +0000
# ************************************************************


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


# Dump of table onsp_ad_position
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_ad_position`;

CREATE TABLE `onsp_ad_position` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '广告位ID',
  `name` varchar(30) NOT NULL DEFAULT '' COMMENT '广告位名称',
  `width` varchar(32) NOT NULL DEFAULT '0' COMMENT '广告位宽度',
  `height` varchar(32) NOT NULL DEFAULT '0' COMMENT '广告位高度',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:轮显;2:图片',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:开启; 0: 关闭',
  `sort` int(11) unsigned DEFAULT '0',
  `create_time` int(11) unsigned DEFAULT NULL,
  `update_time` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='广告位记录表';



# Dump of table onsp_address
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_address`;

CREATE TABLE `onsp_address` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) unsigned NOT NULL COMMENT '用户ID',
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '收货人姓名',
  `zip` varchar(6) DEFAULT NULL COMMENT '邮编',
  `telphone` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `country` varchar(32) DEFAULT NULL COMMENT '国ID',
  `province` varchar(32) NOT NULL DEFAULT '0' COMMENT '省ID',
  `city` varchar(32) NOT NULL DEFAULT '0' COMMENT '市ID',
  `area` int(11) unsigned NOT NULL COMMENT '区ID',
  `detail` varchar(250) NOT NULL DEFAULT '' COMMENT '收货地址',
  `mobile` varchar(20) DEFAULT NULL COMMENT '手机',
  `default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否默认,0:为非默认,1:默认',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(10) DEFAULT NULL,
  `status` tinyint(3) DEFAULT '1',
  `clicknums` int(11) DEFAULT '1' COMMENT '记录用户常用的地址.在付款页面,显示前3个常用地址',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收货信息表';



# Dump of table onsp_admin
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_admin`;

CREATE TABLE `onsp_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  `pwd` varchar(64) DEFAULT NULL,
  `scope` varchar(32) DEFAULT '1',
  `city_id` int(11) DEFAULT '1',
  `status` tinyint(3) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `web_type` int(11) DEFAULT '1',
  `mobile` varchar(16) DEFAULT NULL,
  `realname` varchar(16) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='分站管理员';



# Dump of table onsp_auth_group
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_auth_group`;

CREATE TABLE `onsp_auth_group` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `title` char(100) NOT NULL DEFAULT '',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `rules` text NOT NULL,
  `city_id` int(11) DEFAULT '1',
  `web_type` tinyint(3) DEFAULT '1' COMMENT '平台类型',
  `issuper` tinyint(4) DEFAULT '0',
  `sort` int(11) DEFAULT '0',
  `readonly` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_auth_group_access
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_auth_group_access`;

CREATE TABLE `onsp_auth_group_access` (
  `uid` mediumint(8) unsigned NOT NULL,
  `group_id` mediumint(8) unsigned NOT NULL,
  UNIQUE KEY `uid_group_id` (`uid`,`group_id`),
  KEY `uid` (`uid`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_auth_rule
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_auth_rule`;

CREATE TABLE `onsp_auth_rule` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(80) NOT NULL DEFAULT '',
  `title` char(20) NOT NULL DEFAULT '',
  `type` tinyint(1) NOT NULL DEFAULT '1',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `condition` char(100) NOT NULL DEFAULT '',
  `sort` int(11) DEFAULT '1',
  `level` tinyint(4) DEFAULT '0' COMMENT '菜单级别,1位菜单,2为操作',
  `city_id` int(11) DEFAULT NULL,
  `web_type` tinyint(3) DEFAULT '1' COMMENT '平台类型',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_city
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_city`;

CREATE TABLE `onsp_city` (
  `cid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `table_suffix` int(11) DEFAULT NULL COMMENT '多城市分表后缀',
  `name` varchar(32) DEFAULT '',
  `code` varchar(11) DEFAULT NULL COMMENT '城市编号',
  `admin_id` int(11) DEFAULT NULL COMMENT '超级管理员id',
  PRIMARY KEY (`cid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_config
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_config`;

CREATE TABLE `onsp_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置ID',
  `name` varchar(30) NOT NULL DEFAULT '' COMMENT '配置名称',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '配置类型1文本2长文本3选择框4开关',
  `title` varchar(50) NOT NULL DEFAULT '' COMMENT '配置说明',
  `group` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '配置分组',
  `extra` varchar(255) NOT NULL DEFAULT '' COMMENT '配置值',
  `remark` varchar(100) NOT NULL DEFAULT '' COMMENT '配置说明',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态',
  `value` text COMMENT '配置值',
  `sort` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_name` (`name`),
  KEY `type` (`type`),
  KEY `group` (`group`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_gcat
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_gcat`;

CREATE TABLE `onsp_gcat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `pid` int(11) NOT NULL,
  `sort` int(11) DEFAULT '0',
  `hide` smallint(6) DEFAULT NULL COMMENT '0',
  `keywords` varchar(255) DEFAULT NULL,
  `descript` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `seller_id` int(11) DEFAULT '0',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `status` tinyint(4) DEFAULT '1',
  `icon` varchar(255) DEFAULT NULL COMMENT '分类图标',
  `model_id` int(11) DEFAULT NULL COMMENT '分类模型ID',
  `is_show` tinyint(3) DEFAULT '1' COMMENT '是否显示:1显示,0隐藏',
  `url` varchar(255) DEFAULT NULL COMMENT '点击后跳转地址',
  `url_type` tinyint(3) DEFAULT '1' COMMENT '分类类型:1分类,2文字广告连接',
  `city_id` int(11) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_goods
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_goods`;

CREATE TABLE `onsp_goods` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `goods_no` varchar(255) DEFAULT NULL,
  `price_1` decimal(10,2) DEFAULT NULL COMMENT '商城价',
  `price_2` decimal(10,2) DEFAULT NULL COMMENT '会员价',
  `price_3` decimal(10,2) DEFAULT NULL COMMENT '批发商价',
  `price` decimal(10,2) DEFAULT NULL COMMENT '市场价',
  `gcat_id` int(11) DEFAULT NULL COMMENT '商品所属分类ids,可能会单独做一个分类,商品管理表',
  `gcat2_id` int(11) DEFAULT NULL,
  `gcat3_id` int(11) DEFAULT NULL,
  `tese` varchar(255) DEFAULT NULL COMMENT '特色描述',
  `point_price` decimal(10,2) DEFAULT NULL COMMENT '积分价格',
  `up_time` int(11) DEFAULT NULL,
  `down_time` int(11) DEFAULT NULL,
  `status` smallint(6) DEFAULT '1' COMMENT '-1:已删除,0禁用,2正常,3待审核',
  `update_time` int(11) DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `nums` int(11) DEFAULT '0' COMMENT '库存',
  `imgs` varchar(255) DEFAULT NULL COMMENT '缩略图字符串picture表id用,分割',
  `pimg` varchar(11) DEFAULT NULL COMMENT '商品主图id',
  `thumbs` varchar(255) DEFAULT NULL,
  `is_del` tinyint(3) DEFAULT '0',
  `content` text,
  `keywords` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL COMMENT '商品简要描述,第二标题',
  `search_words` varchar(255) DEFAULT NULL,
  `weight` smallint(6) DEFAULT NULL,
  `point` decimal(10,2) DEFAULT NULL,
  `unit` varchar(255) DEFAULT '桶' COMMENT '单位',
  `brand_id` int(11) DEFAULT NULL COMMENT '品牌ID',
  `visit` int(9) DEFAULT '100' COMMENT '访问数量',
  `sort` smallint(6) DEFAULT '0',
  `exp` decimal(10,2) DEFAULT '0.00',
  `comments` int(11) DEFAULT NULL COMMENT '评论次数',
  `sale` int(11) DEFAULT NULL COMMENT '销售总数',
  `grade` int(11) DEFAULT NULL COMMENT '评分总数',
  `is_sku` tinyint(3) DEFAULT '0' COMMENT '是否有规格',
  `type` varchar(255) DEFAULT '0' COMMENT '商品类型:0普通商品,1积分商品,2:促销商品',
  `min_buynums` int(11) DEFAULT '1',
  `delete_time` int(11) DEFAULT NULL,
  `from` tinyint(3) DEFAULT '1',
  `store_id` int(11) DEFAULT '1' COMMENT '商家id',
  `city_id` int(11) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_goods_model
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_goods_model`;

CREATE TABLE `onsp_goods_model` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '模型名称',
  `table_name` varchar(255) NOT NULL DEFAULT '' COMMENT '模型表名称',
  `key_list` text COMMENT '模型键列表',
  `val_list` text COMMENT '模型值列表',
  `status` tinyint(3) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='商品扩展模型表';



# Dump of table onsp_goods_model_info
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_goods_model_info`;

CREATE TABLE `onsp_goods_model_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `key_1` varchar(255) DEFAULT NULL COMMENT '品牌',
  `key_2` varchar(255) DEFAULT NULL COMMENT '容量',
  `key_3` varchar(255) DEFAULT NULL COMMENT '包装',
  `key_4` varchar(255) DEFAULT NULL,
  `key_5` varchar(255) DEFAULT NULL,
  `key_6` varchar(255) DEFAULT NULL,
  `key_7` varchar(255) DEFAULT NULL,
  `key_8` varchar(255) DEFAULT NULL,
  `goods_id` int(11) NOT NULL DEFAULT '0',
  `model_id` int(11) DEFAULT '1' COMMENT '模型id',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='食用油模型';



# Dump of table onsp_order
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_order`;

CREATE TABLE `onsp_order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `order_no` varchar(20) NOT NULL COMMENT '订单号',
  `server_no` varchar(255) DEFAULT NULL COMMENT '第三方支付编号',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户ID',
  `pay_type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '用户支付方式1货到付款 2支付宝支付 3微信扫码支付 4支付宝手机支付,5微信支付,6积分兑换',
  `order_status` tinyint(1) DEFAULT '0' COMMENT '订单状态 -1:禁用,0:未确认,1:订单确认,2:订单取消,3:订单无效,4:订单完成,5:已退款',
  `pay_status` tinyint(1) DEFAULT '0' COMMENT '支付状态 0未付款; 1付款中;  2已付款  3已退款',
  `distribution_status` tinyint(1) DEFAULT '0' COMMENT '配送状态 0未发货; 1备货中  2已发货  3已收货',
  `accept_name` varchar(20) NOT NULL COMMENT '收货人姓名',
  `postcode` varchar(6) DEFAULT NULL COMMENT '邮编',
  `country` int(11) DEFAULT NULL COMMENT '国ID',
  `province` int(11) DEFAULT NULL COMMENT '省ID',
  `city` int(11) DEFAULT NULL COMMENT '市ID',
  `area` int(11) DEFAULT NULL COMMENT '区ID',
  `address` varchar(250) DEFAULT NULL COMMENT '收货地址',
  `mobile` varchar(20) DEFAULT NULL COMMENT '手机',
  `order_amount` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '订单总金额',
  `real_amount` decimal(10,2) DEFAULT '0.00' COMMENT '应付商品总金额',
  `freight` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '实付运费',
  `promotions` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '促销优惠金额',
  `coupons` decimal(15,2) DEFAULT NULL COMMENT '优惠券金额',
  `coupons_desc` varchar(255) DEFAULT NULL COMMENT '优惠券描述',
  `promostions_desc` varchar(255) DEFAULT NULL COMMENT '订单折扣描述字符串',
  `pay_time` int(10) unsigned DEFAULT NULL COMMENT '付款时间',
  `send_time` int(10) unsigned DEFAULT NULL COMMENT '发货时间',
  `create_time` int(10) unsigned DEFAULT NULL COMMENT '下单时间',
  `completion_time` int(10) unsigned DEFAULT NULL COMMENT '订单完成时间',
  `accept_time` int(10) unsigned DEFAULT NULL COMMENT '用户收货时间',
  `lastcomplete_time` int(10) unsigned DEFAULT NULL COMMENT '订单最终确认时间',
  `distribution_desc` varchar(255) DEFAULT NULL COMMENT '配送信息:订单号,快递公司名称',
  `zuofei_desc` varchar(255) DEFAULT NULL COMMENT '作废描述',
  `tuikuan_desc` varchar(255) DEFAULT NULL COMMENT '退款描述',
  `invoice` tinyint(1) NOT NULL DEFAULT '0' COMMENT '发票:0不索要1索要',
  `postscript` varchar(255) DEFAULT NULL COMMENT '用户附言',
  `note` text COMMENT '管理员备注',
  `is_del` tinyint(1) DEFAULT '0' COMMENT '是否删除1为删除',
  `invoice_title` varchar(100) DEFAULT NULL COMMENT '发票抬头',
  `exp` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '增加的经验',
  `point` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '增加的积分',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0普通订单,1积分订单',
  `trade_no` varchar(255) DEFAULT NULL COMMENT '支付平台交易号',
  `active_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '促销活动ID',
  `seller_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID',
  `update_time` int(10) unsigned DEFAULT NULL,
  `accept_time_desc` varchar(255) DEFAULT NULL COMMENT '收货时间描述',
  `printmoney` tinyint(3) DEFAULT '1' COMMENT '是否打印金额',
  `pay_point` decimal(10,2) DEFAULT NULL COMMENT '消耗积分',
  `confirm_time` int(11) DEFAULT NULL COMMENT '订单确认时间',
  `yuntype` int(11) DEFAULT '1' COMMENT 'yuntyp配送方式id',
  `user_group` int(11) DEFAULT '0' COMMENT '用户组id',
  `snap_items` text,
  `snap_address` text,
  `snap_img` varchar(255) DEFAULT NULL,
  `snap_name` varchar(255) DEFAULT NULL,
  `total_count` int(11) DEFAULT NULL,
  `status` tinyint(3) DEFAULT NULL,
  `prepay_id` varchar(64) DEFAULT NULL,
  `sid` int(11) DEFAULT NULL COMMENT '商家id',
  `city_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单表';



# Dump of table onsp_order_goods
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_order_goods`;

CREATE TABLE `onsp_order_goods` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(11) unsigned NOT NULL COMMENT '订单ID',
  `goods_id` int(11) unsigned NOT NULL COMMENT '商品ID',
  `img` varchar(255) NOT NULL COMMENT '商品图片',
  `sku_id` int(11) unsigned DEFAULT '0' COMMENT '货品ID',
  `price` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '商品原价',
  `count` int(11) NOT NULL DEFAULT '1' COMMENT '商品数量',
  `goods_weight` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '重量',
  `goods_array` text COMMENT '商品和货品名称name和规格value串json数据格式',
  `is_send` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已发货 0:未发货;1:已发货;2:已经退货',
  `delivery_id` int(11) NOT NULL DEFAULT '0' COMMENT '配送单ID',
  `seller_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID',
  `name` varchar(255) DEFAULT '' COMMENT '商品名称(镜像)',
  `goods_type` tinyint(3) unsigned DEFAULT '0' COMMENT '商品类型:0普通商品,1:积分商品',
  `point` decimal(15,2) unsigned DEFAULT NULL COMMENT 'goods_type=1时,积分兑换所需积分',
  `price_1` decimal(10,2) DEFAULT NULL COMMENT '会员价',
  `price_2` decimal(10,2) DEFAULT NULL COMMENT '批发价',
  `skuno` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单商品';



# Dump of table onsp_payment
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_payment`;

CREATE TABLE `onsp_payment` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL COMMENT '支付名称',
  `config_param` text COMMENT '配置参数,json数据对象',
  `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1:线上、2:线下',
  `class_name` varchar(50) NOT NULL COMMENT '支付类名称',
  `description` text COMMENT '描述',
  `logo` varchar(255) NOT NULL COMMENT '支付方式logo图片路径',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '安装状态 0启用 1禁用',
  `order` smallint(5) NOT NULL DEFAULT '99' COMMENT '排序',
  `note` text COMMENT '支付说明',
  `poundage` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '手续费',
  `poundage_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '手续费方式 1百分比 2固定值',
  `client_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1:PC端 2:移动端 3:通用',
  `is_wx` tinyint(3) DEFAULT '0' COMMENT '是否可在微信中使用',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='支付方式表';



# Dump of table onsp_picture
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_picture`;

CREATE TABLE `onsp_picture` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id自增',
  `path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '图片链接',
  `md5` char(32) NOT NULL DEFAULT '' COMMENT '文件md5',
  `sha1` char(40) NOT NULL DEFAULT '' COMMENT '文件 sha1编码',
  `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `catkey` varchar(255) DEFAULT NULL,
  `from` tinyint(3) DEFAULT '1' COMMENT 'from=1来源本地,字段加上前缀',
  `city_id` int(11) DEFAULT '1',
  `web_type` tinyint(3) DEFAULT '1' COMMENT '所属平台类型:1:商户:2;分站;3:总站',
  `store_id` int(11) DEFAULT NULL COMMENT '商户id',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_seller
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_seller`;

CREATE TABLE `onsp_seller` (
  `sid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  `mobile` varchar(32) DEFAULT NULL,
  `star` tinyint(4) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `createtime` int(11) DEFAULT NULL,
  `desc` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`sid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Dump of table onsp_site
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_site`;

CREATE TABLE `onsp_site` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='分站信息';



# Dump of table onsp_store
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_store`;

CREATE TABLE `onsp_store` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `store_name` varchar(50) NOT NULL COMMENT '商家名称',
  `address` varchar(200) NOT NULL COMMENT '商家地址',
  `announcement` varchar(100) NOT NULL COMMENT '公告',
  `cat_id` int(11) NOT NULL DEFAULT '0' COMMENT '主行业分类id',
  `cat2_id` int(11) NOT NULL DEFAULT '0' COMMENT '商家子分类id',
  `area_id` int(11) NOT NULL COMMENT '区域id',
  `area2_id` int(11) DEFAULT NULL COMMENT '商圈id',
  `yy_time` varchar(50) NOT NULL COMMENT '营业时间',
  `start_time` varchar(32) NOT NULL DEFAULT '' COMMENT '营业开始时间',
  `end_time` varchar(20) NOT NULL DEFAULT '' COMMENT '营业结束时间',
  `keyword` varchar(50) NOT NULL COMMENT '关键字',
  `skzf` int(11) NOT NULL COMMENT '1.是 2否(刷卡支付)',
  `wifi` int(11) NOT NULL COMMENT '1.是 2否',
  `mftc` int(11) NOT NULL COMMENT '1.是 2否(免费停车)',
  `jzxy` int(11) NOT NULL COMMENT '1.是 2否(禁止吸烟)',
  `tgbj` int(11) NOT NULL COMMENT '1.是 2否(提供包间)',
  `sfxx` int(11) NOT NULL COMMENT '1.是 2否(沙发休闲)',
  `tel` varchar(20) NOT NULL COMMENT '手机号',
  `logo` varchar(100) NOT NULL,
  `weixin_logo` varchar(100) NOT NULL,
  `ad` text NOT NULL COMMENT '轮播图',
  `state` int(11) NOT NULL COMMENT '1.待审核2通过3拒绝',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
  `password` varchar(100) NOT NULL COMMENT '核销密码',
  `details` text NOT NULL COMMENT '商家简介',
  `uniacid` int(11) NOT NULL,
  `coordinates` varchar(50) NOT NULL,
  `views` int(11) NOT NULL,
  `score` decimal(10,1) NOT NULL DEFAULT '0.0',
  `type` int(11) NOT NULL,
  `sh_time` int(11) NOT NULL,
  `time_over` int(11) NOT NULL,
  `img` text NOT NULL,
  `vr_link` text NOT NULL,
  `num` int(11) NOT NULL,
  `wallet` decimal(10,2) NOT NULL DEFAULT '0.00',
  `user_name` varchar(30) NOT NULL,
  `pwd` varchar(50) NOT NULL,
  `dq_time` int(11) NOT NULL,
  `cityname` varchar(50) NOT NULL,
  `fx_num` int(11) NOT NULL,
  `ewm_logo` varchar(100) NOT NULL,
  `is_top` int(4) NOT NULL DEFAULT '2',
  `yyzz_img` varchar(100) NOT NULL,
  `sfz_img` varchar(100) NOT NULL,
  `create_time` int(11) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `status` tinyint(3) DEFAULT '1',
  `star` int(11) DEFAULT '1' COMMENT '星级',
  `tese` varchar(255) DEFAULT NULL COMMENT '店铺特色',
  `storeimgs` varchar(255) DEFAULT NULL COMMENT '图片的id字符串用,连接',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table onsp_store_admin
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_store_admin`;

CREATE TABLE `onsp_store_admin` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uname` varchar(32) NOT NULL DEFAULT '',
  `name` varchar(32) DEFAULT NULL,
  `mobile` varchar(16) DEFAULT NULL,
  `group` int(11) DEFAULT '1',
  `pwd` varchar(64) NOT NULL DEFAULT '',
  `store` int(11) DEFAULT NULL,
  `status` tinyint(11) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `city_id` int(11) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table onsp_storearea
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_storearea`;

CREATE TABLE `onsp_storearea` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(11) DEFAULT NULL,
  `label` varchar(64) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `status` tinyint(4) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT '0',
  `level` tinyint(4) DEFAULT '1' COMMENT '1:区域,2:商圈',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Dump of table onsp_storecat
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_storecat`;

CREATE TABLE `onsp_storecat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label` varchar(255) DEFAULT NULL,
  `pid` int(11) DEFAULT NULL,
  `status` tinyint(3) DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `city_id` int(11) DEFAULT '1',
  `sort` int(11) DEFAULT '0',
  `level` tinyint(4) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='店铺分类';



# Dump of table onsp_tags
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_tags`;

CREATE TABLE `onsp_tags` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '商品标签名称',
  `status` tinyint(3) DEFAULT '1' COMMENT '状态:0不可用,1可用,-1删除',
  `city_id` int(11) DEFAULT '1',
  `sort` int(11) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='商品标签';



# Dump of table onsp_tags_goods
# ------------------------------------------------------------

DROP TABLE IF EXISTS `onsp_tags_goods`;

CREATE TABLE `onsp_tags_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tid` int(11) NOT NULL DEFAULT '0' COMMENT '标签id',
  `gid` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  `city_id` int(11) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='商品标签分组';




/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值