// using Bogus; // using Domain.Entities; // using Microsoft.AspNetCore.Identity; // using Microsoft.EntityFrameworkCore; // using Microsoft.EntityFrameworkCore.Metadata.Builders; // namespace Auth.Domain.Configuration; // public class UserConfiguration : IEntityTypeConfiguration // { // private readonly PasswordHasher _Hasher = new PasswordHasher(); // private readonly int count; // public UserConfiguration(int count) // { // this.count = count; // } // private List GenerateUsers() // { // var fakerUser = new Faker() // .RuleFor(u => u.Name, f => f.Name.FullName(f.Person.Gender)) // .RuleFor(u => u.Email, (f, u) => f.Internet.Email(u.Name)) // .RuleFor(u => u.EmailConfirmed, true) // .RuleFor(u => u.Building, f => f.Address.BuildingNumber()) // .RuleFor(u => u.Floor, f => f.Random.Number(1, 3)) // .RuleFor(u => u.Flat, f => f.Random.Number(3, 10)) // .RuleFor(u => u.PhotoPath, f => f.Person.Avatar) // .RuleFor(u => u.PasswordHash, (f, u) => _Hasher.HashPassword(u, "aaa111!!!AAA")) // .RuleFor(u => u.PhoneNumber, f => f.Phone.PhoneNumber()) // .RuleFor(u => u.locationLati, f => f.Random.Number(300)) // .RuleFor(u => u.locationLong, f => f.Random.Number(300)); // return fakerUser.Generate(count); // } // public void Configure(EntityTypeBuilder builder) // { // var adminUser = new AppUser() // { // Id = Guid.NewGuid().ToString(), // Name = "said", // Email = "said.amir.kattan@outlook.com", // UserName = "said.amir.kattan@outlook.com", // NormalizedEmail = "said.amir.kattan@outlook.com".ToUpper(), // NormalizedUserName = "said.amir.kattan@outlook.com".ToUpper(), // PhoneNumber = "01231231322", // EmailConfirmed = true, // PasswordHash = _Hasher.HashPassword(null, "aaa111!!!AAA") // }; // builder.HasData(GenerateUsers(), adminUser); // } // }