feat(tenant): separate admin and storefront website types
This commit is contained in:
@@ -42,7 +42,8 @@ use Illuminate\Support\Facades\Schema;
|
||||
'favicon_id',
|
||||
'header_bg_image_id',
|
||||
'footer_bg_image_id',
|
||||
'website_type_code',
|
||||
'admin_website_type_code',
|
||||
'storefront_website_type_code',
|
||||
'search_product_layout',
|
||||
'search_group_layout',
|
||||
'search_items_per_page',
|
||||
@@ -210,11 +211,17 @@ class Tenant extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<WebsiteType, $this>
|
||||
* @return BelongsTo<AdminWebsiteType, $this>
|
||||
*/
|
||||
public function websiteType(): BelongsTo
|
||||
public function adminWebsiteType(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(WebsiteType::class, 'website_type_code', 'codigo');
|
||||
return $this->belongsTo(AdminWebsiteType::class, 'admin_website_type_code', 'codigo');
|
||||
}
|
||||
|
||||
/** @return BelongsTo<StorefrontWebsiteType, $this> */
|
||||
public function storefrontWebsiteType(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(StorefrontWebsiteType::class, 'storefront_website_type_code', 'codigo');
|
||||
}
|
||||
|
||||
public function catalogItems(): HasMany
|
||||
|
||||
Reference in New Issue
Block a user