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

namespace Elwig.Models.Entities {
    [Table("AT_plz_dest"), PrimaryKey("Id"), Index("Plz", "Okz", IsUnique = true)]
    public class AT_PlzDest {
        [Column("plz")]
        public int Plz { get; private set; }

        [Column("okz")]
        public int Okz { get; private set; }

        [Column("country")]
        public int CountryNum { get; private set; }

        [Column("id")]
        public string Id { get; private set; } = null!;

        [Column("dest")]
        public string Dest { get; private set; } = null!;

        [ForeignKey("Plz")]
        public virtual AT_Plz AtPlz { get; private set; } = null!;

        [ForeignKey("Okz")]
        public virtual AT_Ort Ort { get; private set; } = null!;

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