40 lines
717 B
PHP
Executable File
40 lines
717 B
PHP
Executable File
<?php
|
|
/**
|
|
* @createtime 2023/4/26
|
|
* @author wild
|
|
* @copyright PhpStorm
|
|
*/
|
|
|
|
|
|
namespace App\Model\Zq;
|
|
|
|
|
|
use App\Enums\SaleState;
|
|
use App\Model\BaseModel;
|
|
use App\Service\JingcaiLogoService;
|
|
|
|
class JczqGuanOdds extends BaseModel
|
|
{
|
|
protected $appends = [
|
|
'team_logo_url',
|
|
'odds_state',
|
|
];
|
|
|
|
public function team() {
|
|
return $this->belongsTo(ZqTeam::class, 'team_id', 'team_id');
|
|
}
|
|
|
|
public function getOddsStateAttribute()
|
|
{
|
|
return $this->order_state;
|
|
}
|
|
|
|
public function getTeamLogoUrlAttribute()
|
|
{
|
|
if (!$this->team) {
|
|
return '';
|
|
}
|
|
return JingcaiLogoService::zqCountryLarge($this->team->country);
|
|
}
|
|
}
|