// using Bogus; // using Domain.Entities; // using Microsoft.EntityFrameworkCore; // using Microsoft.EntityFrameworkCore.Metadata.Builders; // namespace Auth.Domain.Configuration; // public class ProductConfiguration : IEntityTypeConfiguration // { // private readonly int count; // private readonly int categoryCount; // public ProductConfiguration(int count, int categoryCount) // { // this.count = count; // this.categoryCount = categoryCount; // } // private List GenerateProducts() // { // var i = 1; // var fakerProduct = new Faker() // .RuleFor(p => p.Id, f => Guid.NewGuid()) // .RuleFor(p => p.Name, f => f.Commerce.ProductName()) // // .RuleFor(p => p.Price, f => f.Random.Number(1, 1000)) // // .RuleFor(p => p.ItemsSold, f => f.Random.Number(2, 5)) // .RuleFor(p => p.Language, f => "test") // // .RuleFor(p => p.PiecesLeft, f => f.Random.Number(2, 5)) // .RuleFor(p => p.CategoryName, f => "Fishing Rods") // .RuleFor(p => p.CategoryId, f => f.Random.Number(1, categoryCount)) // .RuleFor(p => p.Description, f => f.Commerce.ProductDescription()) // .RuleFor(p => p.Created, f => f.Date.Past(1, DateTime.UtcNow)) // .RuleFor(p => p.PhotoPath, f => f.Image.LoremFlickrUrl(512, 512, "Product")); // return fakerProduct.Generate(count); // } // public void Configure(EntityTypeBuilder builder) // { // builder.HasData(GenerateProducts()); // // builder.HasIndex(u => u.Name).IsUnique(); // } // }