Implemented Dynamic Items for data to be sent to polled systems based on data in db, like stats/nodelists
This commit is contained in:
32
app/Models/Dynamic.php
Normal file
32
app/Models/Dynamic.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Rennokki\QueryCache\Traits\QueryCacheable;
|
||||
|
||||
use App\Casts\CollectionOrNull;
|
||||
|
||||
class Dynamic extends Model
|
||||
{
|
||||
use SoftDeletes,QueryCacheable;
|
||||
|
||||
protected $casts = [
|
||||
'arguments' => CollectionOrNull::class,
|
||||
'next_at' => 'datetime:Y-m-d H:i:s',
|
||||
'start_date' => 'datetime:Y-m-d',
|
||||
'start_time' => 'datetime:H:i:s',
|
||||
];
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
public function address()
|
||||
{
|
||||
return $this->belongsTo(Address::class);
|
||||
}
|
||||
|
||||
/* ATTRIBUTES */
|
||||
|
||||
/* METHODS */
|
||||
}
|
Reference in New Issue
Block a user