zoukankan      html  css  js  c++  java
  • PHP实现拼车平台数据表

    #=====================拼车平台======================
    #创建数据库
    create database car_platform;
    
    #用户表
    DROP TABLE IF EXISTS `car_users`;
    CREATE TABLE `car_users` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(100) NOT NULL DEFAULT '' COMMENT '昵称',
      `password` varchar(60) NOT NULL DEFAULT '' COMMENT '密码',
      `gender` tinyint(4) NOT NULL DEFAULT '1' COMMENT '性别:1:男 2:女',
      `headImg` varchar(255) NOT NULL DEFAULT '' COMMENT '头像',
      `email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱',
      `phonenum` int(11) unsigned  NOT NULL DEFAULT '0' COMMENT '手机号',
      `opendid` char(50) NOT NULL DEFAULT '' COMMENT '微信号',
      `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1乘客  2司机 ',
       `start_address` varchar(100) NOT NULL DEFAULT '' COMMENT '常用起点',
       `end_address` varchar(100) NOT NULL DEFAULT '' COMMENT '常用终点',
       `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1:正常 0:已删除',
      `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
      `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`),
      UNIQUE KEY `car_user_name_password` (`name`,`password`)USING BTREE
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
    
    
    
    #汽车表
    CREATE TABLE `car_cars` (
       `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
       `name` varchar(100) NOT NULL DEFAULT '' COMMENT '品牌名称',
       `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '司机id',
       `car_img` varchar(255) NOT NULL DEFAULT '' COMMENT '汽车图片',
       `steatnum` int(11) unsigned  NOT NULL DEFAULT '0' COMMENT '座位数',
       `color` char(20) NOT NULL DEFAULT '' COMMENT '颜色',
       `buy_year` int(11) NOT NULL DEFAULT '0' COMMENT '生产年份',
       `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1:正常 0:已删除',
      `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
      `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='汽车表';
    
    
    #订单表
    CREATE TABLE `car_orders` (
       `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
       `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
       `content` varchar(100) NOT NULL DEFAULT '' COMMENT '订单内容',
       `price` int(11) NOT NULL DEFAULT '0' COMMENT '价格',
       `driver_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '司机id',
       `passenger_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '乘客id',
       `start_time` int(11) DEFAULT NULL COMMENT '开始时间',
       `end_time` int(11) DEFAULT NULL COMMENT '结束时间',
       `duration` char(50) NOT NULL DEFAULT '' COMMENT '时长',
       `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1:未结束 0:已结束',
       `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
       `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
       PRIMARY KEY (`id`),
       UNIQUE KEY `order_id_unique` (`order_id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='订单表';
    
    
    #配置表
    CREATE TABLE `car_configs` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(100) NOT NULL DEFAULT '' COMMENT '网站名称',
      `title` varchar(250) NOT NULL DEFAULT '0' COMMENT '标题',
      `describe` varchar(250)  NOT NULL DEFAULT '' COMMENT '描述',
      `keyword` varchar(250)  NOT NULL DEFAULT '' COMMENT '关键字',
      `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1:开启 0:关闭',
      `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
      `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='配置表';
    
    
    #消息表
    CREATE TABLE `car_messages` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `start_point` varchar(50) DEFAULT NULL COMMENT '起始站',
      `end_point` varchar(50) DEFAULT NULL COMMENT '终点站',
      `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发布者id',
      `car_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '汽车id',
      `start_time` int(11) DEFAULT NULL COMMENT '出发时间',
      `route` varchar(100) NOT NULL DEFAULT '' COMMENT '路线',
      `pass_station` varchar(100) NOT NULL DEFAULT '' COMMENT '经停站',
      `surplus_seat` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '剩余座位数',
      `remark` varchar(250)  NOT NULL DEFAULT '' COMMENT '备注',
      `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1:正在发布 0:已结束',
      `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
      `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`),
      KEY `car_userid` (`user_id`),
      KEY `car_start_point` (`start_point`),
      KEY `car_end_point` (`end_point`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='消息表';
    
    #意见反馈表
    CREATE TABLE `car_opinions` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发布者id',
      `name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
      `content` varchar(250) NOT NULL DEFAULT '0' COMMENT '内容',
      `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
      `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='意见反馈表';
    
    #黑名单表
    CREATE TABLE `car_blacklists` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `passenger_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '乘客id',
      `driver_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '司机id',
       `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1:生效 0:失效',
      `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
      `updated_at` int(11) DEFAULT NULL COMMENT '更新时间',
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='黑名单表';

    赞赏码

    非学,无以致疑;非问,无以广识

  • 相关阅读:
    XML(学习笔记)
    css样式学习笔记
    Request(对象)
    sql一些错误修改的总结
    转载(如何学习C#)
    sql server(学习笔记2 W3Cschool)
    sql sqrver(学习笔记1 W3Cschool)
    关于 flutter开发碰到的各种问题,有的已经解决有的一直没解决或者用其他方法替代
    关于 Flutter IOS build It appears that your application still contains the default signing identifier.
    关于 flutter本地化问题 The getter 'pasteButtonLabel' was called on null
  • 原文地址:https://www.cnblogs.com/lxwphp/p/15452616.html
Copyright © 2011-2022 走看看