From 097a5f9e524acd965fa2abcfd18db30fc3f00ddb Mon Sep 17 00:00:00 2001
From: huangsijun <1773182001@qq.com>
Date: Thu, 11 Dec 2025 16:25:55 +0800
Subject: [PATCH] 修改阿里云上传的

---
 admin/app/common/model/release/Project.php |   70 +++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/admin/app/common/model/release/Project.php b/admin/app/common/model/release/Project.php
new file mode 100644
index 0000000..7581ba8
--- /dev/null
+++ b/admin/app/common/model/release/Project.php
@@ -0,0 +1,70 @@
+<?php
+
+namespace app\common\model\plus\release;
+
+use app\common\model\BaseModel;
+
+/**
+ * 项目模型
+ */
+class Project extends BaseModel
+{
+    protected $name = 'release_project';
+    protected $pk = 'project_id';
+
+
+    /**
+     * 关联上传图片表
+     */
+    public function image()
+    {
+        return $this->hasMany('app\\common\\model\\plus\\release\\ReleaseProjectImage', 'project_id', 'id')->order(['id' => 'asc']);
+    }
+
+    /**
+     * 关联分类
+     * @return \think\model\relation\BelongsTo
+     */
+    public function category()
+    {
+        return $this->belongsTo('app\\common\\model\\plus\\release\\ReleaseCategory','category_id','category_id');
+    }
+
+     /**
+     * 关联
+     * @return \think\model\relation\BelongsTo
+     */
+    public function user()
+    {
+        return $this->belongsTo('app\\common\\model\\user\\User','user_id','user_id');
+    }
+
+
+
+    /**
+     * 关联多标签表
+     */
+    public function tag()
+    {
+        return $this->hasMany('app\\common\\model\\plus\\release\\Tag', 'tag_id', 'tag_id');
+    }
+
+    /**
+     * 获取详情
+     */
+    public static function detail($project_id)
+    {
+        return (new static())->with(['image'])->find($project_id);
+    }
+
+    /**
+     * 获取列表记录
+     */
+    public function getAll()
+    {
+        return $this->where('is_delete', '=', 0)
+            ->field('project_id,name')
+            ->order(['sort' => 'asc', 'create_time' => 'asc'])
+            ->select();
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.2