chore: initial commit of existing codebase
This commit is contained in:
commit
11e94889b2
292 files changed
+38586
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Supplier extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'supplier_code', 'name', 'category',
|
||||
'contact_person', 'email', 'secondary_email',
|
||||
'phone', 'phone2', 'whatsapp',
|
||||
'address', 'website',
|
||||
'tax_number', 'credit_terms', 'credit_days',
|
||||
'is_active', 'remarks',
|
||||
];
|
||||
|
||||
protected $casts = ['is_active' => 'boolean'];
|
||||
|
||||
public function purchaseOrders()
|
||||
{
|
||||
return $this->hasMany(PurchaseOrder::class);
|
||||
}
|
||||
|
||||
public function invoices()
|
||||
{
|
||||
return $this->hasMany(SupplierInvoice::class);
|
||||
}
|
||||
|
||||
public function payments()
|
||||
{
|
||||
return $this->hasMany(SupplierPayment::class);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user