feat(tenant): add site title and favicon support for tenants and website types

This commit is contained in:
2026-08-14 08:55:59 -03:00
parent 4de08ff2f2
commit bfdaf1c38b
17 changed files with 355 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
'codigo',
'nombre',
'dominio',
'site_title',
'primary_color',
'secondary_color',
'danger_color',
@@ -29,6 +30,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
'footer_bg_color',
'header_logo_id',
'footer_logo_id',
'favicon_id',
'header_bg_image_id',
'footer_bg_image_id',
'website_type_code',
@@ -101,6 +103,14 @@ class Tenant extends Model
return $this->belongsTo(Attachment::class, 'footer_logo_id');
}
/**
* @return BelongsTo<Attachment, $this>
*/
public function favicon(): BelongsTo
{
return $this->belongsTo(Attachment::class, 'favicon_id');
}
/**
* @return BelongsTo<Attachment, $this>
*/

View File

@@ -14,6 +14,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
'nombre',
'dominio',
'scanner_domain',
'site_title',
'primary_color',
'secondary_color',
'danger_color',
@@ -27,6 +28,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
'login_header_footer_color',
'site_logo',
'footer_logo',
'favicon_id',
])]
class WebsiteType extends Model
{
@@ -50,6 +52,14 @@ class WebsiteType extends Model
return $this->belongsTo(Attachment::class, 'footer_logo');
}
/**
* @return BelongsTo<Attachment, $this>
*/
public function favicon(): BelongsTo
{
return $this->belongsTo(Attachment::class, 'favicon_id');
}
/**
* @return HasMany<WebsiteTypeExtra, $this>
*/