using Lada.Framework.Data.Domains.Finance.Wallets;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Lada.Framework.Data.Mappings.EntityMappings.Finances.Wallets
{
    public class CostCategoryMap : IEntityMappingConfiguration<CostCategory>
    {
        public void Map(EntityTypeBuilder<CostCategory> builder)
        {
            builder.HasKey(a => a.Id);

            builder.Property(c => c.Name)
            .IsRequired()
            .HasMaxLength(256);

            builder.Property(c => c.Description)
                .HasMaxLength(1024);


            builder.ToTable("CostCategory");
        }
    }

}
