INIT: initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace Modules\Profiler\Entities;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class HttpLog extends Model
|
||||
{
|
||||
public $table = 'http_log';
|
||||
protected $fillable = [
|
||||
'method',
|
||||
'url',
|
||||
'time',
|
||||
'load_1',
|
||||
'load_5',
|
||||
'load_15'
|
||||
];
|
||||
|
||||
public function queries()
|
||||
{
|
||||
return $this->hasMany(QueryLog::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace Modules\Profiler\Entities;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class QueryLog extends Model
|
||||
{
|
||||
public $table = 'queries_log';
|
||||
protected $fillable = [
|
||||
'query',
|
||||
'bindings',
|
||||
'time',
|
||||
'http_log_id'
|
||||
];
|
||||
protected $casts = [
|
||||
'bindings' => 'array'
|
||||
];
|
||||
|
||||
public function httpLog()
|
||||
{
|
||||
return $this->belongsTo(HttpLog::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user