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

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

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

        [Column("type")]
        public required string Type { get; set; }

        [Column("number")]
        public required string Number { get; set; }

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

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