mirror of
https://gitee.com/coder-xiaomo/flashsale
synced 2025-09-10 14:01:39 +08:00
商品模型1
This commit is contained in:
@@ -11,12 +11,47 @@
|
||||
Target Server Version : 50726
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 02/03/2022 11:35:11
|
||||
Date: 03/03/2022 12:57:18
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for item_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `item_info`;
|
||||
CREATE TABLE `item_info` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`price` decimal(10, 0) NOT NULL DEFAULT 0,
|
||||
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`sales` int(11) NOT NULL,
|
||||
`img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of item_info
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for item_stock
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `item_stock`;
|
||||
CREATE TABLE `item_stock` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`stock` int(11) NOT NULL,
|
||||
`item_id` int(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `item_id`(`item_id`) USING BTREE,
|
||||
CONSTRAINT `item_stock_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `item_info` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of item_stock
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user_info
|
||||
-- ----------------------------
|
||||
|
Reference in New Issue
Block a user