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
This commit is contained in:
nutcas3
2026-05-02 18:45:20 +03:00
parent ef4e8a05cd
commit fb1b251694
@@ -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