using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;

namespace Elwig.Models.Entities {
    [Table("member_email_address"), PrimaryKey("MgNr", "Nr")]
    public class MemberEmailAddr {
        [Column("mgnr")]
        public int MgNr { get; set; }

        [Column("nr")]
        public int Nr { get; set; }

        [Column("address")]
        public required string Address { get; set; }

        [Column("comment")]
        public string? Comment { get; set; }

        [ForeignKey("MgNr")]
        public virtual Member Member { get; private set; } = null!;
    }
}
