Initial: Laravel 13 setup with multi-tenant schema
This commit is contained in:
commit
a78a50ef0c
69 changed files with 10805 additions and 0 deletions
10
app/Models/Event.php
Normal file
10
app/Models/Event.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
class Event extends Model {
|
||||
public $timestamps = false;
|
||||
protected $fillable = ['device_id','event_type','severity','payload','occurred_at'];
|
||||
protected $casts = ['payload'=>'array','occurred_at'=>'datetime'];
|
||||
public function device(): BelongsTo { return $this->belongsTo(Device::class); }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue