diff --git a/1723175319_create_table_user_address.up.sql b/1723175319_create_table_user_address.up.sql new file mode 100644 index 0000000..3488da5 --- /dev/null +++ b/1723175319_create_table_user_address.up.sql @@ -0,0 +1,20 @@ +CREATE TABLE `ufutx_user_address` +( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL COMMENT '用户id', + `name` varchar(32) NOT NULL COMMENT '收件人姓名', + `mobile` char(11) NOT NULL COMMENT '收件人手机号', + `area_code` varchar(12) DEFAULT NULL COMMENT '国家手机编号', + `province` varchar(32) NOT NULL COMMENT '省份', + `province_pid` int(10) DEFAULT NULL COMMENT '省份编号', + `city` varchar(32) NOT NULL COMMENT '市', + `city_pid` int(10) DEFAULT NULL COMMENT '市编号', + `county` varchar(64) NOT NULL COMMENT '区县', + `county_pid` int(10) DEFAULT NULL COMMENT '区县编号', + `detail_address` varchar(255) NOT NULL COMMENT '详细地址', + `is_default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '默认 0:否 1:是', + `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', + `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`), + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户收货地址表'; \ No newline at end of file