質問編集履歴
2
文法の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -57,6 +57,8 @@
|
|
57
57
|
|
58
58
|
|
59
59
|
追記:
|
60
|
+
|
61
|
+
```ここに言語を入力
|
60
62
|
|
61
63
|
テーブル定義
|
62
64
|
|
@@ -137,3 +139,5 @@
|
|
137
139
|
PRIMARY KEY (`id`) USING BTREE
|
138
140
|
|
139
141
|
)
|
142
|
+
|
143
|
+
```
|
1
テーブル定義の提示
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,13 +14,15 @@
|
|
14
14
|
|
15
15
|
productテーブル
|
16
16
|
|
17
|
-
|
17
|
+
下記に追記で編集しました
|
18
|
+
|
19
|
+
|
18
20
|
|
19
21
|
商品券には以下のカラムがあります
|
20
22
|
|
21
23
|
productmoneyテーブル
|
22
24
|
|
23
|
-
|
25
|
+
下記に追記で編集しました
|
24
26
|
|
25
27
|
|
26
28
|
|
@@ -28,7 +30,7 @@
|
|
28
30
|
|
29
31
|
cartテーブル
|
30
32
|
|
31
|
-
|
33
|
+
下記に追記で編集しました
|
32
34
|
|
33
35
|
となっています
|
34
36
|
|
@@ -51,3 +53,87 @@
|
|
51
53
|
|
52
54
|
|
53
55
|
以上、よろしくおねがいします
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
追記:
|
60
|
+
|
61
|
+
テーブル定義
|
62
|
+
|
63
|
+
カート
|
64
|
+
|
65
|
+
CREATE TABLE `carts` (
|
66
|
+
|
67
|
+
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
68
|
+
|
69
|
+
`user_id` INT(11) NOT NULL,
|
70
|
+
|
71
|
+
`product_id` INT(11) NOT NULL,
|
72
|
+
|
73
|
+
`quantity` INT(11) NOT NULL,
|
74
|
+
|
75
|
+
`created_at` TIMESTAMP NULL DEFAULT NULL,
|
76
|
+
|
77
|
+
`updated_at` TIMESTAMP NULL DEFAULT NULL,
|
78
|
+
|
79
|
+
PRIMARY KEY (`id`) USING BTREE
|
80
|
+
|
81
|
+
)
|
82
|
+
|
83
|
+
商品
|
84
|
+
|
85
|
+
CREATE TABLE `products` (
|
86
|
+
|
87
|
+
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
88
|
+
|
89
|
+
`customer_id` BIGINT(20) UNSIGNED NOT NULL,
|
90
|
+
|
91
|
+
`title` VARCHAR(50) NOT NULL,
|
92
|
+
|
93
|
+
`detail` TEXT(65535) NOT NULL COLLATE 'utf8mb4_general_ci',
|
94
|
+
|
95
|
+
`about_url` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
|
96
|
+
|
97
|
+
`price` INT(10) UNSIGNED NOT NULL,
|
98
|
+
|
99
|
+
`total_stock` INT(10) UNSIGNED NULL DEFAULT NULL,
|
100
|
+
|
101
|
+
`start_date` DATETIME NULL DEFAULT NULL,
|
102
|
+
|
103
|
+
`end_date` DATETIME NULL DEFAULT NULL,
|
104
|
+
|
105
|
+
`img` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
|
106
|
+
|
107
|
+
`undisclosed_at` DATETIME NULL DEFAULT NULL,
|
108
|
+
|
109
|
+
`deleted_at` TIMESTAMP NULL DEFAULT NULL,
|
110
|
+
|
111
|
+
`created_at` TIMESTAMP NULL DEFAULT NULL,
|
112
|
+
|
113
|
+
`updated_at` TIMESTAMP NULL DEFAULT NULL,
|
114
|
+
|
115
|
+
PRIMARY KEY (`id`) USING BTREE
|
116
|
+
|
117
|
+
)
|
118
|
+
|
119
|
+
商品券
|
120
|
+
|
121
|
+
CREATE TABLE `product_money` (
|
122
|
+
|
123
|
+
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
124
|
+
|
125
|
+
`title` VARCHAR(50) NOT NULL,
|
126
|
+
|
127
|
+
`price` INT(10) UNSIGNED NOT NULL,
|
128
|
+
|
129
|
+
`total_stock` INT(10) UNSIGNED NULL DEFAULT NULL,
|
130
|
+
|
131
|
+
`deleted_at` TIMESTAMP NULL DEFAULT NULL,
|
132
|
+
|
133
|
+
`created_at` TIMESTAMP NULL DEFAULT NULL,
|
134
|
+
|
135
|
+
`updated_at` TIMESTAMP NULL DEFAULT NULL,
|
136
|
+
|
137
|
+
PRIMARY KEY (`id`) USING BTREE
|
138
|
+
|
139
|
+
)
|