namespace MarketingDAL.DTO.ContentRef;
///
/// MarketMind AI execution layer — a ContentRef (MCONTENTREF): a thin marketing-semantic overlay
/// over content that may live in CMS or elsewhere. Owns marketing-specific tagging only
/// (JourneyStage, RRR tag, linked Persona) — it deliberately does NOT own the content body/file
/// itself.
///
/// RESOLVED (2026-09-02): cross-module hard FKs are an established, working pattern in this repo
/// (e.g. a PayRoll table FKs straight to TATTACHMENT) — the earlier "different modules, no hard
/// FK" reasoning conflated module/API coupling with DB-constraint coupling, which are not the
/// same thing. is therefore a REAL FK to CMS's TCONTENT
/// (CONTENTID), not a soft reference. It is nullable (NULL = no CMS content linked) rather than
/// the repo's usual "-1 sentinel + dummy row" convention, because TCONTENT.CONTENTID is an
/// IDENTITY column (CMS's own pre-existing convention) with its own NOT NULL FKs to
/// MCONTENTTYPE/MSPACE/MUSER — forcing a -1 dummy row into TCONTENT would mean satisfying that
/// whole dependency chain from a Marketing migration, which is more invasive than the FK is
/// worth. A marketing user tracking a URL/external asset informally, never uploaded to CMS,
/// simply leaves this NULL.
///
///
public class ContentRefDTO
{
#region ContentRef
public int ContentRefId { get; set; }
public string ContentRefCode { get; set; } = string.Empty;
public string ContentRefTitle { get; set; } = string.Empty;
/// 1=Awareness, 2=Trust, 3=Showcase, 4=WantToBuy, 5=Remarket — 5-stage funnel per the
/// reference material — see CK_MCONTENTREF_JOURNEYSTAGE.
public byte JourneyStage { get; set; }
/// 1=Reach, 2=Respect, 3=Results — see CK_MCONTENTREF_RRRTAG.
public byte RRRTag { get; set; }
/// Optional FK to MPERSONA — -1 sentinel = not applicable.
public int PersonaId { get; set; } = -1;
public string? PersonaCode { get; set; }
public string? PersonaName { get; set; }
/// Real FK to CMS's TCONTENT(CONTENTID). NULL = no CMS content linked (see class doc
/// for why NULL rather than this repo's usual -1 sentinel).
public int? SourceContentId { get; set; }
public string? Remarks { get; set; }
#endregion
#region Base
public int CreatedById { get; set; }
public DateTime CreatedOn { get; set; }
public string? CreatedByName { get; set; }
public int ModifiedById { get; set; }
public DateTime ModifiedOn { get; set; }
public string? ModifiedByName { get; set; }
#endregion
#region Standard
public short SortOrder { get; set; }
public byte Status { get; set; }
public short Version { get; set; }
public int TenantId { get; set; }
#endregion
}