From 5bd5938e5ccef3a02e89e378b9ef500cc23de887 Mon Sep 17 00:00:00 2001 From: lq Date: Mon, 19 May 2025 16:54:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductClassificationController.php | 18 + .../Api/CodeGeneration/ProductController.php | 18 + .../CodeGeneration/ProductImageController.php | 18 + .../CodeGeneration/ProductLabelController.php | 18 + .../StoreClassificationController.php | 18 + .../Api/CodeGeneration/StoreController.php | 18 + app/Models/ProductClassificationModel.php | 17 + app/Models/ProductImageModel.php | 17 + app/Models/ProductLabelModel.php | 17 + app/Models/ProductModel.php | 23 + app/Models/StoreClassificationModel.php | 17 + app/Models/StoreModel.php | 17 + .../ProductClassificationService.php | 87 ++ .../CodeGeneration/ProductImageService.php | 87 ++ .../CodeGeneration/ProductLabelService.php | 87 ++ app/Service/CodeGeneration/ProductService.php | 163 ++++ .../StoreClassificationService.php | 100 +++ app/Service/CodeGeneration/StoreService.php | 90 ++ app/Service/common/UtilsService.php | 16 + app/template/view/api/index.ts | 7 + resources/views/layouts/app.blade.php | 91 ++ resources/views/route.blade.php | 799 ++++++++++++++++++ routes/api.php | 11 + routes/web.php | 8 + sql/nl_mall-dev.sql | 543 ++++++++++++ sql/nl_mall.sql | 333 ++++++++ 26 files changed, 2638 insertions(+) create mode 100644 app/Http/Controllers/Api/CodeGeneration/ProductClassificationController.php create mode 100644 app/Http/Controllers/Api/CodeGeneration/ProductController.php create mode 100644 app/Http/Controllers/Api/CodeGeneration/ProductImageController.php create mode 100644 app/Http/Controllers/Api/CodeGeneration/ProductLabelController.php create mode 100644 app/Http/Controllers/Api/CodeGeneration/StoreClassificationController.php create mode 100644 app/Http/Controllers/Api/CodeGeneration/StoreController.php create mode 100644 app/Models/ProductClassificationModel.php create mode 100644 app/Models/ProductImageModel.php create mode 100644 app/Models/ProductLabelModel.php create mode 100644 app/Models/ProductModel.php create mode 100644 app/Models/StoreClassificationModel.php create mode 100644 app/Models/StoreModel.php create mode 100644 app/Service/CodeGeneration/ProductClassificationService.php create mode 100644 app/Service/CodeGeneration/ProductImageService.php create mode 100644 app/Service/CodeGeneration/ProductLabelService.php create mode 100644 app/Service/CodeGeneration/ProductService.php create mode 100644 app/Service/CodeGeneration/StoreClassificationService.php create mode 100644 app/Service/CodeGeneration/StoreService.php create mode 100644 resources/views/layouts/app.blade.php create mode 100755 resources/views/route.blade.php create mode 100644 sql/nl_mall-dev.sql create mode 100644 sql/nl_mall.sql diff --git a/app/Http/Controllers/Api/CodeGeneration/ProductClassificationController.php b/app/Http/Controllers/Api/CodeGeneration/ProductClassificationController.php new file mode 100644 index 00000000..9a42c620 --- /dev/null +++ b/app/Http/Controllers/Api/CodeGeneration/ProductClassificationController.php @@ -0,0 +1,18 @@ +insertField = ["name","cover","pid"]; + $this->updateField = ["id","name","cover","pid"]; + $this->service = ProductClassificationService::getInstance(); + } +} diff --git a/app/Http/Controllers/Api/CodeGeneration/ProductController.php b/app/Http/Controllers/Api/CodeGeneration/ProductController.php new file mode 100644 index 00000000..8622df35 --- /dev/null +++ b/app/Http/Controllers/Api/CodeGeneration/ProductController.php @@ -0,0 +1,18 @@ +insertField = ["title","introduction","cover", "images","description","price","classification_id"]; + $this->updateField = ["id","title","introduction","cover", "images","description","price","classification_id"]; + $this->service = ProductService::getInstance(); + } +} diff --git a/app/Http/Controllers/Api/CodeGeneration/ProductImageController.php b/app/Http/Controllers/Api/CodeGeneration/ProductImageController.php new file mode 100644 index 00000000..4798c3a3 --- /dev/null +++ b/app/Http/Controllers/Api/CodeGeneration/ProductImageController.php @@ -0,0 +1,18 @@ +insertField = ["url","product_id"]; + $this->updateField = ["id","url","product_id"]; + $this->service = ProductImageService::getInstance(); + } +} diff --git a/app/Http/Controllers/Api/CodeGeneration/ProductLabelController.php b/app/Http/Controllers/Api/CodeGeneration/ProductLabelController.php new file mode 100644 index 00000000..f7790067 --- /dev/null +++ b/app/Http/Controllers/Api/CodeGeneration/ProductLabelController.php @@ -0,0 +1,18 @@ +insertField = ["name"]; + $this->updateField = ["id","name"]; + $this->service = ProductLabelService::getInstance(); + } +} diff --git a/app/Http/Controllers/Api/CodeGeneration/StoreClassificationController.php b/app/Http/Controllers/Api/CodeGeneration/StoreClassificationController.php new file mode 100644 index 00000000..fed48e55 --- /dev/null +++ b/app/Http/Controllers/Api/CodeGeneration/StoreClassificationController.php @@ -0,0 +1,18 @@ +insertField = ["name","pid"]; + $this->updateField = ["id","name","pid"]; + $this->service = StoreClassificationService::getInstance(); + } +} diff --git a/app/Http/Controllers/Api/CodeGeneration/StoreController.php b/app/Http/Controllers/Api/CodeGeneration/StoreController.php new file mode 100644 index 00000000..ded536fd --- /dev/null +++ b/app/Http/Controllers/Api/CodeGeneration/StoreController.php @@ -0,0 +1,18 @@ +insertField = ["name","level","avatar","introduction","description","phone","person", "classification_id","id_card","is_featured","business_license","id_card_portrait_side","id_card_national_emblem_side","chain","business_suspended"]; + $this->updateField = ["id","name","level","avatar","introduction","description","phone","person", "classification_id","is_featured","business_license","id_card_portrait_side","id_card_national_emblem_side","chain","business_suspended"]; + $this->service = StoreService::getInstance(); + } +} diff --git a/app/Models/ProductClassificationModel.php b/app/Models/ProductClassificationModel.php new file mode 100644 index 00000000..55294bd6 --- /dev/null +++ b/app/Models/ProductClassificationModel.php @@ -0,0 +1,17 @@ + + */ + protected $guarded = []; +} diff --git a/app/Models/ProductImageModel.php b/app/Models/ProductImageModel.php new file mode 100644 index 00000000..27162836 --- /dev/null +++ b/app/Models/ProductImageModel.php @@ -0,0 +1,17 @@ + + */ + protected $guarded = []; +} diff --git a/app/Models/ProductLabelModel.php b/app/Models/ProductLabelModel.php new file mode 100644 index 00000000..80360af9 --- /dev/null +++ b/app/Models/ProductLabelModel.php @@ -0,0 +1,17 @@ + + */ + protected $guarded = []; +} diff --git a/app/Models/ProductModel.php b/app/Models/ProductModel.php new file mode 100644 index 00000000..3bc7c153 --- /dev/null +++ b/app/Models/ProductModel.php @@ -0,0 +1,23 @@ + + */ + protected $guarded = []; + + public function images(): HasMany + { + return $this->hasMany(ProductImageModel::class, 'product_id', 'id'); + } +} diff --git a/app/Models/StoreClassificationModel.php b/app/Models/StoreClassificationModel.php new file mode 100644 index 00000000..efc3e34b --- /dev/null +++ b/app/Models/StoreClassificationModel.php @@ -0,0 +1,17 @@ + + */ + protected $guarded = []; +} diff --git a/app/Models/StoreModel.php b/app/Models/StoreModel.php new file mode 100644 index 00000000..9f5f9100 --- /dev/null +++ b/app/Models/StoreModel.php @@ -0,0 +1,17 @@ + + */ + protected $guarded = []; +} diff --git a/app/Service/CodeGeneration/ProductClassificationService.php b/app/Service/CodeGeneration/ProductClassificationService.php new file mode 100644 index 00000000..401a0eb4 --- /dev/null +++ b/app/Service/CodeGeneration/ProductClassificationService.php @@ -0,0 +1,87 @@ +selectField = ["id", "name", "cover", "pid", "status", "created_at", "updated_at", "deleted_at"]; + $this->queryField = ['name' => 'like','pid' => '=,status=']; + $this->model = ProductClassificationModel::class; + } + + /** + * 获取商品分类列表 + * @return array + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + public function list(): array + { + return $this->getPageList(); + } + + /** + * 获取商品分类详情 + * @param $id + * @return mixed + * @throws Exception + */ + public function detail($id) + { + return $this->getDetail($id); + } + + /** + * 商品分类下拉列表 + * @return mixed + */ + public function option() + { + $this->optionField = ['id', 'name']; + return $this->getOption(); + } + + /** + * 创建商品分类 + * @param $params + * @return mixed + * @throws Exception + */ + public function create($params): mixed + { + return $this->insert($params); + } + + /** + * 编辑商品分类 + * @param $id + * @param $params + * @return mixed + * @throws Exception + */ + public function update($id, $params): mixed + { + return $this->save($id, $params); + } + + /** + * 删除商品分类 + * @param $ids + * @return mixed|true + * @throws Exception + */ + public function delete($ids): mixed + { + return $this->del($ids); + } + +} diff --git a/app/Service/CodeGeneration/ProductImageService.php b/app/Service/CodeGeneration/ProductImageService.php new file mode 100644 index 00000000..1850ba94 --- /dev/null +++ b/app/Service/CodeGeneration/ProductImageService.php @@ -0,0 +1,87 @@ +selectField = ["id", "url", "product_id", "status", "created_at", "updated_at", "deleted_at"]; + $this->queryField = ['url' => 'like','product_id' => '=,status=']; + $this->model = ProductImageModel::class; + } + + /** + * 获取商品图片列表 + * @return array + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + public function list(): array + { + return $this->getPageList(); + } + + /** + * 获取商品图片详情 + * @param $id + * @return mixed + * @throws Exception + */ + public function detail($id) + { + return $this->getDetail($id); + } + + /** + * 商品图片下拉列表 + * @return mixed + */ + public function option() + { + $this->optionField = ['id', 'name']; + return $this->getOption(); + } + + /** + * 创建商品图片 + * @param $params + * @return mixed + * @throws Exception + */ + public function create($params): mixed + { + return $this->insert($params); + } + + /** + * 编辑商品图片 + * @param $id + * @param $params + * @return mixed + * @throws Exception + */ + public function update($id, $params): mixed + { + return $this->save($id, $params); + } + + /** + * 删除商品图片 + * @param $ids + * @return mixed|true + * @throws Exception + */ + public function delete($ids): mixed + { + return $this->del($ids); + } + +} diff --git a/app/Service/CodeGeneration/ProductLabelService.php b/app/Service/CodeGeneration/ProductLabelService.php new file mode 100644 index 00000000..77036fe6 --- /dev/null +++ b/app/Service/CodeGeneration/ProductLabelService.php @@ -0,0 +1,87 @@ +selectField = ["id", "name", "status", "created_at", "updated_at", "deleted_at"]; + $this->queryField = ['name' => '=,status=']; + $this->model = ProductLabelModel::class; + } + + /** + * 获取商品标签列表 + * @return array + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + public function list(): array + { + return $this->getPageList(); + } + + /** + * 获取商品标签详情 + * @param $id + * @return mixed + * @throws Exception + */ + public function detail($id) + { + return $this->getDetail($id); + } + + /** + * 商品标签下拉列表 + * @return mixed + */ + public function option() + { + $this->optionField = ['id', 'name']; + return $this->getOption(); + } + + /** + * 创建商品标签 + * @param $params + * @return mixed + * @throws Exception + */ + public function create($params): mixed + { + return $this->insert($params); + } + + /** + * 编辑商品标签 + * @param $id + * @param $params + * @return mixed + * @throws Exception + */ + public function update($id, $params): mixed + { + return $this->save($id, $params); + } + + /** + * 删除商品标签 + * @param $ids + * @return mixed|true + * @throws Exception + */ + public function delete($ids): mixed + { + return $this->del($ids); + } + +} diff --git a/app/Service/CodeGeneration/ProductService.php b/app/Service/CodeGeneration/ProductService.php new file mode 100644 index 00000000..96286724 --- /dev/null +++ b/app/Service/CodeGeneration/ProductService.php @@ -0,0 +1,163 @@ +selectField = ["id", "title", "mall_id", "user_id", "introduction", "cover", "description", "quantity_sold", "price", "classification_id", "status", "created_at", "updated_at", "deleted_at"]; + $this->queryField = ['title' => 'like','mall_id' => '=','classification_id' => '=,status=']; + $this->model = ProductModel::class; + $this->with = [ + 'images:id,product_id,url' + ]; + } + + /** + * 获取产品列表 + * @return array + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + public function list(): array + { + $result = $this->getPageList(); + foreach ($result['items'] as &$v) { + $v['images'] = array_column($v['images'], 'url'); + } + return $result; + } + + /** + * 获取产品详情 + * @param $id + * @return mixed + * @throws Exception + */ + public function detail($id) + { + return $this->getDetail($id); + } + + /** + * 产品下拉列表 + * @return mixed + */ + public function option() + { + $this->optionField = ['id', 'name']; + return $this->getOption(); + } + + /** + * 创建产品 + * @param $params + * @return mixed + * @throws Exception + */ + public function create($params): mixed + { + $images = $params['images']; + unset($params['images']); + $params['user_id'] = $this->userId; + DB::beginTransaction(); + try { + + $result = $this->insert($params); + $insertData = []; + foreach ($images as $v) { + $insertData[] = [ + 'product_id' => $result, + 'url' => $v + ]; + } + $imageModel = ProductImageModel::insert($insertData); + DB::commit(); + } catch (Exception $e) { + DB::rollBack(); + $this->utils->errorThrow($e->getMessage()); + } + return $imageModel; + } + + /** + * 编辑产品 + * @param $id + * @param $params + * @return mixed + * @throws Exception + */ + public function update($id, $params): mixed + { + DB::beginTransaction(); + try { + $images = $params['images']; + unset($params['images']); + // 1. 更新产品基本信息 + $model = $this->save($id, $params); + + // 2. 处理图片逻辑 + if (isset($images)) { + $newImages = $images; + + // 获取当前产品已有的图片URL列表 + $existingImages = ProductImageModel::where('product_id', $id) + ->pluck('url') + ->toArray(); + + // 计算新增的图片和被删除的图片 + $addedImages = array_diff($newImages, $existingImages); + $deletedImages = array_diff($existingImages, $newImages); + + // 删除不再需要的图片记录 + if (!empty($deletedImages)) { + ProductImageModel::where('product_id', $id) + ->whereIn('url', $deletedImages) + ->delete(); + } + + // 添加新图片记录 + if (!empty($addedImages)) { + $insertData = []; + foreach ($addedImages as $url) { + $insertData[] = [ + 'product_id' => $id, + 'url' => $url + ]; + } + ProductImageModel::insert($insertData); + } + } + + DB::commit(); + } catch (Exception $e) { + DB::rollBack(); + $this->utils->errorThrow($e->getMessage()); + } + + // 返回更新后的产品信息 + return $model; + } + + /** + * 删除产品 + * @param $ids + * @return mixed|true + * @throws Exception + */ + public function delete($ids): mixed + { + return $this->del($ids); + } + +} diff --git a/app/Service/CodeGeneration/StoreClassificationService.php b/app/Service/CodeGeneration/StoreClassificationService.php new file mode 100644 index 00000000..fb40a9a5 --- /dev/null +++ b/app/Service/CodeGeneration/StoreClassificationService.php @@ -0,0 +1,100 @@ +selectField = ["id", "name", "pid", "status", "created_at", "updated_at", "deleted_at"]; + $this->queryField = ['name' => 'like','pid' => '=,status=']; + $this->model = StoreClassificationModel::class; + } + + /** + * 获取店铺行业列表 + * @return array + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + public function list(): array + { + return $this->getPageList(); + } + + /** + * 获取店铺行业详情 + * @param $id + * @return mixed + * @throws Exception + */ + public function detail($id) + { + return $this->getDetail($id); + } + + /** + * 店铺行业下拉列表 + * @return mixed + */ + public function option() + { + $this->optionField = ['id', 'name', 'pid']; + $this->where[] = ['pid', '=', 0]; + $result = $this->getOption(); + $result = $result->toArray(); + $ids = array_column($result, 'id'); + $this->whereIn = ['pid', $ids]; + // 查询所有的子分类,然后放在父级分类下面 + $this->where = [['deleted_at', '=', 0]]; + $children = $this->getOption(); + $children = $children->toArray(); + $arr = array_merge($result, $children); + $data = tree($arr); + + array_unshift($data, ['id' => 0, 'name' => '不分类', 'pid' => 0]); + return $data; + } + + /** + * 创建店铺行业 + * @param $params + * @return mixed + * @throws Exception + */ + public function create($params): mixed + { + return $this->insert($params); + } + + /** + * 编辑店铺行业 + * @param $id + * @param $params + * @return mixed + * @throws Exception + */ + public function update($id, $params): mixed + { + return $this->save($id, $params); + } + + /** + * 删除店铺行业 + * @param $ids + * @return mixed|true + * @throws Exception + */ + public function delete($ids): mixed + { + return $this->del($ids); + } + +} diff --git a/app/Service/CodeGeneration/StoreService.php b/app/Service/CodeGeneration/StoreService.php new file mode 100644 index 00000000..896aa0b8 --- /dev/null +++ b/app/Service/CodeGeneration/StoreService.php @@ -0,0 +1,90 @@ +selectField = ["id", "name", "level", "avatar", "introduction", "classification_id", "description", "phone", "person", "id_card", "qr_code", "is_featured", "business_license", "id_card_portrait_side", "id_card_national_emblem_side", "chain", "business_suspended", "status", "created_at", "updated_at", "deleted_at"]; + $this->queryField = ['name' => '=','level' => '=','phone' => 'like','person' => '=','classification_id' => '=','is_featured' => '=','chain' => '=','business_suspended' => '=,status=']; + $this->model = StoreModel::class; + } + + /** + * 获取店铺管理列表 + * @return array + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ + public function list(): array + { + return $this->getPageList(); + } + + /** + * 获取店铺管理详情 + * @param $id + * @return mixed + * @throws Exception + */ + public function detail($id) + { + return $this->getDetail($id); + } + + /** + * 店铺管理下拉列表 + * @return mixed + */ + public function option() + { + $this->optionField = ['id', 'name']; + return $this->getOption(); + } + + /** + * 创建店铺管理 + * @param $params + * @return mixed + * @throws Exception + */ + public function create($params): mixed + { + $this->utils->checkPhone($params['phone']); + $this->utils->checkIdCard($params['id_card']); + return $this->insert($params); + } + + /** + * 编辑店铺管理 + * @param $id + * @param $params + * @return mixed + * @throws Exception + */ + public function update($id, $params): mixed + { + $this->utils->checkPhone($params['phone']); + return $this->save($id, $params); + } + + /** + * 删除店铺管理 + * @param $ids + * @return mixed|true + * @throws Exception + */ + public function delete($ids): mixed + { + return $this->del($ids); + } + +} diff --git a/app/Service/common/UtilsService.php b/app/Service/common/UtilsService.php index 7e9402ad..fc84cce5 100755 --- a/app/Service/common/UtilsService.php +++ b/app/Service/common/UtilsService.php @@ -162,6 +162,22 @@ class UtilsService } } + /** + * 检查身份证号格式 + * @param string $idCard + * @return true|void + * @throws Exception + */ + public function checkIdCard(string $idCard) + { + $idCard = trim($idCard); + if (preg_match('/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/', $idCard)) { + return true; + } else { + self::errorThrow('身份证号格式不正确'); + } + } + /** * 生成订单号 * @param int $type diff --git a/app/template/view/api/index.ts b/app/template/view/api/index.ts index 92901873..fe73f3b2 100644 --- a/app/template/view/api/index.ts +++ b/app/template/view/api/index.ts @@ -9,6 +9,13 @@ export async function getupperCamelCaseListApi(data: any) { return requestClient.get(`${prefix}list`, { params: data }); } +/** + * 获取模板名称下拉列表 + */ +export async function getupperCamelCaseOptionApi() { + return requestClient.get(`${prefix}option`); +} + /** * 获取模板名称详情 * @param id diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php new file mode 100644 index 00000000..a2a99e1e --- /dev/null +++ b/resources/views/layouts/app.blade.php @@ -0,0 +1,91 @@ + + + + + + {{ config('app.name', 'Laravel') }} - @yield('title') + + + + + + + + + + + + +
+ + + + +
+
+ @yield('content') +
+
+ + + +
+ + diff --git a/resources/views/route.blade.php b/resources/views/route.blade.php new file mode 100755 index 00000000..becc05df --- /dev/null +++ b/resources/views/route.blade.php @@ -0,0 +1,799 @@ +@extends('layouts.app') + +@section('title', '应用路由信息') + +@section('content') +
+
+

+ 应用路由信息 +

+

这里展示了应用中所有已注册的路由信息,包括请求方法、URI、名称、控制器和中间件。

+ + +
+
+ + +
+ +
+ + +
+
+ + + + + + + + +
+
+ + + + + + + + + + + @foreach ($routes as $route) + @php + $methods = $route->methods(); + // 移除 HEAD 方法,因为它通常与 GET 一起使用 + if (($key = array_search('HEAD', $methods)) !== false) { + unset($methods[$key]); + } + $method = implode('|', $methods); + + // 根据不同的 HTTP 方法设置不同的颜色 + $methodClass = 'bg-gray-100 text-gray-800'; + if (in_array('GET', $methods)) $methodClass = 'bg-green-100 text-green-800'; + if (in_array('POST', $methods)) $methodClass = 'bg-blue-100 text-blue-800'; + if (in_array('PUT', $methods)) $methodClass = 'bg-yellow-100 text-yellow-800'; + if (in_array('DELETE', $methods)) $methodClass = 'bg-red-100 text-red-800'; + if (in_array('PATCH', $methods)) $methodClass = 'bg-purple-100 text-purple-800'; + + // 获取控制器和方法 + $action = $route->getAction(); + $controller = null; + if (isset($action['controller'])) { + $controllerParts = explode('@', $action['controller']); + $controller = count($controllerParts) > 1 ? + '' . $controllerParts[0] . '@' . $controllerParts[1] . '' : + $action['controller']; + } + + // 获取中间件 + $middleware = isset($action['middleware']) ? $action['middleware'] : []; + if (is_string($middleware)) { + $middleware = explode('|', $middleware); + } + + // 确定路由所属组和子组 + $routeGroup = '其他'; + $routeSubgroup = null; + $routeSubsubgroup = null; + if (isset($action['controller'])) { + $controllerName = explode('@', $action['controller'])[0]; + $parts = explode('\\', $controllerName); + $routeGroup = count($parts) > 3 ? $parts[3] : '其他'; + $routeSubgroup = count($parts) > 4 ? $parts[4] : null; + $routeSubsubgroup = count($parts) > 5 ? $parts[5] : null; + } + @endphp + + + + + + + @endforeach + +
URI
+
+ {{ $route->uri() }} + +
+ + {{ $method }} + +
+
+
+ + @if (count($routes) === 0) +
+ +

没有找到路由

+

应用中尚未注册任何路由。请确保你的路由文件已正确定义。

+
+ @endif +
+ +
+

+ 路由方法图例 +

+
+
+ GET + 读取操作 +
+
+ POST + 创建操作 +
+
+ PUT + 更新操作 +
+
+ DELETE + 删除操作 +
+
+ PATCH + 部分更新 +
+
+
+
+ + +@endsection + diff --git a/routes/api.php b/routes/api.php index c0abb99e..44bb179e 100644 --- a/routes/api.php +++ b/routes/api.php @@ -27,6 +27,17 @@ Route::group([], function () { 'role' => \App\Http\Controllers\Api\RoleController::class, // 角色管理 'menu' => \App\Http\Controllers\Api\MenuController::class, // 菜单管理 'upload' => \App\Http\Controllers\Api\UploadController::class, // 上传文件 + 'product' => \App\Http\Controllers\Api\CodeGeneration\ProductController::class, // 产品 + 'product' => \App\Http\Controllers\Api\CodeGeneration\ProductController::class, // 产品 + 'product' => \App\Http\Controllers\Api\CodeGeneration\ProductController::class, // 产品 + 'product' => \App\Http\Controllers\Api\CodeGeneration\ProductController::class, // 产品 + 'product' => \App\Http\Controllers\Api\CodeGeneration\ProductController::class, // 产品 + 'product-classification' => \App\Http\Controllers\Api\CodeGeneration\ProductClassificationController::class, // 商品分类 + 'product-classification' => \App\Http\Controllers\Api\CodeGeneration\ProductClassificationController::class, // 商品分类 + 'product-label' => \App\Http\Controllers\Api\CodeGeneration\ProductLabelController::class, // 商品标签 + 'product-image' => \App\Http\Controllers\Api\CodeGeneration\ProductImageController::class, // 商品图片 + 'store' => \App\Http\Controllers\Api\CodeGeneration\StoreController::class, // 店铺管理 + 'store-classification' => \App\Http\Controllers\Api\CodeGeneration\StoreClassificationController::class, // 店铺行业 // 需要登录的路由生成地址 ]); }); diff --git a/routes/web.php b/routes/web.php index 86a06c53..0ba42a92 100644 --- a/routes/web.php +++ b/routes/web.php @@ -5,3 +5,11 @@ use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('welcome'); }); + +Route::get('/r', function () { + // 获取所有路由信息 + $routes = Route::getRoutes(); + return view('route', [ + 'routes' => $routes + ]); +}); diff --git a/sql/nl_mall-dev.sql b/sql/nl_mall-dev.sql new file mode 100644 index 00000000..3568385c --- /dev/null +++ b/sql/nl_mall-dev.sql @@ -0,0 +1,543 @@ +/* + Navicat Premium Dump SQL + + Source Server : 测试库 + Source Server Type : MySQL + Source Server Version : 80404 (8.4.4) + Source Host : 101.43.12.11:3306 + Source Schema : nl_mall + + Target Server Type : MySQL + Target Server Version : 80404 (8.4.4) + File Encoding : 65001 + + Date: 19/05/2025 16:52:55 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for nl_admin +-- ---------------------------- +DROP TABLE IF EXISTS `nl_admin`; +CREATE TABLE `nl_admin` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `open_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'OpenID,后期整合萧康服务中心会用到', + `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像', + `nick_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '昵称', + `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码', + `phone` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户手机', + `email` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户邮箱', + `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '业务员推广码', + `role_id` int NOT NULL DEFAULT 0 COMMENT '角色', + `province_id` int NOT NULL DEFAULT 0 COMMENT '省', + `city_id` int NOT NULL DEFAULT 0 COMMENT '市', + `reg_ip` bigint NOT NULL DEFAULT 0 COMMENT '注册IP', + `last_login_time` int NOT NULL DEFAULT 0 COMMENT '最后登录时间', + `ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '最后登录IP', + `ip_table` json NOT NULL COMMENT '常用登录IP地址列表', + `operation_password` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '操作密码', + `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注', + `status` tinyint NOT NULL DEFAULT 1 COMMENT '用户状态 0正常 1禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '管理员表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_admin +-- ---------------------------- +INSERT INTO `nl_admin` VALUES (1, 'nl_28686ad68682180e26836c721a52', '', '超管', '$2y$12$sMgspfujo/5qnMEFvXH2d.0hYq/7PXhkJREYHbc..4WKt5LH7M8ui', '15100000000', 'workerqi@163.com', '517117', 1, 0, 0, 0, 0, '127.0.0.1', '[\"127.0.0.1\"]', '0', '', 1, 0, 1747026536, 0); + +-- ---------------------------- +-- Table structure for nl_admin_notice +-- ---------------------------- +DROP TABLE IF EXISTS `nl_admin_notice`; +CREATE TABLE `nl_admin_notice` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '消息标题', + `detail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '简介', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '消息内容', + `type` int NOT NULL DEFAULT 0 COMMENT '消息类型', + `user_id` int NOT NULL DEFAULT 0 COMMENT '关联用户ID', + `status` int NOT NULL DEFAULT 0 COMMENT '状态 0:未读 1:已读', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '管理员消息列表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_admin_notice +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_api_op_log +-- ---------------------------- +DROP TABLE IF EXISTS `nl_api_op_log`; +CREATE TABLE `nl_api_op_log` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `user_id` int NOT NULL COMMENT '操作用户ID', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作路由', + `method` tinyint(1) NOT NULL DEFAULT 0 COMMENT '请求方式 0:未知 1:GET 2:POST', + `controller` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作的控制器', + `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作者IP地址', + `param` json NOT NULL COMMENT '请求携带参数', + `result` json NOT NULL COMMENT '返回json', + `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '操作状态 0:成功 1:失败', + `result_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '返回状态码', + `platform_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '平台类型 0:总后台 1:门店后台 2:小程序', + `belong_id` int NOT NULL DEFAULT 0 COMMENT '所属平台ID', + `user_type` int NOT NULL DEFAULT 0 COMMENT '用户类型', + `equipment` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作系统', + `browser` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '浏览器', + `created_at` int NOT NULL DEFAULT 0 COMMENT '操作时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 16860 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '新的后台API访问日志记录' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_api_op_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_code_generation +-- ---------------------------- +DROP TABLE IF EXISTS `nl_code_generation`; +CREATE TABLE `nl_code_generation` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单标题', + `file_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文件名称', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '下载链接', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '生成参数', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码生成记录' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_code_generation +-- ---------------------------- +INSERT INTO `nl_code_generation` VALUES (1, '产品', '产品-68245521ec6da.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/产品-68245521ec6da.zip', '{\"class_name\":\"product\",\"class_comment\":\"\\u4ea7\\u54c1\",\"sort\":1,\"icon\":\"ep:goods-filled\",\"pid\":5,\"field\":[{\"name\":\"title\",\"type\":\"varchar\",\"type_length\":\"128\",\"default\":null,\"comment\":\"\\u5546\\u54c1\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"mall_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u5546\\u5bb6ID\",\"not_null\":true,\"formShow\":false,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"user_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u4e0a\\u4f20\\u7528\\u6237ID\",\"not_null\":true,\"formShow\":false,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"Introduction\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u7b80\\u4ecb\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"Textarea\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"cover\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5c01\\u9762\\u56fe\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"description\",\"type\":\"TEXT\",\"type_length\":null,\"default\":null,\"comment\":\"\\u8be6\\u7ec6\\u8bf4\\u660e\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\",\"null\":true},{\"name\":\"price\",\"type\":\"DECIMAL\",\"type_length\":\"10,2\",\"default\":\"0\",\"comment\":\"\\u4ef7\\u683c\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"classification_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u4ea7\\u54c1\\u5206\\u7c7b\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747211554, 1747211554, 0); +INSERT INTO `nl_code_generation` VALUES (2, '商品分类', '商品分类-68245705d2a02.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/商品分类-68245705d2a02.zip', '{\"class_name\":\"productClassification\",\"class_comment\":\"\\u5546\\u54c1\\u5206\\u7c7b\",\"sort\":50,\"icon\":\"carbon:data-class\",\"pid\":10,\"field\":[{\"name\":\"name\",\"type\":\"varchar\",\"type_length\":\"32\",\"default\":null,\"comment\":\"\\u5206\\u7c7b\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"cover\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5206\\u7c7b\\u56fe\\u7247\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"pid\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u7236\\u7ea7\\u5206\\u7c7b\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747212037, 1747212037, 0); +INSERT INTO `nl_code_generation` VALUES (3, '商品标签', '商品标签-68245ad6a3ba6.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/商品标签-68245ad6a3ba6.zip', '{\"class_name\":\"productLabel\",\"class_comment\":\"\\u5546\\u54c1\\u6807\\u7b7e\",\"sort\":60,\"icon\":\"fluent-emoji:label\",\"pid\":10,\"field\":[{\"name\":\"name\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u6807\\u7b7e\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747213014, 1747213014, 0); +INSERT INTO `nl_code_generation` VALUES (4, '商品图片', '商品图片-682a7abf8d587.zip', '/www/sites/nl-mall/index/nl-mall-api/storage/app/public/zip/code-generation/商品图片-682a7abf8d587.zip', '{\"class_name\":\"productImage\",\"class_comment\":\"\\u5546\\u54c1\\u56fe\\u7247\",\"sort\":100,\"icon\":\"catppuccin:image\",\"pid\":10,\"field\":[{\"name\":\"url\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5546\\u54c1\\u5730\\u5740\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"Avatar\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"product_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":\"0\",\"comment\":\"\\u5546\\u54c1ID\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747614399, 1747614399, 0); + +-- ---------------------------- +-- Table structure for nl_file +-- ---------------------------- +DROP TABLE IF EXISTS `nl_file`; +CREATE TABLE `nl_file` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `user_id` int NOT NULL DEFAULT 0 COMMENT '用户ID', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文件地址', + `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '文件类型 0:图片 1:视频 2:音频 3:excel 4:压缩包 ', + `source` tinyint(1) NOT NULL DEFAULT 0 COMMENT '来源 0:后台 1:用户端', + `created_at` int NOT NULL COMMENT '上传时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 87 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '文件表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_file +-- ---------------------------- +INSERT INTO `nl_file` VALUES (84, 1, 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_0hihYRbKMo0PfGg1682459de08829.png', 0, 0, 1747212766, 0, 0); +INSERT INTO `nl_file` VALUES (85, 1, 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_r9HVNOq19s5aFZKz682459e9cde8c.png', 0, 0, 1747212777, 0, 0); +INSERT INTO `nl_file` VALUES (86, 1, 'http://127.0.0.1:18010/storage/spa/image/20250519/cc_upload_61k5vKIw1Tdt0cD8682a78a699ada.jpg', 0, 0, 1747613862, 0, 0); + +-- ---------------------------- +-- Table structure for nl_menu +-- ---------------------------- +DROP TABLE IF EXISTS `nl_menu`; +CREATE TABLE `nl_menu` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单标题', + `icon` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单图标', + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '页面Name,全局唯一', + `path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '访问路由', + `component` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '组件路径需要去掉 views/ 和 .vue', + `redirect` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '父级菜单重定向的子集菜单', + `keep_alive` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否开启页面缓存 0:开启 1:关闭', + `hide_in_menu` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否将页面展示在菜单栏 0:展示 1:隐藏', + `affix_tab` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否为置顶页 0:是 1:否', + `badge` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单的徽标', + `badge_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用于配置页面的徽标类型,0:dot 小红点 1:normal 文本', + `badge_variants` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用于配置页面的徽标颜色 \r\n0:default 1:destructive 2:primary 3:success 4: warning', + `iframe_src` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '内嵌的页面路径', + `pid` int NOT NULL DEFAULT 0 COMMENT '父级菜单id', + `sort` int NOT NULL DEFAULT 0 COMMENT '排序', + `query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '默认查询参数', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '菜单表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_menu +-- ---------------------------- +INSERT INTO `nl_menu` VALUES (1, '概览', 'twemoji:house-with-garden', 'Dashboard', '/', 'BasicLayout', '', 0, 0, 1, '', 0, 0, '', 0, -1, '', 1734485082, 1734486088, 0); +INSERT INTO `nl_menu` VALUES (2, '分析页', 'lucide:area-chart', 'Analytics', '/analytics', '/dashboard/analytics/index', '', 1, 0, 0, '', 0, 0, '', 1, 0, '', 1734485206, 1734485814, 0); +INSERT INTO `nl_menu` VALUES (3, '工作台', 'carbon:workspace', 'Workspace', '/workspace', '/dashboard/workspace/index', '', 1, 0, 1, '', 0, 0, '', 1, 0, '', 1734486030, 0, 0); +INSERT INTO `nl_menu` VALUES (4, '关于', 'lucide:copyright', 'About', '/about', '/_core/about/index.vue', '', 1, 0, 1, '', 0, 0, '', 0, 999999999, '', 0, 0, 0); +INSERT INTO `nl_menu` VALUES (5, '基础管理', 'logos:openjs-foundation-icon', 'System', '/system', 'BasicLayout', '', 0, 0, 1, '', 0, 0, '', 0, 1000, '', 1734486082, 1735117933, 0); +INSERT INTO `nl_menu` VALUES (6, '管理员管理', 'grommet-icons:user-admin', 'SystemUser', '/system/user', '/system/admin/index', '', 1, 0, 1, '', 0, 0, '', 5, 0, '', 1734486178, 0, 0); +INSERT INTO `nl_menu` VALUES (7, '角色管理', 'carbon:user-role', 'SystemRole', '/system/role', '/system/role/index', '', 1, 0, 1, '', 0, 0, '', 5, 1, '', 1734486291, 1734489429, 0); +INSERT INTO `nl_menu` VALUES (8, '菜单管理', 'line-md:menu', 'SystemMenu', '/system/menu', '/system/menu/index', '', 1, 0, 1, '', 0, 0, '', 5, 2, '', 1734486345, 0, 0); +INSERT INTO `nl_menu` VALUES (9, '代码生成', 'fluent-color:code-20', 'CodeGeneration', '/code-generation', '/code-generation/index', '', 1, 0, 1, '', 0, 0, '', 0, 99999999, '', 1734486345, 0, 0); +INSERT INTO `nl_menu` VALUES (10, '商品中心', 'ep:goods-filled', 'ProductCenter', '/product-center', 'BasicLayout', '', 1, 0, 1, '', 0, 0, '', 0, 30, '', 1734486345, 0, 0); +INSERT INTO `nl_menu` VALUES (11, '产品', 'ep:goods-filled', 'Product', '/product', '/my-gen/product/index', '', 1, 0, 1, '', 0, 0, '', 10, 1, '', 1747211554, 1747211701, 0); +INSERT INTO `nl_menu` VALUES (12, '商品分类', 'carbon:data-class', 'ProductClassification', '/product-classification', '/my-gen/product-classification/index', '', 1, 0, 1, '', 0, 0, '', 10, 50, '', 1747212037, 0, 0); +INSERT INTO `nl_menu` VALUES (13, '商品标签', 'fluent-emoji:label', 'ProductLabel', '/product-label', '/my-gen/product-label/index', '', 1, 0, 1, '', 0, 0, '', 10, 60, '', 1747213014, 0, 0); +INSERT INTO `nl_menu` VALUES (14, '商品图片', 'catppuccin:image', 'ProductImage', '/product-image', '/my-gen/product-image/index', '', 1, 0, 1, '', 0, 0, '', 10, 100, '', 1747614399, 0, 0); + +-- ---------------------------- +-- Table structure for nl_product +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product`; +CREATE TABLE `nl_product` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品名称', + `mall_id` int NOT NULL DEFAULT 0 COMMENT '商家ID', + `user_id` int NOT NULL DEFAULT 0 COMMENT '上传用户ID', + `Introduction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '简介', + `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '封面图', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '详细说明', + `price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '价格', + `classification_id` int NOT NULL DEFAULT 0 COMMENT '产品分类', + `quantity_sold` int NOT NULL DEFAULT 0 COMMENT '已售数量', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '产品表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_product +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_product_classification +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product_classification`; +CREATE TABLE `nl_product_classification` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类名称', + `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类图片', + `pid` int NOT NULL DEFAULT 0 COMMENT '父级分类', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 97 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '商品分类表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of nl_product_classification +-- ---------------------------- +INSERT INTO `nl_product_classification` VALUES (1, '服饰鞋包', 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_r9HVNOq19s5aFZKz682459e9cde8c.png', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (2, '男装', '', 1, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (3, '女装', '', 1, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (4, '童装', '', 1, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (5, '鞋靴', '', 1, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (6, '箱包', '', 1, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (7, '珠宝配饰', '', 1, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (8, '美妆个护', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (9, '面部护肤', '', 8, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (10, '身体护肤', '', 8, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (11, '彩妆', '', 8, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (12, '香水', '', 8, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (13, '美发护发', '', 8, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (14, '母婴用品', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (15, '婴儿食品', '', 14, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (16, '婴儿用品', '', 14, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (17, '孕妇用品', '', 14, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (18, '玩具', '', 14, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (19, '食品饮料', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (20, '休闲零食', '', 19, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (21, '粮油调味', '', 19, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (22, '冲调饮品', '', 19, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (23, '酒类', '', 19, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (24, '生鲜水果', '', 19, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (25, '家居日用', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (26, '家具', '', 25, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (27, '家纺', '', 25, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (28, '厨房用品', '', 25, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (29, '清洁用品', '', 25, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (30, '家居装饰', '', 25, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (31, '数码家电', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (32, '手机', '', 31, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (33, '电脑', '', 31, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (34, '数码配件', '', 31, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (35, '家用电器', '', 31, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (36, '大家电', '', 35, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (37, '小家电', '', 35, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (38, '运动户外', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (39, '运动服饰', '', 38, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (40, '健身器材', '', 38, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (41, '户外装备', '', 38, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (42, '体育用品', '', 38, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (43, '汽车用品', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (44, '内饰用品', '', 43, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (45, '外饰用品', '', 43, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (46, '保养用品', '', 43, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (47, '电子用品', '', 43, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (48, '图书音像', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (49, '图书', '', 48, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (50, '音像制品', '', 48, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (51, '乐器', '', 48, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (52, '宠物用品', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (53, '宠物食品', '', 52, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (54, '宠物玩具', '', 52, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (55, '宠物用品', '', 52, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (56, '宠物服饰', '', 52, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (57, '礼品鲜花', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (58, '鲜花', '', 57, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (59, '礼品盒', '', 57, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (60, '创意礼品', '', 57, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (61, '礼品卡', '', 57, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (62, '珠宝钟表', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (63, '首饰', '', 62, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (64, '手表', '', 62, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (65, '眼镜', '', 62, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (66, '礼品箱包', '', 62, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (67, '食品保健', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (68, '保健食品', '', 67, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (69, '保健器械', '', 67, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (70, '营养补充剂', '', 67, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (71, '成人用品', '', 67, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (72, '办公文教', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (73, '办公用品', '', 72, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (74, '文房四宝', '', 72, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (75, '学生用品', '', 72, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (76, '耗材', '', 72, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (77, '乐器', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (78, '键盘乐器', '', 77, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (79, '弦乐器', '', 77, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (80, '管乐器', '', 77, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (81, '打击乐器', '', 77, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (82, '乐器配件', '', 77, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (83, '鞋类', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (84, '男鞋', '', 83, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (85, '女鞋', '', 83, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (86, '童鞋', '', 83, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (87, '箱包', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (88, '背包', '', 87, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (89, '手提包', '', 87, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (90, '钱包', '', 87, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (91, '旅行箱', '', 87, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (92, '运动户外', '', 0, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (93, '运动服饰', '', 92, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (94, '健身器材', '', 92, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (95, '户外装备', '', 92, 0, 1747624512, 1747624512, 0); +INSERT INTO `nl_product_classification` VALUES (96, '体育用品', '', 92, 0, 1747624512, 1747624512, 0); + +-- ---------------------------- +-- Table structure for nl_product_image +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product_image`; +CREATE TABLE `nl_product_image` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品地址', + `product_id` int NOT NULL DEFAULT 0 COMMENT '商品ID', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '商品图片表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_product_image +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_product_label +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product_label`; +CREATE TABLE `nl_product_label` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '标签名称', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '商品标签表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_product_label +-- ---------------------------- +INSERT INTO `nl_product_label` VALUES (1, '包邮', 0, 1747213158, 0, 0); +INSERT INTO `nl_product_label` VALUES (2, '7天无理由退货', 0, 1747213167, 0, 0); +INSERT INTO `nl_product_label` VALUES (3, '绝对正版', 0, 1747213198, 0, 0); + +-- ---------------------------- +-- Table structure for nl_role +-- ---------------------------- +DROP TABLE IF EXISTS `nl_role`; +CREATE TABLE `nl_role` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色名称', + `value` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色值', + `pid` int NOT NULL DEFAULT 0 COMMENT '上级角色', + `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '角色说明', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_role +-- ---------------------------- +INSERT INTO `nl_role` VALUES (1, '超级管理员', 'admin', 0, '', 0, 0, 0); +INSERT INTO `nl_role` VALUES (2, '后台工作人员', 'admin user', 0, '负责ToB的工作和用户投诉', 1747210408, 0, 0); +INSERT INTO `nl_role` VALUES (3, '商家', 'merchant', 0, '入住的商家', 1747210437, 0, 0); +INSERT INTO `nl_role` VALUES (4, '商家客服', 'Merchant customer service', 0, '负责商家的客服工作', 1747210525, 0, 0); +INSERT INTO `nl_role` VALUES (5, '商家运营', 'Merchant operation', 0, '负责整体店铺的运营和管理,包括制定店铺的经营策略、规划商品品类、设定价格策略、策划营销活动等,以提升店铺的销售额和利润,同时还要分析销售数据,了解消费者行为和市场趋势,以便及时调整运营策略。', 1747210567, 0, 0); + +-- ---------------------------- +-- Table structure for nl_role_menu_relations +-- ---------------------------- +DROP TABLE IF EXISTS `nl_role_menu_relations`; +CREATE TABLE `nl_role_menu_relations` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', + `role_id` int NOT NULL DEFAULT 0 COMMENT '角色ID', + `menu_id` int NOT NULL DEFAULT 0 COMMENT '菜单ID', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色权限绑定表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_role_menu_relations +-- ---------------------------- +INSERT INTO `nl_role_menu_relations` VALUES (1, 1, 1, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (2, 1, 2, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (3, 1, 3, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (4, 1, 4, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (5, 1, 5, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (6, 1, 6, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (7, 1, 7, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (8, 1, 8, 1747033198); + +-- ---------------------------- +-- Table structure for nl_store_classification +-- ---------------------------- +DROP TABLE IF EXISTS `nl_store_classification`; +CREATE TABLE `nl_store_classification` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '行业名称', + `pid` int NOT NULL DEFAULT 0 COMMENT '父级ID', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 97 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '店铺行业表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of nl_store_classification +-- ---------------------------- +INSERT INTO `nl_store_classification` VALUES (1, '零售百货', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (2, '超市便利店', 1, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (3, '精品百货', 1, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (4, '折扣店', 1, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (5, '母婴店', 1, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (6, '服饰鞋帽', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (7, '男装品牌店', 6, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (8, '女装品牌店', 6, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (9, '童装店', 6, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (10, '鞋店', 6, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (11, '箱包店', 6, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (12, '美妆个护', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (13, '化妆品店', 12, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (14, '护肤品店', 12, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (15, '美发美甲店', 12, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (16, '美容院', 12, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (17, '餐饮美食', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (18, '中餐', 17, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (19, '西餐', 17, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (20, '快餐小吃', 17, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (21, '火锅烧烤', 17, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (22, '饮品甜点', 17, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (23, '住宿服务', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (24, '酒店', 23, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (25, '民宿', 23, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (26, '度假村', 23, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (27, '短租公寓', 23, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (28, '休闲娱乐', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (29, '电影院', 28, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (30, 'KTV', 28, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (31, '健身房', 28, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (32, '游乐场', 28, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (33, '酒吧咖啡馆', 28, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (34, '家居建材', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (35, '家具店', 34, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (36, '建材店', 34, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (37, '灯具店', 34, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (38, '卫浴店', 34, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (39, '数码电器', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (40, '手机店', 39, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (41, '电脑店', 39, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (42, '家电卖场', 39, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (43, '数码配件店', 39, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (44, '医疗健康', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (45, '药店', 44, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (46, '美容院', 44, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (47, '体检中心', 44, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (48, '宠物医院', 44, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (49, '教育培训', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (50, '早教机构', 49, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (51, '培训机构', 49, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (52, '语言学校', 49, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (53, '职业教育', 49, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (54, '金融服务', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (55, '银行', 54, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (56, '保险', 54, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (57, '证券', 54, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (58, '投资理财', 54, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (59, '汽车服务', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (60, '4S店', 59, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (61, '汽车维修', 59, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (62, '汽车美容', 59, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (63, '加油站', 59, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (64, '生活服务', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (65, '洗衣店', 64, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (66, '家政服务', 64, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (67, '婚庆服务', 64, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (68, '摄影机构', 64, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (69, '宠物店', 64, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (70, '文化艺术', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (71, '书店', 70, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (72, '画廊', 70, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (73, '艺术培训', 70, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (74, '乐器行', 70, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (75, '旅游服务', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (76, '旅行社', 75, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (77, '票务代理', 75, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (78, '景区景点', 75, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (79, '酒店预订', 75, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (80, '电商服务', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (81, '综合电商', 80, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (82, '垂直电商', 80, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (83, '跨境电商', 80, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (84, '社交电商', 80, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (85, '批发贸易', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (86, '服装批发', 85, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (87, '食品批发', 85, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (88, '建材批发', 85, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (89, '小商品批发', 85, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (90, '专业服务', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (91, '法律咨询', 90, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (92, '会计服务', 90, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (93, '广告传媒', 90, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (94, '设计服务', 90, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (95, '物流配送', 0, 0, 1747624544, 1747624544, 0); +INSERT INTO `nl_store_classification` VALUES (96, '快递公司', 95, 0, 1747624544, 1747624544, 0); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/nl_mall.sql b/sql/nl_mall.sql new file mode 100644 index 00000000..ffc8f465 --- /dev/null +++ b/sql/nl_mall.sql @@ -0,0 +1,333 @@ +/* + Navicat Premium Dump SQL + + Source Server : 开发库(本地) + Source Server Type : MySQL + Source Server Version : 80404 (8.4.4) + Source Host : localhost:3310 + Source Schema : nl_mall + + Target Server Type : MySQL + Target Server Version : 80404 (8.4.4) + File Encoding : 65001 + + Date: 19/05/2025 08:30:20 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for nl_admin +-- ---------------------------- +DROP TABLE IF EXISTS `nl_admin`; +CREATE TABLE `nl_admin` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `open_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'OpenID,后期整合萧康服务中心会用到', + `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像', + `nick_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '昵称', + `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码', + `phone` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户手机', + `email` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户邮箱', + `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '业务员推广码', + `role_id` int NOT NULL DEFAULT 0 COMMENT '角色', + `province_id` int NOT NULL DEFAULT 0 COMMENT '省', + `city_id` int NOT NULL DEFAULT 0 COMMENT '市', + `reg_ip` bigint NOT NULL DEFAULT 0 COMMENT '注册IP', + `last_login_time` int NOT NULL DEFAULT 0 COMMENT '最后登录时间', + `ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '最后登录IP', + `ip_table` json NOT NULL COMMENT '常用登录IP地址列表', + `operation_password` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '操作密码', + `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注', + `status` tinyint NOT NULL DEFAULT 1 COMMENT '用户状态 0正常 1禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '管理员表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_admin +-- ---------------------------- +INSERT INTO `nl_admin` VALUES (1, 'nl_28686ad68682180e26836c721a52', '', '超管', '$2y$12$sMgspfujo/5qnMEFvXH2d.0hYq/7PXhkJREYHbc..4WKt5LH7M8ui', '15100000000', 'workerqi@163.com', '517117', 1, 0, 0, 0, 0, '127.0.0.1', '[\"127.0.0.1\"]', '0', '', 1, 0, 1747026536, 0); + +-- ---------------------------- +-- Table structure for nl_admin_notice +-- ---------------------------- +DROP TABLE IF EXISTS `nl_admin_notice`; +CREATE TABLE `nl_admin_notice` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '消息标题', + `detail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '简介', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '消息内容', + `type` int NOT NULL DEFAULT 0 COMMENT '消息类型', + `user_id` int NOT NULL DEFAULT 0 COMMENT '关联用户ID', + `status` int NOT NULL DEFAULT 0 COMMENT '状态 0:未读 1:已读', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '管理员消息列表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_admin_notice +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_api_op_log +-- ---------------------------- +DROP TABLE IF EXISTS `nl_api_op_log`; +CREATE TABLE `nl_api_op_log` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `user_id` int NOT NULL COMMENT '操作用户ID', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作路由', + `method` tinyint(1) NOT NULL DEFAULT 0 COMMENT '请求方式 0:未知 1:GET 2:POST', + `controller` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作的控制器', + `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作者IP地址', + `param` json NOT NULL COMMENT '请求携带参数', + `result` json NOT NULL COMMENT '返回json', + `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '操作状态 0:成功 1:失败', + `result_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '返回状态码', + `platform_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '平台类型 0:总后台 1:门店后台 2:小程序', + `belong_id` int NOT NULL DEFAULT 0 COMMENT '所属平台ID', + `user_type` int NOT NULL DEFAULT 0 COMMENT '用户类型', + `equipment` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作系统', + `browser` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '浏览器', + `created_at` int NOT NULL DEFAULT 0 COMMENT '操作时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 16860 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '新的后台API访问日志记录' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_api_op_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_code_generation +-- ---------------------------- +DROP TABLE IF EXISTS `nl_code_generation`; +CREATE TABLE `nl_code_generation` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单标题', + `file_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文件名称', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '下载链接', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '生成参数', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码生成记录' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_code_generation +-- ---------------------------- +INSERT INTO `nl_code_generation` VALUES (1, '产品', '产品-68245521ec6da.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/产品-68245521ec6da.zip', '{\"class_name\":\"product\",\"class_comment\":\"\\u4ea7\\u54c1\",\"sort\":1,\"icon\":\"ep:goods-filled\",\"pid\":5,\"field\":[{\"name\":\"title\",\"type\":\"varchar\",\"type_length\":\"128\",\"default\":null,\"comment\":\"\\u5546\\u54c1\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"mall_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u5546\\u5bb6ID\",\"not_null\":true,\"formShow\":false,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"user_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u4e0a\\u4f20\\u7528\\u6237ID\",\"not_null\":true,\"formShow\":false,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"introduction\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u7b80\\u4ecb\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"Textarea\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"cover\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5c01\\u9762\\u56fe\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"description\",\"type\":\"TEXT\",\"type_length\":null,\"default\":null,\"comment\":\"\\u8be6\\u7ec6\\u8bf4\\u660e\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\",\"null\":true},{\"name\":\"price\",\"type\":\"DECIMAL\",\"type_length\":\"10,2\",\"default\":\"0\",\"comment\":\"\\u4ef7\\u683c\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"},{\"name\":\"classification_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u4ea7\\u54c1\\u5206\\u7c7b\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747211554, 1747211554, 0); +INSERT INTO `nl_code_generation` VALUES (2, '商品分类', '商品分类-68245705d2a02.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/商品分类-68245705d2a02.zip', '{\"class_name\":\"productClassification\",\"class_comment\":\"\\u5546\\u54c1\\u5206\\u7c7b\",\"sort\":50,\"icon\":\"carbon:data-class\",\"pid\":10,\"field\":[{\"name\":\"name\",\"type\":\"varchar\",\"type_length\":\"32\",\"default\":null,\"comment\":\"\\u5206\\u7c7b\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"cover\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5206\\u7c7b\\u56fe\\u7247\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":false,\"searchValue\":\"=\"},{\"name\":\"pid\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":null,\"comment\":\"\\u7236\\u7ea7\\u5206\\u7c7b\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747212037, 1747212037, 0); +INSERT INTO `nl_code_generation` VALUES (3, '商品标签', '商品标签-68245ad6a3ba6.zip', '/www/sites/nl-mall/index/nl-admin-api/storage/app/public/zip/code-generation/商品标签-68245ad6a3ba6.zip', '{\"class_name\":\"productLabel\",\"class_comment\":\"\\u5546\\u54c1\\u6807\\u7b7e\",\"sort\":60,\"icon\":\"fluent-emoji:label\",\"pid\":10,\"field\":[{\"name\":\"name\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u6807\\u7b7e\\u540d\\u79f0\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747213014, 1747213014, 0); +INSERT INTO `nl_code_generation` VALUES (4, '商品图片', '商品图片-682a7abf8d587.zip', '/www/sites/nl-mall/index/nl-mall-api/storage/app/public/zip/code-generation/商品图片-682a7abf8d587.zip', '{\"class_name\":\"productImage\",\"class_comment\":\"\\u5546\\u54c1\\u56fe\\u7247\",\"sort\":100,\"icon\":\"catppuccin:image\",\"pid\":10,\"field\":[{\"name\":\"url\",\"type\":\"varchar\",\"type_length\":\"255\",\"default\":null,\"comment\":\"\\u5546\\u54c1\\u5730\\u5740\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"Avatar\",\"search\":true,\"searchValue\":\"like\"},{\"name\":\"product_id\",\"type\":\"INT\",\"type_length\":\"11\",\"default\":\"0\",\"comment\":\"\\u5546\\u54c1ID\",\"not_null\":true,\"formShow\":true,\"tableShow\":true,\"formType\":\"VbenInput\",\"search\":true,\"searchValue\":\"=\"}]}', 1747614399, 1747614399, 0); + +-- ---------------------------- +-- Table structure for nl_file +-- ---------------------------- +DROP TABLE IF EXISTS `nl_file`; +CREATE TABLE `nl_file` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `user_id` int NOT NULL DEFAULT 0 COMMENT '用户ID', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文件地址', + `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '文件类型 0:图片 1:视频 2:音频 3:excel 4:压缩包 ', + `source` tinyint(1) NOT NULL DEFAULT 0 COMMENT '来源 0:后台 1:用户端', + `created_at` int NOT NULL COMMENT '上传时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 87 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '文件表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_file +-- ---------------------------- +INSERT INTO `nl_file` VALUES (84, 1, 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_0hihYRbKMo0PfGg1682459de08829.png', 0, 0, 1747212766, 0, 0); +INSERT INTO `nl_file` VALUES (85, 1, 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_r9HVNOq19s5aFZKz682459e9cde8c.png', 0, 0, 1747212777, 0, 0); +INSERT INTO `nl_file` VALUES (86, 1, 'http://127.0.0.1:18010/storage/spa/image/20250519/cc_upload_61k5vKIw1Tdt0cD8682a78a699ada.jpg', 0, 0, 1747613862, 0, 0); + +-- ---------------------------- +-- Table structure for nl_menu +-- ---------------------------- +DROP TABLE IF EXISTS `nl_menu`; +CREATE TABLE `nl_menu` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单标题', + `icon` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单图标', + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '页面Name,全局唯一', + `path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '访问路由', + `component` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '组件路径需要去掉 views/ 和 .vue', + `redirect` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '父级菜单重定向的子集菜单', + `keep_alive` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否开启页面缓存 0:开启 1:关闭', + `hide_in_menu` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否将页面展示在菜单栏 0:展示 1:隐藏', + `affix_tab` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否为置顶页 0:是 1:否', + `badge` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '菜单的徽标', + `badge_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用于配置页面的徽标类型,0:dot 小红点 1:normal 文本', + `badge_variants` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用于配置页面的徽标颜色 \r\n0:default 1:destructive 2:primary 3:success 4: warning', + `iframe_src` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '内嵌的页面路径', + `pid` int NOT NULL DEFAULT 0 COMMENT '父级菜单id', + `sort` int NOT NULL DEFAULT 0 COMMENT '排序', + `query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '默认查询参数', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '菜单表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_menu +-- ---------------------------- +INSERT INTO `nl_menu` VALUES (1, '概览', 'twemoji:house-with-garden', 'Dashboard', '/', 'BasicLayout', '', 0, 0, 1, '', 0, 0, '', 0, -1, '', 1734485082, 1734486088, 0); +INSERT INTO `nl_menu` VALUES (2, '分析页', 'lucide:area-chart', 'Analytics', '/analytics', '/dashboard/analytics/index', '', 1, 0, 0, '', 0, 0, '', 1, 0, '', 1734485206, 1734485814, 0); +INSERT INTO `nl_menu` VALUES (3, '工作台', 'carbon:workspace', 'Workspace', '/workspace', '/dashboard/workspace/index', '', 1, 0, 1, '', 0, 0, '', 1, 0, '', 1734486030, 0, 0); +INSERT INTO `nl_menu` VALUES (4, '关于', 'lucide:copyright', 'About', '/about', '/_core/about/index.vue', '', 1, 0, 1, '', 0, 0, '', 0, 999999999, '', 0, 0, 0); +INSERT INTO `nl_menu` VALUES (5, '基础管理', 'logos:openjs-foundation-icon', 'System', '/system', 'BasicLayout', '', 0, 0, 1, '', 0, 0, '', 0, 1000, '', 1734486082, 1735117933, 0); +INSERT INTO `nl_menu` VALUES (6, '管理员管理', 'grommet-icons:user-admin', 'SystemUser', '/system/user', '/system/admin/index', '', 1, 0, 1, '', 0, 0, '', 5, 0, '', 1734486178, 0, 0); +INSERT INTO `nl_menu` VALUES (7, '角色管理', 'carbon:user-role', 'SystemRole', '/system/role', '/system/role/index', '', 1, 0, 1, '', 0, 0, '', 5, 1, '', 1734486291, 1734489429, 0); +INSERT INTO `nl_menu` VALUES (8, '菜单管理', 'line-md:menu', 'SystemMenu', '/system/menu', '/system/menu/index', '', 1, 0, 1, '', 0, 0, '', 5, 2, '', 1734486345, 0, 0); +INSERT INTO `nl_menu` VALUES (9, '代码生成', 'fluent-color:code-20', 'CodeGeneration', '/code-generation', '/code-generation/index', '', 1, 0, 1, '', 0, 0, '', 0, 99999999, '', 1734486345, 0, 0); +INSERT INTO `nl_menu` VALUES (10, '商品中心', 'ep:goods-filled', 'ProductCenter', '/product-center', 'BasicLayout', '', 1, 0, 1, '', 0, 0, '', 0, 30, '', 1734486345, 0, 0); +INSERT INTO `nl_menu` VALUES (11, '产品', 'ep:goods-filled', 'Product', '/product', '/my-gen/product/index', '', 1, 0, 1, '', 0, 0, '', 10, 1, '', 1747211554, 1747211701, 0); +INSERT INTO `nl_menu` VALUES (12, '商品分类', 'carbon:data-class', 'ProductClassification', '/product-classification', '/my-gen/product-classification/index', '', 1, 0, 1, '', 0, 0, '', 10, 50, '', 1747212037, 0, 0); +INSERT INTO `nl_menu` VALUES (13, '商品标签', 'fluent-emoji:label', 'ProductLabel', '/product-label', '/my-gen/product-label/index', '', 1, 0, 1, '', 0, 0, '', 10, 60, '', 1747213014, 0, 0); +INSERT INTO `nl_menu` VALUES (14, '商品图片', 'catppuccin:image', 'ProductImage', '/product-image', '/my-gen/product-image/index', '', 1, 0, 1, '', 0, 0, '', 10, 100, '', 1747614399, 0, 0); + +-- ---------------------------- +-- Table structure for nl_product +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product`; +CREATE TABLE `nl_product` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品名称', + `mall_id` int NOT NULL DEFAULT 0 COMMENT '商家ID', + `user_id` int NOT NULL DEFAULT 0 COMMENT '上传用户ID', + `introduction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '简介', + `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '封面图', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '详细说明', + `price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '价格', + `classification_id` int NOT NULL DEFAULT 0 COMMENT '产品分类', + `quantity_sold` int NOT NULL DEFAULT 0 COMMENT '已售数量', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '产品表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of nl_product +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_product_classification +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product_classification`; +CREATE TABLE `nl_product_classification` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类名称', + `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '分类图片', + `pid` int NOT NULL DEFAULT 0 COMMENT '父级分类', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '商品分类表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of nl_product_classification +-- ---------------------------- +INSERT INTO `nl_product_classification` VALUES (1, '服装鞋帽箱包类', 'http://127.0.0.1:18010/storage/spa/image/20250514/cc_upload_r9HVNOq19s5aFZKz682459e9cde8c.png', 0, 0, 1747212820, 0, 0); + +-- ---------------------------- +-- Table structure for nl_product_image +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product_image`; +CREATE TABLE `nl_product_image` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商品地址', + `product_id` int NOT NULL DEFAULT 0 COMMENT '商品ID', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '商品图片表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of nl_product_image +-- ---------------------------- + +-- ---------------------------- +-- Table structure for nl_product_label +-- ---------------------------- +DROP TABLE IF EXISTS `nl_product_label`; +CREATE TABLE `nl_product_label` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '标签名称', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0:正常 1:禁用', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '修改时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '商品标签表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of nl_product_label +-- ---------------------------- +INSERT INTO `nl_product_label` VALUES (1, '包邮', 0, 1747213158, 0, 0); +INSERT INTO `nl_product_label` VALUES (2, '7天无理由退货', 0, 1747213167, 0, 0); +INSERT INTO `nl_product_label` VALUES (3, '绝对正版', 0, 1747213198, 0, 0); + +-- ---------------------------- +-- Table structure for nl_role +-- ---------------------------- +DROP TABLE IF EXISTS `nl_role`; +CREATE TABLE `nl_role` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色名称', + `value` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色值', + `pid` int NOT NULL DEFAULT 0 COMMENT '上级角色', + `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '角色说明', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + `updated_at` int NOT NULL DEFAULT 0 COMMENT '更新时间', + `deleted_at` int NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_role +-- ---------------------------- +INSERT INTO `nl_role` VALUES (1, '超级管理员', 'admin', 0, '', 0, 0, 0); +INSERT INTO `nl_role` VALUES (2, '后台工作人员', 'admin user', 0, '负责ToB的工作和用户投诉', 1747210408, 0, 0); +INSERT INTO `nl_role` VALUES (3, '商家', 'merchant', 0, '入住的商家', 1747210437, 0, 0); +INSERT INTO `nl_role` VALUES (4, '商家客服', 'Merchant customer service', 0, '负责商家的客服工作', 1747210525, 0, 0); +INSERT INTO `nl_role` VALUES (5, '商家运营', 'Merchant operation', 0, '负责整体店铺的运营和管理,包括制定店铺的经营策略、规划商品品类、设定价格策略、策划营销活动等,以提升店铺的销售额和利润,同时还要分析销售数据,了解消费者行为和市场趋势,以便及时调整运营策略。', 1747210567, 0, 0); + +-- ---------------------------- +-- Table structure for nl_role_menu_relations +-- ---------------------------- +DROP TABLE IF EXISTS `nl_role_menu_relations`; +CREATE TABLE `nl_role_menu_relations` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', + `role_id` int NOT NULL DEFAULT 0 COMMENT '角色ID', + `menu_id` int NOT NULL DEFAULT 0 COMMENT '菜单ID', + `created_at` int NOT NULL DEFAULT 0 COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色权限绑定表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of nl_role_menu_relations +-- ---------------------------- +INSERT INTO `nl_role_menu_relations` VALUES (1, 1, 1, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (2, 1, 2, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (3, 1, 3, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (4, 1, 4, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (5, 1, 5, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (6, 1, 6, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (7, 1, 7, 1747033198); +INSERT INTO `nl_role_menu_relations` VALUES (8, 1, 8, 1747033198); + +SET FOREIGN_KEY_CHECKS = 1;