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

26 lines
815 B
C#

using NHibernate.Mapping.ByCode;
using NHibernate.Mapping.ByCode.Conformist;
using System;
namespace Tanshu.Accounts.Entities
{
public class MachineLocation
{
public virtual Guid MachineLocationID { get; set; }
public virtual string Machine { get; set; }
public virtual string Location { get; set; }
}
public class MachineLocationMap : ClassMapping<MachineLocation>
{
public MachineLocationMap()
{
Table("MachineLocations");
Schema("dbo");
Lazy(true);
Id(x => x.MachineLocationID, map => map.Generator(Generators.GuidComb));
Property(x => x.Machine, map => { map.Unique(true); map.NotNullable(true); });
Property(x => x.Location, map => map.NotNullable(true));
}
}
}