using Indotalent.Data.Entities;
using Indotalent.Shared.Consts;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Indotalent.Infrastructure.Database.MsSQL.Configuration;

public class ApplicationUserConfiguration : IEntityTypeConfiguration<ApplicationUser>
{
    public void Configure(EntityTypeBuilder<ApplicationUser> builder)
    {
        builder.Property(e => e.FullName).HasMaxLength(GlobalConsts.StringLengthShort);
        builder.Property(e => e.SsoIdFirebase).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.SsoIdKeycloak).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.SsoIdAzure).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.SsoIdAws).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.SsoIdOther1).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.SsoIdOther2).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.SsoIdOther3).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.AvatarFile).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.RefreshToken).HasMaxLength(GlobalConsts.StringLengthMedium);


        builder.Property(e => e.FirstName).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.LastName).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.ShortBio).HasMaxLength(GlobalConsts.StringLengthMedium);
        builder.Property(e => e.JobTitle).HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.StreetAddress)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.City)
            .HasMaxLength(GlobalConsts.StringLengthShort);

        builder.Property(e => e.StateProvince)
            .HasMaxLength(GlobalConsts.StringLengthShort);

        builder.Property(e => e.ZipCode)
            .HasMaxLength(GlobalConsts.StringLengthShort);

        builder.Property(e => e.Country)
            .HasMaxLength(GlobalConsts.StringLengthShort);

        builder.Property(e => e.SocialMediaLinkedIn)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.SocialMediaX)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.SocialMediaFacebook)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.SocialMediaInstagram)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.SocialMediaTikTok)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.OtherInformation1)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.OtherInformation2)
            .HasMaxLength(GlobalConsts.StringLengthMedium);

        builder.Property(e => e.OtherInformation3)
            .HasMaxLength(GlobalConsts.StringLengthMedium);
    }
}