2011-01-30 07:14:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.Serialization;
|
2011-01-31 20:33:22 +00:00
|
|
|
|
using Tanshu.Accounts.Contracts;
|
2014-10-12 09:41:45 +00:00
|
|
|
|
using NHibernate.Mapping.ByCode.Conformist;
|
|
|
|
|
using NHibernate.Mapping.ByCode;
|
2011-01-30 07:14:05 +00:00
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.Entities
|
|
|
|
|
{
|
|
|
|
|
public class InventoryModifier
|
|
|
|
|
{
|
2014-10-12 09:41:45 +00:00
|
|
|
|
public virtual Guid InventoryModifierID { get; set; }
|
2011-01-30 07:14:05 +00:00
|
|
|
|
public virtual Inventory Inventory { get; set; }
|
|
|
|
|
public virtual Modifier Modifier { get; set; }
|
|
|
|
|
}
|
2014-10-12 09:41:45 +00:00
|
|
|
|
public class InventoryModifierMap : ClassMapping<InventoryModifier>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public InventoryModifierMap()
|
|
|
|
|
{
|
|
|
|
|
Table("InventoryModifiers");
|
|
|
|
|
Schema("dbo");
|
|
|
|
|
Lazy(true);
|
|
|
|
|
Id(x => x.InventoryModifierID, map => map.Generator(Generators.GuidComb));
|
|
|
|
|
ManyToOne(x => x.Inventory, map =>
|
|
|
|
|
{
|
|
|
|
|
map.Column("InventoryID");
|
|
|
|
|
map.NotNullable(true);
|
|
|
|
|
map.Cascade(Cascade.None);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ManyToOne(x => x.Modifier, map =>
|
|
|
|
|
{
|
|
|
|
|
map.Column("ModifierID");
|
|
|
|
|
map.NotNullable(true);
|
|
|
|
|
map.Cascade(Cascade.None);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-01-30 07:14:05 +00:00
|
|
|
|
}
|