2011-01-22 12:38:30 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.Serialization;
|
2011-02-18 16:54:48 +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-22 12:38:30 +00:00
|
|
|
|
|
2011-01-30 07:14:05 +00:00
|
|
|
|
namespace Tanshu.Accounts.Entities
|
2011-01-22 12:38:30 +00:00
|
|
|
|
{
|
2011-01-30 07:14:05 +00:00
|
|
|
|
public class ProductGroupModifier
|
2011-01-22 12:38:30 +00:00
|
|
|
|
{
|
2014-10-12 09:41:45 +00:00
|
|
|
|
public virtual Guid ProductGroupModifierID { get; set; }
|
2011-01-30 07:14:05 +00:00
|
|
|
|
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; }
|
|
|
|
|
}
|
2014-10-12 09:41:45 +00:00
|
|
|
|
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
|
|
|
|
}
|