Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
CREATE TABLE `user` (
`userid` int(15) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
`account` varchar(30) NOT NULL COMMENT '账号名',
`usercode` varchar(30) NOT NULL COMMENT '密码',
`phone` int(30) NOT NULL COMMENT '电话',
`registertime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间',
`logintime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后一次登录时间',
PRIMARY KEY (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `goods` (
`goodsid` int(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品id',
`goodscode` varchar(50) COMMENT '商品编码',
`goodsnames` varchar(100) NOT NULL COMMENT '商品名称',
`goodsprice` decimal(30, 3) NOT NULL COMMENT '商品单价',
PRIMARY KEY (`goodsid`)
) ENGINE = InnoDB CHARSET = utf8;
CREATE TABLE `order` (
`ordercode` varchar(50) NOT NULL COMMENT '订单编号',
`userid` int(15) NOT NULL COMMENT '用户id',
`goodsid` int(20) UNSIGNED NOT NULL COMMENT '商品id',
`goodsname` varchar(100) NOT NULL COMMENT '商品名称',
`goodsprice` decimal(30, 3) NOT NULL COMMENT '商品单价',
`goodsquantity` int(10) NOT NULL COMMENT '商品数量',
`transport` tinyint(1) NOT NULL DEFAULT '1' COMMENT '运输方式 1冷链物流 0常温物流',
PRIMARY KEY (`ordercode`,`goodsid`)
) ENGINE = InnoDB CHARSET = utf8;