- 按 docs/renew-code-comment.md 将 PHP 文件头改为带边框的 Author 注释\n- 注释中的 crmeb.com 替换为 uj345.cn(代码字符串中的外链未改)\n- 新增 docs/renew-code-comment.md 说明 Made-with: Cursor
54 lines
952 B
PHP
54 lines
952 B
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Author: ScottPan Team
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\model\system\config;
|
|
|
|
|
|
use crmeb\basic\BaseModel;
|
|
|
|
/**
|
|
* 云存储
|
|
* Class SystemStorage
|
|
* @package app\model\system\config
|
|
*/
|
|
class SystemStorage extends BaseModel
|
|
{
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $name = 'system_storage';
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $pk = 'id';
|
|
|
|
/**
|
|
* @var bool
|
|
*/
|
|
protected $autoWriteTimestamp = false;
|
|
|
|
/**
|
|
* @param $query
|
|
* @param $value
|
|
*/
|
|
public function searchNameAttr($query, $value)
|
|
{
|
|
$query->where('name', $value);
|
|
}
|
|
|
|
/**
|
|
* @param $query
|
|
* @param $value
|
|
*/
|
|
public function searchTypeAttr($query, $value)
|
|
{
|
|
if ($value !== '') {
|
|
$query->where('type', $value);
|
|
}
|
|
}
|
|
}
|