当前位置: 首页 > news >正文

企业微信点餐数据库

# 微信点餐数据库


```sql
-- 类目
create table `product_category` (
    `category_id` int not null auto_increment,
    `category_name` varchar(64) not null comment '类目名字',
    `category_type` int not null comment '类目编号',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`category_id`)
);

-- 商品
create table `product_info` (
    `product_id` varchar(32) not null,
    `product_name` varchar(64) not null comment '商品名称',
    `product_price` decimal(8,2) not null comment '单价',
    `product_stock` int not null comment '库存',
    `product_description` varchar(64) comment '描述',
    `product_icon` varchar(512) comment '小图',
    `product_status` tinyint(3) DEFAULT '0' COMMENT '商品状态,0正常1下架',
    `category_type` int not null comment '类目编号',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`product_id`)
);

-- 订单
create table `order_master` (
    `order_id` varchar(32) not null,
    `buyer_name` varchar(32) not null comment '买家名字',
    `buyer_phone` varchar(32) not null comment '买家电话',
    `buyer_address` varchar(128) not null comment '买家地址',
    `buyer_openid` varchar(64) not null comment '买家微信openid',
    `order_amount` decimal(8,2) not null comment '订单总金额',
    `order_status` tinyint(3) not null default '0' comment '订单状态, 默认为新下单',
    `pay_status` tinyint(3) not null default '0' comment '支付状态, 默认未支付',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`order_id`),
    key `idx_buyer_openid` (`buyer_openid`)
);

-- 订单商品
create table `order_detail` (
    `detail_id` varchar(32) not null,
    `order_id` varchar(32) not null,
    `product_id` varchar(32) not null,
    `product_name` varchar(64) not null comment '商品名称',
    `product_price` decimal(8,2) not null comment '当前价格,单位分',
    `product_quantity` int not null comment '数量',
    `product_icon` varchar(512) comment '小图',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`detail_id`),
    key `idx_order_id` (`order_id`)
);

-- 卖家(登录后台使用, 卖家登录之后可能直接采用微信扫码登录,不使用账号密码)
create table `seller_info` (
    `id` varchar(32) not null,
    `username` varchar(32) not null,
    `password` varchar(32) not null,
    `openid` varchar(64) not null comment '微信openid',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`id`)
) comment '卖家信息表';

```

 

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 献给所有正在求职的大学生
  • vue父组件向子组件传值和得到子组件的属于和方法
  • 2004年7月22日
  • vue子组件直接调用父组件的属性和方法
  • vue子组件向父组件传值的方法emit
  • gf走了之后......
  • vue非父组件的通讯
  • 写在午夜之时 ——《doom启示录》读后感(一)
  • vue3.0跨域请求文件配置
  • 关注研究生就业状态 (转)
  • 解决vue部署到服务器请求接口404问题
  • 实践人生,一个普通IT人的十年回顾 (一)
  • flutter 错误The method '/' was called on null.
  • Flutter 调试时卡在Installing build\app\outputs\apk\app.apk
  • 艰难人生 ,一个普通IT人的十年回顾(三)
  • 【node学习】协程
  • Vue 重置组件到初始状态
  • Vue官网教程学习过程中值得记录的一些事情
  • 从零开始的webpack生活-0x009:FilesLoader装载文件
  • 对超线程几个不同角度的解释
  • 机器人定位导航技术 激光SLAM与视觉SLAM谁更胜一筹?
  • 极限编程 (Extreme Programming) - 发布计划 (Release Planning)
  • 聊聊springcloud的EurekaClientAutoConfiguration
  • 微信公众号开发小记——5.python微信红包
  • 微信小程序开发问题汇总
  • 系统认识JavaScript正则表达式
  • 学习笔记:对象,原型和继承(1)
  • 一、python与pycharm的安装
  • 一些基于React、Vue、Node.js、MongoDB技术栈的实践项目
  • 用Node EJS写一个爬虫脚本每天定时给心爱的她发一封暖心邮件
  • 智能合约Solidity教程-事件和日志(一)
  • raise 与 raise ... from 的区别
  • 基于django的视频点播网站开发-step3-注册登录功能 ...
  • ​【已解决】npm install​卡主不动的情况
  • # include “ “ 和 # include < >两者的区别
  • #if 1...#endif
  • #QT(QCharts绘制曲线)
  • #WEB前端(HTML属性)
  • (2021|NIPS,扩散,无条件分数估计,条件分数估计)无分类器引导扩散
  • (4)通过调用hadoop的java api实现本地文件上传到hadoop文件系统上
  • (6)添加vue-cookie
  • (附源码)ssm旅游企业财务管理系统 毕业设计 102100
  • (力扣记录)235. 二叉搜索树的最近公共祖先
  • (论文阅读22/100)Learning a Deep Compact Image Representation for Visual Tracking
  • (十二)Flink Table API
  • (算法)Game
  • (转)Google的Objective-C编码规范
  • (转)Sublime Text3配置Lua运行环境
  • **PHP二维数组遍历时同时赋值
  • .equals()到底是什么意思?
  • .NET CF命令行调试器MDbg入门(二) 设备模拟器
  • .NET Core中的时区转换问题
  • .net SqlSugarHelper
  • .net 打包工具_pyinstaller打包的exe太大?你需要站在巨人的肩膀上-VC++才是王道
  • .NET/C# 使用 SpanT 为字符串处理提升性能