IAV-260/Refactor: Simplify notification config to one-to-one and scope FAQ categories per agent
Summary
This MR refactors entity relationships for AgentNotificationConfig and FaqCategory to better align with business requirements.
Changes
1. AgentNotificationConfig - One-to-One Relationship
-
Before:
@ManyToOne- An agent could have multiple notification configs -
After:
@OneToOne- Each agent has exactly one notification configuration
2. CustomerCareAgent Updates
- Changed
notificationConfigs(List) →notificationConfig(single entity) - Removed
integrationsrelationship (AgentIntegration)
3. FaqCategory - Per-Agent Scoping
- Added
customerCareAgentforeign key relationship - Removed
uniqueconstraint onnamecolumn - FAQ categories are now scoped per agent, allowing different agents to have categories with the same name
Breaking Changes
-
CustomerCareAgent.getNotificationConfigs()→getNotificationConfig() -
CustomerCareAgent.getIntegrations()removed -
FaqCategorynow requires aCustomerCareAgentreference
Closes IAV-260