Laravel-GPS-API/app/Models/Command.php

22 lines
442 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Command extends Model
{
protected $table = 'command_queue';
protected $fillable = [
'device_id','command_type','payload','priority','status',
'not_before_at','expires_at','created_by_user_id',
];
protected $casts = [
'payload' => 'array',
'not_before_at' => 'datetime',
'expires_at' => 'datetime',
];
}