using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MTWorkHR.Infrastructure.Entities;

namespace MTWorkHR.Infrastructure.Configurations
{
    public class UserConfiguration : IEntityTypeConfiguration<ApplicationUser>
    {
        
        public void Configure(EntityTypeBuilder<ApplicationUser> builder)
        {
            var hasher = new PasswordHasher<ApplicationUser>();
            builder.HasData(
               new ApplicationUser
               {
                   Id = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
                   FirstName = "Super",
                   LastName = "Admin",
                   UserName = "Admin@super.com",
                   Email = "admin@super.com",
                   NormalizedEmail = "ADMIN@SUPER.COM",
                   EmailConfirmed = true,
                   NormalizedUserName = "ADMIN@SUPER.COM",
                   PhoneNumber = "1234567890",
                   PhoneNumberConfirmed = true,
                   IsDeleted = false,
                   IsStopped = false,
                   DeleteUserId = null,
                   AccessFailedCount = 0,
                   UserType = 0,
                   ConcurrencyStamp = "7cc87689-9eab-4280-b8e3-1834080783a5",
                   SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
                   PassportNumber = "123456700",
                   TaxNumber = 111334455,
                   IncomeTaxValue = 1,
                   QualificationId = null,
                   IdNumber = "1234",
                   DateOfBirth = new DateTime(2000, 2, 10),
                   CompanyId = null,
                   PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==" //hasher.HashPassword(null, "P@ssword1")
               },
                new ApplicationUser
                {
                    Id = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
                    FirstName = "Ali",
                    LastName = "Farok",
                    UserName = "Ali@b.com",
                    Email = "ali@b.com",
                    NormalizedEmail = "ALI@B.COM",
                    EmailConfirmed = true,
                    NormalizedUserName = "ALI@B.COM",
                    PhoneNumber = "1234567888",
                    PhoneNumberConfirmed = true,
                    DeleteUserId = null,
                    AccessFailedCount = 0,
                    IsDeleted = false,
                    IsStopped = false,
                    UserType = 1,
                    ConcurrencyStamp = "4af7b4cf-802a-455b-b598-997e167745b3",
                    SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
                    PassportNumber = "7654321001010",
                    TaxNumber = 222,
                    IncomeTaxValue = 100,
                    QualificationId = null,
                    IdNumber = "343434",
                    DateOfBirth = new DateTime(2001, 5, 13),
                    CompanyId = 1,
                    PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ=="// hasher.HashPassword(null, "P@ssword1")
                }) ;
        }
    }
}