feat: 添加附件(下载管理)分类分页/详情/新增/更新/设置排序值/删除接口

This commit is contained in:
2025-02-21 15:49:39 +08:00
parent 49eb6a8d3c
commit c66d7a6761
5 changed files with 308 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
declare (strict_types = 1);
namespace app\admin\model\v1;
use app\common\model\AttachmentCategoryBaseModel;
use think\model\concern\SoftDelete;
/**
* 附件(下载管理)分类模型
* @mixin \think\Model
*/
class AttachmentCategoryModel extends AttachmentCategoryBaseModel
{
// 启用软件删除
use SoftDelete;
// 软删除字段
protected $deleteTime = 'deleted_at';
// 自动写入时间格式
protected $autoWriteTimestamp = 'datetime';
// 关联附件
public function attachment()
{
return $this->hasMany(AttachmentModel::class, 'category_id', 'id');
}
}