feat : site

This commit is contained in:
2024-11-12 15:40:33 +08:00
parent 82dd7450af
commit 900d98234b
7 changed files with 169 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ namespace App\Model;
use App\Constants\Common\OssObjectCode;
use Hyperf\Collection\Collection;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
use function Hyperf\Config\config;
@@ -93,6 +94,15 @@ class OssObject extends Model
return $this->whereIn('id', $ids)->get();
}
/**
* @param int $id
* @return Builder|\Hyperf\Database\Model\Model|null
*/
public function getInfoById(int $id): \Hyperf\Database\Model\Model|Builder|null
{
return $this->where('id', $id)->first();
}
/**
* 根据is_enabled获取传入时间前无效资源id
* @param $time