using FluentNHibernate.Mapping; using Tiger.Storage.CustomTypes; namespace Tiger.Game.Navigator.Nodes; public class NavigatorNodeMap : ClassMap { public NavigatorNodeMap() { Table("navigator_nodes"); LazyLoad(); Id(nn => nn.Id).Column("id").GeneratedBy.Identity(); Map(nn => nn.Name).Column("name").Not.Nullable(); Map(nn => nn.Visible).Column("visible").Not.Nullable(); Map(nn => nn.AllowTrade).Column("allow_trade").Not.Nullable(); Map(nn => nn.RankAccess).Column("rank_access").Not.Nullable(); Map(nn => nn.RankFlatcat).Column("rank_flatcat").Not.Nullable(); Map(nn => nn.Sort).Column("sort").Not.Nullable(); Map(nn => nn.Type).CustomType>(); References(nn => nn.Parent).Column("parent_id").Nullable(); HasMany(nn => nn.Children).Inverse().Cascade.All(); HasMany(nn => nn.Rooms).Inverse().Cascade.All(); } }