28 lines
574 B
PHP
28 lines
574 B
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class StockPosition extends Model
|
|
{
|
|
protected $table = 'stock_position';
|
|
protected $primaryKey = 'position_id';
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = [
|
|
'position_symbol',
|
|
'position_name',
|
|
'shelf_id',
|
|
];
|
|
|
|
public function shelf()
|
|
{
|
|
return $this->belongsTo(StockShelf::class, 'shelf_id', 'shelf_id');
|
|
}
|
|
|
|
public function sections()
|
|
{
|
|
return $this->hasMany(StockSection::class, 'position_id', 'position_id');
|
|
}
|
|
}
|