-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresaurants.sql
20 lines (20 loc) · 1.24 KB
/
resaurants.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CREATE TABLE `restaurants` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner_id` int(11) NULL,
`name` varchar(50) NOT NULL,
`addr` varchar(255) NOT NULL,
`city_id` int(11) DEFAULT NULL,
`lat` double DEFAULT NULL,
`lng` double DEFAULT NULL,
`cover` json NULL,
`logo` json NULL,
`shipping_fee_per_km` double DEFAULT '0',
`liked_count` int(6) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `owner_id` (`owner_id`) USING BTREE,
KEY `city_id` (`city_id`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;