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,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GoodsReceiptNote extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['grn_number', 'purchase_order_id', 'supplier_id', 'warehouse_id', 'received_date', 'status', 'notes', 'received_by'];
|
||||
|
||||
protected $casts = ['received_date' => 'date'];
|
||||
|
||||
public function purchaseOrder()
|
||||
{
|
||||
return $this->belongsTo(PurchaseOrder::class);
|
||||
}
|
||||
|
||||
public function supplier()
|
||||
{
|
||||
return $this->belongsTo(Supplier::class);
|
||||
}
|
||||
|
||||
public function warehouse()
|
||||
{
|
||||
return $this->belongsTo(Warehouse::class);
|
||||
}
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany(GrnItem::class);
|
||||
}
|
||||
|
||||
public function receivedBy()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\User::class, 'received_by');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user