using Lada.Framework.Data.Domains.OrderBusiness;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Lada.Framework.Data.Mappings.EntityMappings.OrderBusiness
{
    public class OrderFailReasonMap : IEntityMappingConfiguration<OrderFailReason>
    {
        public void Map(EntityTypeBuilder<OrderFailReason> builder)
        {
            builder.HasKey(x => x.Id);
            builder.Property(x => x.Id).ValueGeneratedOnAdd();

            builder.Property(x => x.Name).IsRequired().HasMaxLength(256);
            builder.Property(x => x.Description).HasMaxLength(1000);
            builder.Property(x => x.MediaTitle).HasMaxLength(256);

            builder.ToTable("OrderFailReasons");
        }
    }
}
