TigerEmu/Game/Habbos/HabboMap.cs

29 lines
1.2 KiB
C#
Raw Normal View History

2023-09-23 12:20:45 +00:00
using FluentNHibernate.Mapping;
namespace Tiger.Game.Habbos;
public class HabboMap : ClassMap<Habbo>
{
public HabboMap()
{
Table("habbos");
LazyLoad();
Id(h => h.Id).Column("id").GeneratedBy.Identity();
Map(h => h.Username).Column("username").Not.Nullable();
Map(h => h.Email).Column("email").Not.Nullable();
Map(h => h.AccountCreated).Column("account_created").Not.Nullable();
Map(h => h.LastLogin).Column("last_login").Nullable();
Map(h => h.Motto).Column("motto").Not.Nullable();
Map(h => h.Figure).Column("figure").Not.Nullable();
Map(h => h.Gender).Column("gender").Not.Nullable();
Map(h => h.Rank).Column("rank").Not.Nullable();
Map(h => h.Credits).Column("credits").Not.Nullable();
Map(h => h.Online).Column("online").Not.Nullable();
Map(h => h.SsoTicket).Column("sso_ticket").Nullable();
2023-11-10 13:55:42 +00:00
References(h => h.CurrentBadge).Column("current_badge").Nullable();
Map(h => h.BadgeActive).Column("badge_active").Not.Nullable();
HasMany(h => h.Badges).Inverse().Cascade.All();
HasMany(h => h.Subscriptions).Cascade.All().Inverse();
2023-11-10 13:55:42 +00:00
HasMany(h => h.Rooms).Inverse().Cascade.All();
2023-09-23 12:20:45 +00:00
}
}