28 lines
544 B
PHP
Executable File
28 lines
544 B
PHP
Executable File
<?php
|
|
/**
|
|
* @createtime 2023/4/26
|
|
* @author wild
|
|
* @copyright PhpStorm
|
|
*/
|
|
|
|
|
|
namespace App\Model\Zq;
|
|
|
|
use App\Model\BaseModel;
|
|
|
|
class JczqGuanYa extends BaseModel
|
|
{
|
|
protected $casts = [
|
|
'options' => 'array',
|
|
];
|
|
|
|
public function odds() {
|
|
return $this->hasMany(JczqGuanYaOdds::class, 'jczq_guan_ya_id', 'id')->with(['teama', 'teamb']);
|
|
}
|
|
|
|
public function getCloseTime($earlySecond) {
|
|
$time = strtotime($this->close_time);
|
|
return date('Y-m-d H:i:s', $time - $earlySecond);
|
|
}
|
|
}
|