[#46] MemberHistory: Add Type to PK

This commit is contained in:
2024-06-17 01:19:25 +02:00
parent b76c5ea874
commit 9d9f929843
4 changed files with 22 additions and 6 deletions

View File

@ -3,7 +3,7 @@ using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Elwig.Models.Entities {
[Table("member_history"), PrimaryKey("MgNr", "DateString")]
[Table("member_history"), PrimaryKey("MgNr", "DateString", "Type")]
public class MemberHistory {
[Column("mgnr")]
public int MgNr { get; set; }
@ -16,12 +16,12 @@ namespace Elwig.Models.Entities {
set => value.ToString("yyyy-MM-dd");
}
[Column("business_shares")]
public int BusinessShares { get; set; }
[Column("type")]
public required string Type { get; set; }
[Column("business_shares")]
public int BusinessShares { get; set; }
[Column("comment")]
public string? Comment { get; set; }