vat_wms/app/Models/StockPosition.php
2025-05-13 12:32:55 +02:00

48 lines
875 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class StockPosition extends Model
{
use HasFactory;
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'stock_positions';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'line',
'rack',
'shelf',
'position',
];
/**
* Get the full position string.
*
* @return string
*/
public function getFullPositionAttribute(): string
{
return "{$this->line}-{$this->rack}-{$this->shelf}-{$this->position}";
}
}