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

27 lines
851 B
C#
Raw Normal View History

using System;
using System.Runtime.Serialization;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
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));
}
}
}