34 lines
603 B
PHP
Executable File
34 lines
603 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Model;
|
|
|
|
use App\Enums\BoolEnum;
|
|
use App\Enums\LottType;
|
|
use App\Utils\Helps;
|
|
use App\Utils\ThrowException;
|
|
|
|
|
|
class Qxc extends BaseModel
|
|
{
|
|
protected $casts = [
|
|
'result' => 'array',
|
|
];
|
|
|
|
protected $appends = [
|
|
'result_time',
|
|
];
|
|
|
|
public function getResultTimeAttribute($key)
|
|
{
|
|
if ($this->updated_at) {
|
|
return $this->updated_at;
|
|
}
|
|
return '';
|
|
}
|
|
|
|
public function getCloseTime($earlySecond) {
|
|
$time = strtotime($this->close_time);
|
|
return date('Y-m-d H:i:s', $time - $earlySecond);
|
|
}
|
|
}
|