29 lines
697 B
PHP
29 lines
697 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class PurchasingInformation extends Model
|
||
|
{
|
||
|
use HasFactory;
|
||
|
|
||
|
/**
|
||
|
* The primary key associated with the devices table.
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $primaryKey = 'purchasing_information_id';
|
||
|
|
||
|
/**
|
||
|
* The attributes that are mass assignable.
|
||
|
*
|
||
|
* @var array<int, string>
|
||
|
*/
|
||
|
protected $fillable = ['purchasing_information_id', 'price', 'timestamp_warranty_end', 'timestamp_purchase', 'cost_centre', 'seller', 'device_id'];
|
||
|
|
||
|
public function device() {
|
||
|
return $this->belongsTo(Device::class, 'device_id');
|
||
|
}
|
||
|
}
|