18 lines
376 B
PHP
18 lines
376 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ItemCode extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['need_serial_number' => 'boolean', 'minimum_stock' => 'decimal:2', 'is_active' => 'boolean'];
|
|
}
|
|
|
|
public function items() { return $this->hasMany(WarehouseItem::class); }
|
|
}
|