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

namespace Elwig.Models {
    [Table("wine_origin"), PrimaryKey("HkId"), Index("Name", IsUnique = true)]
    public class WineOrigin {
        [Column("hkid")]
        public string HkId { get; private set; }

        [Column("parent_hkid")]
        public string? ParentHkId { get; private set; }

        [ForeignKey("ParentHkId")]
        public virtual WineOrigin? Parent { get; private set; }

        [Column("name")]
        public string Name { get; private set; }

        [Column("blnr")]
        public int? BlNr { get; private set; }
    }
}