Skip to content

feat: add KnowledgeLevelId and JobSectorId to content entities#63

Merged
Rashed99Azm merged 1 commit into
develop-backendfrom
feat/add-content-interest-topic-links
Jun 16, 2026
Merged

feat: add KnowledgeLevelId and JobSectorId to content entities#63
Rashed99Azm merged 1 commit into
develop-backendfrom
feat/add-content-interest-topic-links

Conversation

@Rashed99Azm

Copy link
Copy Markdown
Collaborator

Summary

Adds KnowledgeLevelId and JobSectorId (nullable Guid?) to content entities (News, Events, Resources) to enable interest-based sorting and filtering. Both fields reference InterestTopic entries with categories "knowledge_assessment" and "job_sector".

Changes

Domain & Data

  • Add KnowledgeLevelId / JobSectorId to News, Event, Resource entities
  • Add parameters to factory methods and UpdateContent methods
  • Add EF Core configurations
  • Migration: 20260614113707_AddContentInterestTopicLinks

Public API — Listing Endpoints

  • Add KnowledgeLevelId / JobSectorId query params to 3 public listing endpoints
  • Auto-detect from current user's profile when no params provided (anonymous = unfiltered)
  • Matching content is sorted first, followed by non-matching/untagged
  • Updated query records, DTOs, and handlers

Admin API — Create/Edit

  • Add fields to 6 command records and handlers (News, Events, Resources)
  • Updated API request bodies and internal endpoint definitions

Country Content Request Flow

  • Add fields to SubmitCountryContentRequestCommandHandler
  • Add fields to CountryContentRequestDto and mapper
  • Add fields to CountryContentRequestApprovedContentHandler

Permissions

  • Add Resource.Center.View to permissions.yaml
  • Update PermissionsYamlSchemaTests count (57 → 58)

Fixes

  • Fix PublicNewsDto / PublicEventDto / PublicResourceDto construction in GetById handlers
  • Fix UserMutationTests — rename TopicId to InterestTopicId

- Add KnowledgeLevelId/JobSectorId (Guid?) to News, Event, Resource
  domain entities, factory methods, UpdateContent methods, and EF configs
- Add migration AddContentInterestTopicLinks
- Add fields to ContentBody DTOs, CountryContentRequest flow
- Add Resource.Center.View permission
- Add filtering/sorting to public listing endpoints with auto-detect
- Add fields to admin create/edit commands, handlers, and endpoints
- Fix PublicNewsDto/PublicEventDto/PublicResourceDto in GetById handlers
- Fix UserMutationTests TopicId -> InterestTopicId
@Rashed99Azm Rashed99Azm merged commit 8e0e089 into develop-backend Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants