vat_wms/app/Models/StockEntries2Section.php
2025-06-02 07:36:24 +02:00

33 lines
799 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class StockEntries2Section extends Model
{
protected $table = 'stock_entries2section';
public $incrementing = false;
public $timestamps = true;
// Composite PKs arent natively supported by Eloquent;
// you can override getKey() / setKey*() if needed, or treat this as a pure pivot.
protected $primaryKey = null;
protected $fillable = [
'entry_id',
'section_id',
'count',
];
public function section()
{
return $this->belongsTo(StockSection::class, 'section_id', 'section_id');
}
// assuming you have an App\Models\StockEntry model
public function entry()
{
return $this->belongsTo(StockEntry::class, 'entry_id', 'id');
}
}