mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-10-22 20:52:18 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user