feat: rename featured_variants to group_items and update related references

This commit is contained in:
2026-07-17 14:31:05 -03:00
parent 84c9fa4c9d
commit 615eacea91
8 changed files with 40 additions and 18 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Domains\Catalog\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class GroupItem extends Model
{
protected $table = 'group_items';
protected $fillable = [
'featured_group_id',
'product_variant_id',
'order',
];
public function featuredGroup(): BelongsTo
{
return $this->belongsTo(FeaturedGroup::class);
}
public function variant(): BelongsTo
{
return $this->belongsTo(ProductVariant::class, 'product_variant_id');
}
}