jingcai-php/app/Model/Zq/CtzqSfc.php

29 lines
510 B
PHP
Executable File

<?php
/**
* @createtime 2023/4/26
* @author wild
* @copyright PhpStorm
*/
namespace App\Model\Zq;
use App\Model\BaseModel;
class CtzqSfc extends BaseModel
{
protected $casts = [
'matchs' => 'array',
];
public function matches() {
return $this->hasMany(CtzqSfcMatch::class, 'ctzq_sfc_id', 'id');
}
public function getCloseTime($earlySecond) {
$time = strtotime($this->end_time);
return date('Y-m-d H:i:s', $time - $earlySecond);
}
}