chinh sua theo tieu chuan phan mem BDS_1

This commit is contained in:
2026-04-28 08:49:28 +00:00
parent e229da5e8c
commit 0712046f4b
18 changed files with 623 additions and 59 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\Pivot;
class SalesPhaseProduct extends Pivot
{
use HasUuids, HasFactory;
protected $table = 'sales_phase_products';
protected $guarded = [];
protected $casts = [
'sale_price' => 'decimal:2',
'land_value' => 'decimal:2',
'foundation_value' => 'decimal:2',
'discount_details' => 'array',
];
public function salesPhase()
{
return $this->belongsTo(SalesPhase::class);
}
public function product()
{
return $this->belongsTo(Product::class);
}
}