feat(models): 添加模型类文档注释并实现MarkdownFileVO扩展功能
- 为Grouping、Image、MarkdownFile、RegistrationCode、SystemSetting、User等模型类添加详细的PHP文档注释 - 为各个模型类添加公共属性定义,包括分组、图片、笔记、注册码、系统设置和用户相关字段 - 实现MarkdownFileVO视图对象类,扩展MarkdownFile模型以支持分组名称查询 - 在MarkdownController中使用MarkdownFileVO替代原模型获取包含分组名称的数据 - 添加TrashItemVo视图对象用于回收站项目的展示 - 添加UpdatePasswordBo业务对象用于密码更新请求处理 - 为RegistrationCode模型添加按ID和代码查询的方法及详细验证功能 - 为SystemSetting模型添加带描述的设置获取和设置方法
This commit is contained in:
@@ -5,10 +5,40 @@ namespace App\Models;
|
||||
use App\Utils\Database;
|
||||
use PDO;
|
||||
|
||||
/**
|
||||
* MarkdownFile - 笔记文件模型
|
||||
*
|
||||
* 数据库表: markdown_file
|
||||
* 主要字段:
|
||||
* - id (Long) - 笔记ID,自增主键
|
||||
* - grouping_id (Long) - 所属分组ID
|
||||
* - title (String) - 笔记标题
|
||||
* - file_name (String) - 文件名(带.md后缀)
|
||||
* - content (String) - Markdown内容
|
||||
* - created_at (DateTime) - 创建时间
|
||||
* - updated_at (DateTime) - 更新时间
|
||||
* - is_deleted (Integer) - 逻辑删除标志
|
||||
* - deleted_at (DateTime) - 删除时间
|
||||
* - deleted_by (Long) - 删除人ID
|
||||
* - is_private (Integer) - 是否私密(0-公开,1-私密)
|
||||
*/
|
||||
class MarkdownFile
|
||||
{
|
||||
private $db;
|
||||
|
||||
// 笔记属性
|
||||
public $id;
|
||||
public $groupingId;
|
||||
public $title;
|
||||
public $fileName;
|
||||
public $content;
|
||||
public $createdAt;
|
||||
public $updatedAt;
|
||||
public $isDeleted;
|
||||
public $deletedAt;
|
||||
public $deletedBy;
|
||||
public $isPrivate;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->db = Database::getInstance()->getConnection();
|
||||
|
||||
Reference in New Issue
Block a user