feat: add is_default field to product variants and implement default variant management logic in ProductService
This commit is contained in:
@@ -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',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user