feat: 附件(软件/手册下载)
This commit is contained in:
25
app/index/model/AttachmentCategoryModel.php
Normal file
25
app/index/model/AttachmentCategoryModel.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\index\model;
|
||||
|
||||
use app\common\model\AttachmentCategoryBaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 附件分类模型
|
||||
* @mixin \think\Model
|
||||
*/
|
||||
class AttachmentCategoryModel extends AttachmentCategoryBaseModel
|
||||
{
|
||||
// 启用软删除
|
||||
use SoftDelete;
|
||||
// 软删除时间字段名
|
||||
protected $deleteTime = 'deleted_at';
|
||||
|
||||
// 所属语言范围查询
|
||||
public function scopeLanguage($query, $language)
|
||||
{
|
||||
return $query->where('language_id', '=', $language);
|
||||
}
|
||||
}
|
||||
19
app/index/model/AttachmentModel.php
Normal file
19
app/index/model/AttachmentModel.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\index\model;
|
||||
|
||||
use app\common\model\AttachmentBaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 附件模型
|
||||
* @mixin \think\Model
|
||||
*/
|
||||
class AttachmentModel extends AttachmentBaseModel
|
||||
{
|
||||
// 启用软删除
|
||||
use SoftDelete;
|
||||
// 软删除时间字段名
|
||||
protected $deleteTime = 'deleted_at';
|
||||
}
|
||||
Reference in New Issue
Block a user