using System; using System.Collections.Generic; using System.Text; using Activizr.Basic.Interfaces; namespace Activizr.Basic.Types { /// /// A geographical node. /// [Serializable] public class BasicGeography : IHasIdentity { public BasicGeography (int geographyId, int parentGeographyId, string name) : this(geographyId, parentGeographyId, name, 0) { } public BasicGeography (int geographyId, int parentGeographyId, string name, int generation) { this.GeographyId = geographyId; this.ParentGeographyId = parentGeographyId; this.Name = name; this.Generation = generation; } public BasicGeography (BasicGeography original) : this(original.GeographyId, original.ParentGeographyId, original.Name, original.Generation) { } /// /// The database node id. /// public readonly int GeographyId; /// /// The database node id of the parent node. /// public readonly int ParentGeographyId; /// /// The friendly name of the node (city, county, region, etc). /// public readonly string Name; /// /// The generation of this node. Used in tree-style listings. /// public readonly int Generation; #region IHasIdentity Members public int Identity { get { return this.GeographyId; } } #endregion } }