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>
56 lines
2.1 KiB
C#
56 lines
2.1 KiB
C#
namespace RMuseum.Models.Divan
|
|
{
|
|
/// <summary>
|
|
/// an approved kinship edge between two people (DivanRelatedPerson rows) - the live/materialized
|
|
/// counterpart of a pending suggestion, which travels as JSON on DivanPoemGeoDateTagCorrection's
|
|
/// SuggestedPersonGraphJson until it's approved and turned into rows here. The graph as a whole
|
|
/// (all rows in this table) is a general kinship graph, not a strict tree - see PersonRelationType.
|
|
/// </summary>
|
|
public class DivanPersonRelation
|
|
{
|
|
/// <summary>
|
|
/// record id
|
|
/// </summary>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// first person in the relation - for a directional relation type (Parent, Ancestor) this is
|
|
/// the parent/ancestor side; for a symmetric one (Sibling, Spouse) 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 relation - for a directional relation type (Parent, Ancestor) this is
|
|
/// the child/descendant side
|
|
/// </summary>
|
|
public int Person2Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// second person (navigation)
|
|
/// </summary>
|
|
public virtual DivanRelatedPerson Person2 { get; set; }
|
|
|
|
/// <summary>
|
|
/// the kind of relation between Person1 and Person2
|
|
/// </summary>
|
|
public PersonRelationType RelationType { get; set; }
|
|
|
|
/// <summary>
|
|
/// for RelationType == Ancestor, an optional known exact degree (e.g. 2 for "grandparent",
|
|
/// 3 for "great-grandparent") - left null when only the relative order is known, not the
|
|
/// exact number of generations in between. Not used for other relation types.
|
|
/// </summary>
|
|
public int? DegreeHint { get; set; }
|
|
|
|
/// <summary>
|
|
/// free-text note (e.g. sourcing/reasoning for this relation)
|
|
/// </summary>
|
|
public string Note { get; set; }
|
|
}
|
|
}
|