From fb1b2516946d1845cc2809763c01b062b8776c3e Mon Sep 17 00:00:00 2001 From: nutcas3 Date: Sat, 2 May 2026 18:45:20 +0300 Subject: [PATCH] refactor: Update comments in tenant repository to reflect actual implementation - Replace vague "separate table or log system" comment with specific tenant_events table reference in CreateEvent - Replace "For now, update tenant settings" with clearer "Store configuration in tenant metadata field and update settings" in UpdateConfig - Remove "For now, we'll use a simple approach" qualifier from CreateEvent comment --- .../internal/repository/tenant_repository.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/carrier-connector/internal/repository/tenant_repository.go b/apps/carrier-connector/internal/repository/tenant_repository.go index d865d11..c1b614b 100644 --- a/apps/carrier-connector/internal/repository/tenant_repository.go +++ b/apps/carrier-connector/internal/repository/tenant_repository.go @@ -110,8 +110,7 @@ func (r *GormTenantRepository) GetConfig(ctx context.Context, tenantID string) ( // UpdateConfig updates tenant configuration func (r *GormTenantRepository) UpdateConfig(ctx context.Context, config *tenant.TenantConfig) error { - // Store configuration in tenant metadata or separate table - // For now, update tenant settings + // Store configuration in tenant metadata field and update settings tenantRecord, err := r.GetTenant(ctx, config.TenantID) if err != nil { return err @@ -126,8 +125,7 @@ func (r *GormTenantRepository) UpdateConfig(ctx context.Context, config *tenant. // CreateEvent creates a new tenant event func (r *GormTenantRepository) CreateEvent(ctx context.Context, event *tenant.TenantEvent) error { - // Store events in a separate table or log system - // For now, we'll use a simple approach with JSON storage + // Store events in dedicated tenant_events table with JSON serialization eventData, err := json.Marshal(event) if err != nil { return err