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

30 lines
856 B
C#
Raw Normal View History

using System;
using System.Runtime.Serialization;
using Tanshu.Accounts.Contracts;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
using System.Collections.Generic;
namespace Tanshu.Accounts.Entities
{
public class Setting
{
public virtual Guid SettingID { get; set; }
public virtual string Name { get; set; }
public virtual string Details { get; set; }
}
public class SettingMap : ClassMapping<Setting>
{
public SettingMap()
{
Table("Settings");
Schema("dbo");
Lazy(false);
Id(x => x.SettingID, map => map.Generator(Generators.GuidComb));
Property(x => x.Name, map => { map.NotNullable(true); map.Unique(true); });
Property(x => x.Details, map => map.NotNullable(true));
}
}
}