2026-03-21 02:55:24 +08:00
|
|
|
<?php
|
|
|
|
|
// +----------------------------------------------------------------------
|
2026-03-29 11:22:52 +08:00
|
|
|
// | Author: ScottPan Team
|
2026-03-21 02:55:24 +08:00
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
namespace app\model\work;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use crmeb\basic\BaseModel;
|
|
|
|
|
use crmeb\traits\ModelTrait;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class WorkMedia
|
|
|
|
|
* @package app\model\work
|
|
|
|
|
*/
|
|
|
|
|
class WorkMedia extends BaseModel
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
use ModelTrait;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $name = 'work_media';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $key = 'id';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $autoWriteTimestamp = 'int';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param $query
|
|
|
|
|
* @param $value
|
|
|
|
|
*/
|
|
|
|
|
public function searchMd5PathAttr($query, $value)
|
|
|
|
|
{
|
|
|
|
|
$query->where('md5_path', $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param $query
|
|
|
|
|
* @param $value
|
|
|
|
|
*/
|
|
|
|
|
public function searchTypeAttr($query, $value)
|
|
|
|
|
{
|
|
|
|
|
$query->where('type', $value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|