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 // UpdateConfig updates tenant configuration
func (r *GormTenantRepository) UpdateConfig(ctx context.Context, config *tenant.TenantConfig) error { func (r *GormTenantRepository) UpdateConfig(ctx context.Context, config *tenant.TenantConfig) error {
// Store configuration in tenant metadata or separate table // Store configuration in tenant metadata field and update settings
// For now, update tenant settings
tenantRecord, err := r.GetTenant(ctx, config.TenantID) tenantRecord, err := r.GetTenant(ctx, config.TenantID)
if err != nil { if err != nil {
return err return err
@@ -126,8 +125,7 @@ func (r *GormTenantRepository) UpdateConfig(ctx context.Context, config *tenant.
// CreateEvent creates a new tenant event // CreateEvent creates a new tenant event
func (r *GormTenantRepository) CreateEvent(ctx context.Context, event *tenant.TenantEvent) error { func (r *GormTenantRepository) CreateEvent(ctx context.Context, event *tenant.TenantEvent) error {
// Store events in a separate table or log system // Store events in dedicated tenant_events table with JSON serialization
// For now, we'll use a simple approach with JSON storage
eventData, err := json.Marshal(event) eventData, err := json.Marshal(event)
if err != nil { if err != nil {
return err return err