narsil/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupModifierBO.cs

37 lines
1.2 KiB
C#
Raw Normal View History

2011-01-22 12:38:30 +00:00
using System;
using System.Runtime.Serialization;
using Tanshu.Accounts.Contracts;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
2011-01-22 12:38:30 +00:00
namespace Tanshu.Accounts.Entities
2011-01-22 12:38:30 +00:00
{
public class ProductGroupModifier
2011-01-22 12:38:30 +00:00
{
public virtual Guid ProductGroupModifierID { get; set; }
public virtual ProductGroup ProductGroup { get; set; }
public virtual Modifier Modifier { get; set; }
2011-01-22 12:38:30 +00:00
public virtual bool ShowAutomatically { get; set; }
}
public class ProductGroupModifierMap : ClassMapping<ProductGroupModifier>
{
public ProductGroupModifierMap()
{
Table("ProductGroupModifiers");
Schema("dbo");
Lazy(true);
Id(x => x.ProductGroupModifierID, map => map.Generator(Generators.GuidComb));
Property(x => x.ShowAutomatically, map => map.NotNullable(true));
ManyToOne(x => x.ProductGroup, map =>
{
map.Column("ProductGroupID");
map.Cascade(Cascade.None);
});
ManyToOne(x => x.Modifier, map => { map.Column("ModifierID"); map.Cascade(Cascade.None); });
}
}
2011-01-22 12:38:30 +00:00
}