Skip to content

Add RecipeMetricsSnapshot entity and migration #1148

Open

Description

@dgee2

Goal

Create the RecipeMetricsSnapshot table that will hold aggregated engagement counters per recipe.

Spec reference

docs/specs/recipe-creation-target-architecture.md — §"Related recipe usage capabilities – Metrics and engagement"

Implementation notes

  • New RecipeMetricsSnapshot entity:
    • RecipeId (int PK/FK → Recipe.Id, cascade delete)
    • PublicViewCount (int, default 0)
    • AuthenticatedViewCount (int, default 0)
    • FavoriteCount (int, default 0)
    • PlannedCount (int, default 0)
    • CookedCount (int, default 0)
    • LastViewedAtUtc (datetime2, nullable)
    • LastCookedAtUtc (datetime2, nullable)
  • EF Core config and migration

Acceptance criteria

  • Migration creates table with correct columns and cascade delete

Testing

  • Unit tests for entity configuration

Part of#1106

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