Files
Febe/src/Febe.Core/Domain/Highlight.cs
T
Claude 3aeaa17da7 M1 Dati e libreria: modello, archivi SQLite con scrittore unico, nomi dei file, scrittura sicura, miniature, impronte, _febe.jsonl, copie, eliminazione e ricostruzione
Modello del dominio e interfacce degli archivi in Febe.Core; implementazione SQLite in Febe.Data (WAL, chiavi esterne, migrazioni numerate in transazione, coda di scrittura su un solo thread); logica della libreria in Febe.Core/Library; 164 prove MSTest, compresa la ricostruzione del database da una libreria di prova e la scala a 200.000 elementi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
2026-10-13 16:06:15 +00:00

34 lines
1.3 KiB
C#

namespace Febe.Core.Domain;
/// <summary>
/// A highlight collection («raccolta in evidenza») pinned on a profile (spec §4.3, §8.3). Its contents are entries,
/// in order; an entry may belong to several collections, and a story already saved that enters a collection is
/// referenced, not downloaded again (hypothesis H9).
/// </summary>
public sealed record Highlight
{
/// <summary>Local key (0 until stored).</summary>
public long Id { get; init; }
public required long AccountId { get; init; }
/// <summary>Instagram identifier of the collection. Null for collections known only from an import.</summary>
public string? InstagramId { get; init; }
/// <summary>Title shown on the profile: the <c>{raccolta}</c> placeholder.</summary>
public required string Title { get; init; }
/// <summary>Order on the profile, from 0.</summary>
public int Position { get; init; }
public required DateTimeOffset DiscoveredAt { get; init; }
public DateTimeOffset? LastCheckedAt { get; init; }
/// <summary>The collection disappeared from the profile. Its files stay (rule 12).</summary>
public DateTimeOffset? RemovedAt { get; init; }
}
/// <summary>An entry inside a highlight collection, with its position (from 0).</summary>
public sealed record HighlightItem(long HighlightId, long EntryId, int Position);