Skip to content

Add MenuUserCommunicationPreference entity, EF config, migration #1154

Open

Description

@dgee2

Goal

Add the database entity that persists a user's opt-in/out preference per communication category.

Spec reference

docs/specs/recipe-creation-target-architecture.md — §"Related recipe usage capabilities – Communication preferences"

Implementation notes

  • New MenuUserCommunicationPreference entity:
    • Composite PK: UserId (int FK → MenuUser) + Category (nvarchar(100))
    • IsOptedIn (bit, not null)
    • UpdatedAtUtc (datetime2)
  • Initial known categories (define as constants): PublicationApprovals, ShareAndAccess, DiaryReminders, ShoppingDigest, CollectionRecommendations, ProductUpdates
  • EF config and migration

Acceptance criteria

  • Table created with correct composite PK and cascade delete from MenuUser

Testing

  • Unit tests for entity configuration

Part of#1108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions