Add BillingAddress

This commit is contained in:
2023-03-18 11:40:37 +01:00
parent b637b756d6
commit 731df99c72
4 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace Elwig.Models {
[Table("member_billing_address"), PrimaryKey("MgNr")]
public class BillingAddress {
[Column("mgnr")]
public int MgNr { get; set; }
[Column("name")]
public string Name { get; set; }
[Column("country")]
public string CountryCode { get; set; }
[Column("postal_dest")]
public string PostalDestId { get; set; }
[Column("address")]
public string Address { get; set; }
[ForeignKey("MgNr")]
public virtual Member Member { get; private set; }
[ForeignKey("CountryCode")]
public virtual Country Country { get; private set; }
[ForeignKey("CountryCode, PostalDestId")]
public virtual PostalDest PostalDest { get; private set; }
}
}