feat: rename featured_variants to group_items and update related references
This commit is contained in:
27
app/Domains/Catalog/Models/GroupItem.php
Normal file
27
app/Domains/Catalog/Models/GroupItem.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user