2011-01-13 20:21:02 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.Serialization;
|
2014-10-12 09:41:45 +00:00
|
|
|
|
using NHibernate.Mapping.ByCode.Conformist;
|
|
|
|
|
using NHibernate.Mapping.ByCode;
|
2011-01-13 20:21:02 +00:00
|
|
|
|
|
2011-01-30 07:14:05 +00:00
|
|
|
|
namespace Tanshu.Accounts.Entities
|
2011-01-13 20:21:02 +00:00
|
|
|
|
{
|
2011-01-30 07:14:05 +00:00
|
|
|
|
public class PrintLocation
|
2011-01-13 20:21:02 +00:00
|
|
|
|
{
|
2014-10-12 09:41:45 +00:00
|
|
|
|
public virtual Guid PrintLocationID { get; set; }
|
2011-01-31 20:33:22 +00:00
|
|
|
|
public virtual ProductGroup ProductGroup { get; set; }
|
|
|
|
|
public virtual string Location { get; set; }
|
|
|
|
|
public virtual string Printer { get; set; }
|
|
|
|
|
public virtual int Copies { get; set; }
|
|
|
|
|
public virtual string CutCode { get; set; }
|
2014-10-12 09:41:45 +00:00
|
|
|
|
}
|
|
|
|
|
public class PrintLocationMap : ClassMapping<PrintLocation>
|
|
|
|
|
{
|
|
|
|
|
public PrintLocationMap()
|
2011-01-30 07:14:05 +00:00
|
|
|
|
{
|
2014-10-12 09:41:45 +00:00
|
|
|
|
Table("PrintLocations");
|
|
|
|
|
Schema("dbo");
|
|
|
|
|
Lazy(true);
|
|
|
|
|
Id(x => x.PrintLocationID, map => map.Generator(Generators.GuidComb));
|
|
|
|
|
Property(x => x.Location);
|
|
|
|
|
Property(x => x.Printer);
|
|
|
|
|
Property(x => x.Copies);
|
|
|
|
|
Property(x => x.CutCode);
|
|
|
|
|
ManyToOne(x => x.ProductGroup, map =>
|
|
|
|
|
{
|
|
|
|
|
map.Column("ProductGroupID");
|
|
|
|
|
map.Cascade(Cascade.None);
|
|
|
|
|
});
|
2011-01-17 14:55:43 +00:00
|
|
|
|
|
2011-01-30 07:14:05 +00:00
|
|
|
|
}
|
2011-01-13 20:21:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|