using System.Collections.Generic; namespace RMuseum.Models.Ganjoor.ViewModels { /// /// a person plus their kinship/affiliation edges, resolved with the other side's name - the /// read-only counterpart of the pending-suggestion PersonGraphSuggestion (see /// GanjoorPoemGeoDateTagCorrection.SuggestedPersonGraphJson), served by GET api/people/{id}/relations /// public class GanjoorPersonRelationsViewModel { /// /// the subject person /// public GanjoorRelatedPerson Person { get; set; } /// /// kinship edges touching Person (either side) /// public List Relations { get; set; } /// /// non-family ties touching Person (either side) /// public List Affiliations { get; set; } } /// /// one GanjoorPersonRelation row, resolved from Person's point of view /// public class GanjoorPersonRelationInfo { /// /// the underlying GanjoorPersonRelation row's own id - needed by the client to link to /// /User/SuggestPersonRelationEdit?relationId={id} for suggesting a change/removal of this specific edge /// public int Id { get; set; } /// /// the other person in this relation /// public int OtherPersonId { get; set; } /// /// the other person's name (denormalized here so the client doesn't need a second lookup) /// public string OtherPersonName { get; set; } /// /// the kind of kinship edge /// public PersonRelationType RelationType { get; set; } /// /// see GanjoorPersonRelation.DegreeHint /// public int? DegreeHint { get; set; } /// /// free-text note /// public string Note { get; set; } /// /// true if the subject person is Person1 in the underlying GanjoorPersonRelation row - /// needed by the client to render directional types (Parent, Ancestor) correctly /// public bool SubjectIsPerson1 { get; set; } } /// /// one GanjoorPersonAffiliation row, resolved from Person's point of view - same shape/purpose /// as GanjoorPersonRelationInfo above, but for a non-family tie /// public class GanjoorPersonAffiliationInfo { /// /// the underlying GanjoorPersonAffiliation row's own id - used to link to /// /User/SuggestPersonRelationEdit?affiliationId={Id} for suggesting a change/removal of /// this edge, same role RelationId plays on GanjoorPersonRelationInfo /// public int Id { get; set; } /// /// the other person in this tie /// public int OtherPersonId { get; set; } /// /// the other person's name /// public string OtherPersonName { get; set; } /// /// the kind of non-family tie /// public PersonAffiliationType AffiliationType { get; set; } /// /// free-text note /// public string Note { get; set; } /// /// true if the subject person is Person1 in the underlying GanjoorPersonAffiliation row /// public bool SubjectIsPerson1 { get; set; } } }