tbf/SharedDatabase/Mappings/BatchMap.cs
2021-06-18 15:35:46 +02:00

48 lines
1.0 KiB
C#

///
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
///
using FluentNHibernate.Mapping;
namespace SharedDatabase.Mappings
{
class BatchMap : ClassMap<Entities.Batch>
{
public BatchMap()
{
Id(x => x.Id);
Map(x => x.BatchNr);
Map(x => x.TestBenchId);
Map(x => x.ProgramVersion);
Map(x => x.UserName);
Map(x => x.UserNumber);
Map(x => x.ProcedureName);
Map(x => x.ProcedureRevision);
Map(x => x.Remark)
.CustomType("StringClob")
.CustomSqlType("varchar(2000)");
Map(x => x.SampleDensity);
Map(x => x.SampleTemp);
Map(x => x.Buoyancy);
Map(x => x.Counter6);
Map(x => x.Counter7);
Map(x => x.Counter8);
Map(x => x.Counter9);
Map(x => x.Counter10);
Map(x => x.StartTime);
Map(x => x.EndTime);
Map(x => x.Dirty);
Map(x => x.RsltsSent);
Map(x => x.RsltsPrinted);
HasMany(x => x.Tests)
.Cascade.All();
HasMany(x => x.WaterMeters)
.Cascade.All();
HasMany(x => x.TestRslts)
.Cascade.All();
}
}
}