41 lines
801 B
PHP
41 lines
801 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Supplier extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The database connection that should be used by the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $connection = 'vat_warehouse';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'description',
|
|
'ext_id',
|
|
'created_by',
|
|
'updated_by'
|
|
];
|
|
|
|
/**
|
|
* Get the stock entries for this supplier.
|
|
*/
|
|
public function stockEntries(): HasMany
|
|
{
|
|
return $this->hasMany(PhysicalItem2Stock::class);
|
|
}
|
|
}
|