<?php

namespace App\Models;

use App\Models\Device;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class OwnerTransaction extends Model
{
    use HasFactory;

    /**
     * The primary key associated with the devices table.
     * @var string
     */
    protected $primaryKey = 'owner_transaction_id';

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = ['owner_transaction_id', 'rz_username', 'timestamp_owner_since', 'device_id'];

    public function device() {
        return $this->belongsTo(Device::class, 'device_id');
    }

}