divan/RMuseum/Models/Divan/DivanPersonAffiliation.cs
Anas Rashid 532d005cdb Rename Ganjoor -> Divan throughout the code
Projects (GanjooRazor -> DivanRazor, GanjoorService.sln -> DivanService.sln), files,
folders, classes, namespaces, settings, API routes (/api/divan) and DB tables (Divan*).
External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed
consistently (no pending model changes); requires a fresh database.
Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:49:01 +02:00

51 lines
1.9 KiB
C#

namespace RMuseum.Models.Divan
{
/// <summary>
/// an approved non-family tie between two people (DivanRelatedPerson rows) - e.g. a minister
/// serving a king. Kept separate from DivanPersonRelation (kinship) rather than folded into
/// it: this is what lets two unrelated family trees show up as adjacent to each other (e.g.
/// browsing the Barmakid tree surfaces a link out to the Abbasid tree via a shared minister)
/// without treating "family tree" as its own entity to be linked - the tie is between the two
/// people, and the tree-to-tree adjacency is just what falls out of rendering it that way.
/// </summary>
public class DivanPersonAffiliation
{
/// <summary>
/// record id
/// </summary>
public int Id { get; set; }
/// <summary>
/// first person in the tie - for a directional type (Minister, Advisor, Courtier, Patron)
/// this is the one in the subordinate/serving role; for a symmetric one (Ally, Rival) order
/// doesn't matter
/// </summary>
public int Person1Id { get; set; }
/// <summary>
/// first person (navigation)
/// </summary>
public virtual DivanRelatedPerson Person1 { get; set; }
/// <summary>
/// second person in the tie - for a directional type this is the one being served
/// </summary>
public int Person2Id { get; set; }
/// <summary>
/// second person (navigation)
/// </summary>
public virtual DivanRelatedPerson Person2 { get; set; }
/// <summary>
/// the kind of tie between Person1 and Person2
/// </summary>
public PersonAffiliationType AffiliationType { get; set; }
/// <summary>
/// free-text note (e.g. sourcing/reasoning, or what the tie actually is when AffiliationType is Other)
/// </summary>
public string Note { get; set; }
}
}