feat: implement Attachment domain for file storage and integrate into Tenant service for logo management

This commit is contained in:
2026-06-29 09:43:46 -03:00
parent 67bc9e6cb4
commit b0508d79b3
9 changed files with 2 additions and 179 deletions

View File

@@ -55,14 +55,6 @@ class TenantService
/** @var Tenant $tenant */
$tenant = Tenant::query()->create($data);
if ($headerAttachmentId) {
$tenant->attachments()->attach($headerAttachmentId);
}
if ($footerAttachmentId) {
$tenant->attachments()->attach($footerAttachmentId);
}
return $tenant;
});
}
@@ -94,7 +86,6 @@ class TenantService
if ($attachment) {
$tenant->header_logo_id = $attachment->id;
$tenant->attachments()->attach($attachment->id);
} else {
$tenant->header_logo_id = null;
}
@@ -111,7 +102,6 @@ class TenantService
if ($attachment) {
$tenant->footer_logo_id = $attachment->id;
$tenant->attachments()->attach($attachment->id);
} else {
$tenant->footer_logo_id = null;
}