27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using FluentNHibernate.Mapping;
|
|
using Tiger.Storage;
|
|
|
|
namespace Tiger.Game.Catalogue;
|
|
|
|
public class CataloguePageMap : ClassMap<CataloguePage>
|
|
{
|
|
public CataloguePageMap()
|
|
{
|
|
Table("catalogue_pages");
|
|
LazyLoad();
|
|
Id(c => c.Id).Column("id").GeneratedBy.Identity();
|
|
Map(c => c.Name).Column("name").Not.Nullable();
|
|
Map(c => c.InternalName).Column("internal_name").Not.Nullable();
|
|
Map(c => c.Layout).Column("layout").Not.Nullable();
|
|
Map(c => c.Visible).Column("visible").Not.Nullable();
|
|
Map(c => c.Enabled).Column("enabled").Not.Nullable();
|
|
Map(c => c.Icon).Column("icon").Not.Nullable();
|
|
Map(c => c.MinRank).Column("min_rank").Not.Nullable();
|
|
References(x => x.Parent).Column("parent_id").Nullable();
|
|
HasMany(x => x.Children).KeyColumn("parent_id").Inverse().Cascade.AllDeleteOrphan();
|
|
Map(c => c.Images).CustomType<StringListTypeConverter>();
|
|
Map(c => c.Texts).CustomType<StringListTypeConverter>();
|
|
Map(c => c.SeasonalCurrency).Column("seasonal_currency").Not.Nullable();
|
|
Map(c => c.Modes).CustomType<StringListTypeConverter>();
|
|
}
|
|
} |