41 lines
878 B
PHP
41 lines
878 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class StockHandling extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* Indicates if the model should be timestamped.
|
|
*
|
|
* @var bool
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'physical_item_id',
|
|
'field_updated',
|
|
'value_prev',
|
|
'value_new',
|
|
];
|
|
|
|
/**
|
|
* Get the physical item associated with this stock handling record.
|
|
*
|
|
* Note: This requires configuring proper database connections to work across connections.
|
|
*/
|
|
public function physicalItem()
|
|
{
|
|
return $this->belongsTo(PhysicalItem::class, 'physical_item_id')->on('vat_warehouse');
|
|
}
|
|
}
|