PI2024-23 #2

Merged
s464958 merged 21 commits from PI2024-23 into master 2024-06-14 14:47:25 +02:00
6 changed files with 0 additions and 19 deletions
Showing only changes of commit 5b13f70572 - Show all commits

View File

@ -8,6 +8,5 @@ namespace FirmTracker_Server.nHibernate.Expenses
public virtual DateTime Date { get; set; } public virtual DateTime Date { get; set; }
public virtual decimal Value { get; set; } public virtual decimal Value { get; set; }
public virtual string Description { get; set; } public virtual string Description { get; set; }
public virtual IList<Report> Reports { get; set; } = new List<Report>();
} }
} }

View File

@ -12,12 +12,6 @@ namespace FirmTracker_Server.nHibernate.Expenses
Map(x => x.Value); Map(x => x.Value);
Map(x => x.Description); Map(x => x.Description);
HasManyToMany(x => x.Reports)
.Cascade.All()
.Table("ReportExpenses")
.ParentKeyColumn("ExpenseId")
.ChildKeyColumn("ReportId");
} }
} }
} }

View File

@ -16,7 +16,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
public virtual decimal Discount { get; set; } public virtual decimal Discount { get; set; }
public virtual string Description { get; set; } public virtual string Description { get; set; }
public virtual decimal TotalPrice { get; set; }//=> TransactionProducts.Sum(tp => ((tp.Quantity * tp.UnitPrice)* ((1 - (Discount / 100)))));// (1 - (Discount / 100))); public virtual decimal TotalPrice { get; set; }//=> TransactionProducts.Sum(tp => ((tp.Quantity * tp.UnitPrice)* ((1 - (Discount / 100)))));// (1 - (Discount / 100)));
public virtual IList<Report> Reports { get; set; } = new List<Report>();
public Transaction() public Transaction()
{ {

View File

@ -16,7 +16,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
public virtual decimal Discount { get; set; } public virtual decimal Discount { get; set; }
public virtual string Description { get; set; } public virtual string Description { get; set; }
public virtual decimal TotalPrice { get; set; }//=> TransactionProducts.Sum(tp => ((tp.Quantity * tp.UnitPrice)* ((1 - (Discount / 100)))));// (1 - (Discount / 100))); public virtual decimal TotalPrice { get; set; }//=> TransactionProducts.Sum(tp => ((tp.Quantity * tp.UnitPrice)* ((1 - (Discount / 100)))));// (1 - (Discount / 100)));
public virtual IList<Report> Reports { get; set; } = new List<Report>();
public Transaction2() public Transaction2()
{ {

View File

@ -19,11 +19,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
.Cascade.AllDeleteOrphan() .Cascade.AllDeleteOrphan()
.Inverse(); // Ustawienie Inverse() wskazuje, że to `TransactionProduct` jest właścicielem relacji .Inverse(); // Ustawienie Inverse() wskazuje, że to `TransactionProduct` jest właścicielem relacji
HasManyToMany(x => x.Reports)
.Cascade.All()
.Table("ReportTransactions")
.ParentKeyColumn("TransactionId")
.ChildKeyColumn("ReportId");
} }
} }
} }

View File

@ -19,11 +19,6 @@ namespace FirmTracker_Server.nHibernate.Transactions
.Cascade.AllDeleteOrphan() .Cascade.AllDeleteOrphan()
.Inverse(); // Ustawienie Inverse() wskazuje, że to `TransactionProduct` jest właścicielem relacji .Inverse(); // Ustawienie Inverse() wskazuje, że to `TransactionProduct` jest właścicielem relacji
HasManyToMany(x => x.Reports)
.Cascade.All()
.Table("ReportTransactions")
.ParentKeyColumn("TransactionId")
.ChildKeyColumn("ReportId");
} }
} }
} }