refactor: 重构项目结构,迁移后端至 mengyastore-backend-go,新增 Java 后端、前端功能更新及部署文档
This commit is contained in:
28
mengyastore-backend-go/init.sql
Normal file
28
mengyastore-backend-go/init.sql
Normal file
@@ -0,0 +1,28 @@
|
||||
-- ============================================================
|
||||
-- 萌芽小店 · 数据库初始化脚本
|
||||
--
|
||||
-- 用途:创建数据库与用户,表结构由后端 GORM AutoMigrate 自动创建。
|
||||
-- 使用 root 或有 GRANT 权限的账号执行本脚本:
|
||||
-- mysql -u root -p < init.sql
|
||||
-- ============================================================
|
||||
|
||||
-- 创建数据库(utf8mb4 支持 emoji)
|
||||
CREATE DATABASE IF NOT EXISTS `mengyastore`
|
||||
CHARACTER SET utf8mb4
|
||||
COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- 创建专用用户并授权(按需修改密码)
|
||||
CREATE USER IF NOT EXISTS 'mengyastore'@'%' IDENTIFIED BY 'mengyastore';
|
||||
GRANT ALL PRIVILEGES ON `mengyastore`.* TO 'mengyastore'@'%';
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
-- ============================================================
|
||||
-- 说明:
|
||||
-- 后端首次启动时会自动通过 GORM AutoMigrate 创建以下表:
|
||||
-- products - 商品信息
|
||||
-- product_codes - 商品发货码
|
||||
-- orders - 订单记录
|
||||
-- site_settings - 站点 KV 配置(adminToken、SMTP 等)
|
||||
-- wishlists - 用户收藏夹
|
||||
-- chat_messages - 聊天消息
|
||||
-- ============================================================
|
||||
Reference in New Issue
Block a user