Files
portal-api/app/Models/ProductPricings.php
T
2026-02-06 16:18:15 +07:00

37 lines
687 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ProductPricings extends Model
{
use HasFactory;
protected $table = 'product_pricings';
protected $fillable = [
'product_id',
'billing_cycle',
'price',
'price_sale',
'currency',
'is_active',
];
protected $casts = [
'price' => 'decimal:2',
'price_sale' => 'decimal:2',
'is_active' => 'boolean',
];
/**
* Relationship: Pricing belongs to a Product
*/
public function product()
{
return $this->belongsTo(Product::class);
}
}