• 对应数据库


    /*
    Navicat MySQL Data Transfer

    Source Server : localhost_3306
    Source Server Version : 50521
    Source Host : localhost:3306
    Source Database : mybatis

    Target Server Type : MYSQL
    Target Server Version : 50521
    File Encoding : 65001

    Date: 2019-03-22 23:03:53
    */

    SET FOREIGN_KEY_CHECKS=0;

    -- ----------------------------
    -- Table structure for `orders`
    -- ----------------------------
    DROP TABLE IF EXISTS `orders`;
    CREATE TABLE `orders` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `user_id` int(11) NOT NULL COMMENT '下单用户id',
    `number` varchar(32) NOT NULL COMMENT '订单号',
    `createtime` datetime NOT NULL COMMENT '创建订单时间',
    `note` varchar(100) DEFAULT NULL COMMENT '备注',
    PRIMARY KEY (`id`),
    KEY `FK_orders_1` (`user_id`),
    CONSTRAINT `FK_orders_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

    -- ----------------------------
    -- Records of orders
    -- ----------------------------
    INSERT INTO `orders` VALUES ('3', '1', '1000010', '2019-02-04 13:22:35', null);
    INSERT INTO `orders` VALUES ('4', '1', '1000011', '2019-02-03 13:22:41', null);
    INSERT INTO `orders` VALUES ('5', '10', '1000012', '2019-02-12 16:13:23', null);

    -- ----------------------------
    -- Table structure for `user`
    -- ----------------------------
    DROP TABLE IF EXISTS `user`;
    CREATE TABLE `user` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `username` varchar(32) NOT NULL COMMENT '用户名称',
    `birthday` date DEFAULT NULL COMMENT '生日',
    `sex` char(1) DEFAULT NULL COMMENT '性别',
    `address` varchar(256) DEFAULT NULL COMMENT '地址',
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;

    -- ----------------------------
    -- Records of user
    -- ----------------------------
    INSERT INTO `user` VALUES ('1', '强强', null, '2', null);
    INSERT INTO `user` VALUES ('10', '张三', '2018-07-10', '1', '商丘市');
    INSERT INTO `user` VALUES ('16', '张小明', null, '1', '河南郑州');
    INSERT INTO `user` VALUES ('22', '陈小明', null, '1', '河南郑州');
    INSERT INTO `user` VALUES ('24', '张三丰', null, '1', '河南郑州');
    INSERT INTO `user` VALUES ('25', '陈小明', null, '1', '河南郑州');
    INSERT INTO `user` VALUES ('26', '强强', null, null, null);

  • 相关阅读:
    特征方程
    鸽巢原理
    Python列表与字典
    布尔型
    python字符串
    Python小笔记
    IntelliJ 中Maven pom.xml依赖不生效解决
    IDEA创建servlet,篇末有找不到servlet报404的原因
    jQuery的ajax之验证用户名是否被注册
    jquery之Validata表单验证
  • 原文地址:https://www.cnblogs.com/lijun6/p/10583408.html
Copyright © 2020-2023  润新知