Models: Add Credit
This commit is contained in:
@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Elwig.Models {
|
||||
[Table("payment_member"), PrimaryKey("Year", "AvNr", "MgNr"), Index("Year", "TgNr", IsUnique = true)]
|
||||
[Table("payment_member"), PrimaryKey("Year", "AvNr", "MgNr")]
|
||||
public class PaymentMember {
|
||||
[Column("year")]
|
||||
public int Year { get; set; }
|
||||
@ -16,9 +16,6 @@ namespace Elwig.Models {
|
||||
[Column("amount")]
|
||||
public long AmountValue { get; set; }
|
||||
|
||||
[Column("tgnr")]
|
||||
public int? TgNr { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public decimal Amount {
|
||||
get => Variant.Season.DecFromDb(AmountValue);
|
||||
@ -30,5 +27,8 @@ namespace Elwig.Models {
|
||||
|
||||
[ForeignKey("MgNr")]
|
||||
public virtual Member Member { get; private set; }
|
||||
|
||||
[InverseProperty("Payment")]
|
||||
public virtual Credit? Credit { get; private set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user