Models: Add Entities/ folder
This commit is contained in:
32
Elwig/Models/Entities/BillingAddr.cs
Normal file
32
Elwig/Models/Entities/BillingAddr.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using Elwig.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Elwig.Models.Entities {
|
||||
[Table("member_billing_address"), PrimaryKey("MgNr")]
|
||||
public class BillingAddr : IAddress {
|
||||
[Column("mgnr")]
|
||||
public int MgNr { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("country")]
|
||||
public int CountryNum { 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("CountryNum")]
|
||||
public virtual Country Country { get; private set; }
|
||||
|
||||
[ForeignKey("CountryNum, PostalDestId")]
|
||||
public virtual PostalDest PostalDest { get; private set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user