31 lines
497 B
PHP
31 lines
497 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BotLog extends Model
|
|
{
|
|
protected $fillable = [
|
|
'bot_id',
|
|
'started_at',
|
|
'finished_at',
|
|
'status',
|
|
'output',
|
|
'error',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'started_at' => 'datetime',
|
|
'finished_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function bot()
|
|
{
|
|
return $this->belongsTo(Bot::class);
|
|
}
|
|
}
|