Generate the models and migrations for incoming invoices.
This commit is contained in:
38
app/Models/Supplier.php
Normal file
38
app/Models/Supplier.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Supplier extends Model
|
||||
{
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'registration_name',
|
||||
'email',
|
||||
'address',
|
||||
'city',
|
||||
'zip',
|
||||
'country_code',
|
||||
'tax_fc',
|
||||
'tax_vat',
|
||||
'contact_name',
|
||||
'contact_phone',
|
||||
'contact_email',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the supplier's incoming invoices.
|
||||
*/
|
||||
public function invoices(): HasMany
|
||||
{
|
||||
return $this->hasMany(Incoming::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user