Models: Small payment fixes
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")]
|
||||
[Table("payment_member"), PrimaryKey("Year", "AvNr", "MgNr"), Index("Year", "TgNr", IsUnique = true)]
|
||||
public class PaymentMember {
|
||||
[Column("year")]
|
||||
public int Year { get; set; }
|
||||
@ -16,6 +16,9 @@ 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);
|
||||
|
Reference in New Issue
Block a user