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,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SalesOrderItem extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['sales_order_id', 'item_id', 'quantity', 'price', 'total_amount', 'quantity_delivered'];
|
||||
|
||||
protected $casts = [
|
||||
'quantity' => 'decimal:2',
|
||||
'price' => 'decimal:2',
|
||||
'total_amount' => 'decimal:2',
|
||||
'quantity_delivered' => 'decimal:2',
|
||||
];
|
||||
|
||||
public function salesOrder()
|
||||
{
|
||||
return $this->belongsTo(SalesOrder::class);
|
||||
}
|
||||
|
||||
public function item()
|
||||
{
|
||||
return $this->belongsTo(Item::class);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user