-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservice.sql
More file actions
61 lines (52 loc) · 2.42 KB
/
service.sql
File metadata and controls
61 lines (52 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50709
Source Host : localhost:3306
Source Schema : service
Target Server Type : MySQL
Target Server Version : 50709
File Encoding : 65001
Date: 15/09/2024 22:16:24
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for evaluations
-- ----------------------------
DROP TABLE IF EXISTS `evaluations`;
CREATE TABLE `evaluations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`serviceProviderId` int(11) NULL DEFAULT NULL,
`userId` int(11) NULL DEFAULT NULL,
`rating` int(11) NULL DEFAULT NULL,
`comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`providerName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `serviceProviderId`(`serviceProviderId`) USING BTREE,
CONSTRAINT `evaluations_ibfk_1` FOREIGN KEY (`serviceProviderId`) REFERENCES `serviceproviders` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of evaluations
-- ----------------------------
INSERT INTO `evaluations` VALUES (1, 2, 1, 90, '评价1', '店铺1');
-- ----------------------------
-- Table structure for serviceproviders
-- ----------------------------
DROP TABLE IF EXISTS `serviceproviders`;
CREATE TABLE `serviceproviders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`trusted` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`totalRating` int(11) NULL DEFAULT 0,
`totalRatingsCount` int(11) NULL DEFAULT 0,
`serviceCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of serviceproviders
-- ----------------------------
INSERT INTO `serviceproviders` VALUES (2, '0xe4c16fb0d7db85dc3e31899c5e6e06b4eee7c8d2', '店铺1', 'true', 0, 0, '服务详情1');
SET FOREIGN_KEY_CHECKS = 1;