namespace RMuseum.Models.Divan
{
///
/// 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.
///
public class DivanPersonRelation
{
///
/// record id
///
public int Id { get; set; }
///
/// 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
///
public int Person1Id { get; set; }
///
/// first person (navigation)
///
public virtual DivanRelatedPerson Person1 { get; set; }
///
/// second person in the relation - for a directional relation type (Parent, Ancestor) this is
/// the child/descendant side
///
public int Person2Id { get; set; }
///
/// second person (navigation)
///
public virtual DivanRelatedPerson Person2 { get; set; }
///
/// the kind of relation between Person1 and Person2
///
public PersonRelationType RelationType { get; set; }
///
/// 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.
///
public int? DegreeHint { get; set; }
///
/// free-text note (e.g. sourcing/reasoning for this relation)
///
public string Note { get; set; }
}
}