using GreenTree.Nachtragsmanagement.Core.Domain.Misc;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GreenTree.Nachtragsmanagement.Data.Mapping.Misc
{
    public class HelpPageMap : EntityTypeConfiguration<HelpPage>
    {
        public HelpPageMap()
        {
            ToTable("HelpPage");

            HasKey(f => f.Id);

            Property(f => f.Title);
            Property(f => f.ParentId);
            Property(f => f.Content);
            Property(f => f.DisplayIndex);

            HasOptional(f => f.Parent)
                .WithMany(f => f.Children)
                .HasForeignKey(f => f.ParentId);
        }
    }
}