FirmTracker-Server/nHIbernate/Reports/ReportMapping.cs

30 lines
770 B
C#
Raw Permalink Normal View History

using FluentNHibernate.Mapping;
namespace FirmTracker_Server.nHibernate.Reports
{
public class ReportMapping : ClassMap<Report>
{
public ReportMapping()
{
Table("Reports");
Id(x => x.Id).GeneratedBy.Identity();
Map(x => x.FromDate);
Map(x => x.ToDate);
Map(x => x.TotalIncome);
Map(x => x.TotalExpenses);
Map(x => x.TotalBalance);
2024-06-08 15:04:52 +02:00
/*HasMany(x => x.ReportTransactions)
.KeyColumn("ReportId")
.Cascade.AllDeleteOrphan()
.Inverse();
HasMany(x => x.ReportExpenses)
2024-06-08 15:04:52 +02:00
.KeyColumn("ReportId")
.Cascade.AllDeleteOrphan()
.Inverse();*/
}
}
}