abschlussprojekt-device-man.../device-app/app/Models/LocationTransaction.php
2023-03-28 22:17:54 +02:00

29 lines
671 B
PHP

<?php
namespace App\Models;
use App\Models\Device;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class LocationTransaction extends Model
{
use HasFactory;
/**
* The primary key associated with the devices table.
* @var string
*/
protected $primaryKey = 'location_transaction_id';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = ['location_transaction_id', 'room_code', 'timestamp_located_since', 'device_id'];
public function device() {
return $this->belongsTo(Device::class, 'device_id');
}
}