If printing from windows, then the printer name should be prefixed with smb. If printing from linux, then the printer name should be prefixed with cups. If printing directly, then the printer name should be prefixed with pdl.
39 lines
1.5 KiB
C#
39 lines
1.5 KiB
C#
using NHibernate.Mapping.ByCode;
|
|
using NHibernate.Mapping.ByCode.Conformist;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Tanshu.Accounts.Entities
|
|
{
|
|
public class Modifier
|
|
{
|
|
public Modifier()
|
|
{
|
|
ProductGroupModifiers = new List<ProductGroupModifier>();
|
|
InventoryModifiers = new List<InventoryModifier>();
|
|
}
|
|
public virtual Guid ModifierID { get; set; }
|
|
public virtual string Name { get; set; }
|
|
public virtual bool ShowInBill { get; set; }
|
|
public virtual decimal Price { get; set; }
|
|
|
|
public virtual IList<ProductGroupModifier> ProductGroupModifiers { get; set; }
|
|
public virtual IList<InventoryModifier> InventoryModifiers { get; set; }
|
|
}
|
|
public class ModifierMap : ClassMapping<Modifier>
|
|
{
|
|
public ModifierMap()
|
|
{
|
|
Table("Modifiers");
|
|
Schema("dbo");
|
|
Lazy(true);
|
|
Id(x => x.ModifierID, m => m.Generator(Generators.GuidComb));
|
|
Property(x => x.Name, map => { map.NotNullable(true); map.Unique(true); });
|
|
Property(x => x.ShowInBill, map => { map.NotNullable(true); });
|
|
Property(x => x.Price, map => { map.NotNullable(true); });
|
|
Bag(x => x.InventoryModifiers, colmap => { colmap.Key(x => x.Column("ModifierID")); colmap.Inverse(true); }, map => { map.OneToMany(); });
|
|
Bag(x => x.ProductGroupModifiers, colmap => { colmap.Key(x => x.Column("ModifierID")); colmap.Inverse(true); }, map => { map.OneToMany(); });
|
|
}
|
|
}
|
|
}
|