using AyCode.Database.DbContexts;
using AyCode.Database.ModelBuilders.Users;
using AyCode.Interfaces.Users;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TIAM.Entities.Profiles;
using TIAM.Entities.ServiceProviders;
using TIAM.Entities.Users;

namespace TIAM.Database.ModelBuilders.Users;

public class UserProductMappingEntityTypeDefaultConfiguration : IAcEntityTypeConfiguration<UserProductMapping>
{
    public void Configure(EntityTypeBuilder<UserProductMapping> builder)
    {
        builder.BuildUserProductMappingToRelations(false);
    }
}

public class UserEntityTypeDefaultConfiguration : AcUserEntityTypeDefaultConfiguration<User, Profile, TiamServiceProvider, UserToServiceProvider> //IAcEntityTypeConfiguration<User>//
{
    public override void Configure(EntityTypeBuilder<User> builder)
    {
        base.Configure(builder);

        builder.BuildUserToUserProductMappingRelation();
    }
}
