feat: add is_default field to product variants and implement default variant management logic in ProductService

This commit is contained in:
2026-07-01 10:02:26 -03:00
parent 83f42f3cf9
commit d6a17cb449
4 changed files with 47 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
#[Fillable([
'producto_id',
'stock',
'is_default',
])]
class ProductVariant extends Model
{
@@ -25,6 +26,7 @@ class ProductVariant extends Model
return [
'producto_id' => 'integer',
'stock' => 'integer',
'is_default' => 'boolean',
];
}