feat: spu
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\DbConnection\Model\Model;
|
||||
|
||||
/**
|
||||
@@ -24,8 +25,22 @@ class Cycle extends Model
|
||||
*/
|
||||
protected array $fillable = [];
|
||||
|
||||
protected array $guarded = [];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['id' => 'integer', 'is_use' => 'integer'];
|
||||
|
||||
const string CREATED_AT = 'create_time';
|
||||
const null UPDATED_AT = null;
|
||||
|
||||
/**
|
||||
* @param string $date
|
||||
* @return Builder|\Hyperf\Database\Model\Model|null
|
||||
*/
|
||||
public function getInfoByDate(string $date): \Hyperf\Database\Model\Model|Builder|null
|
||||
{
|
||||
return $this->where('dates',$date)->first();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user