From bd2ec7272f8d175ee31992e322f8c74652843213 Mon Sep 17 00:00:00 2001 From: Bangara Raju Kottedi Date: Tue, 30 Apr 2024 23:20:58 +0530 Subject: [PATCH] Added Mail Service --- PortBlog.API/Common/MailConstants.cs | 12 + PortBlog.API/Controllers/CvController.cs | 45 +- PortBlog.API/DbContexts/CvBlogContext.cs | 2 - PortBlog.API/Entities/Message.cs | 14 +- PortBlog.API/Entities/MessageStatusLog.cs | 22 - PortBlog.API/Extensions/ServiceExtensions.cs | 9 + PortBlog.API/Middleware/ApiKeyMiddleware.cs | 2 +- ...2_messagestatuslogtablechanges.Designer.cs | 1380 +++++++++++++++++ ...0430123112_messagestatuslogtablechanges.cs | 515 ++++++ ...143027_MessageStatusLogRemoved.Designer.cs | 1348 ++++++++++++++++ .../20240430143027_MessageStatusLogRemoved.cs | 537 +++++++ .../20240430150543_MessageChanges.Designer.cs | 1369 ++++++++++++++++ .../20240430150543_MessageChanges.cs | 550 +++++++ .../Migrations/CvBlogContextModelSnapshot.cs | 185 +-- PortBlog.API/Models/MailSettingsDto.cs | 15 + PortBlog.API/Models/MessageDto.cs | 20 + PortBlog.API/Models/MessageSendDto.cs | 26 + PortBlog.API/PortBlog.API.csproj | 4 +- PortBlog.API/PortBlog.API.xml | 45 + PortBlog.API/Profiles/ResumeProfile.cs | 2 + PortBlog.API/Program.cs | 3 +- .../Repositories/Contracts/IMailRepository.cs | 11 + PortBlog.API/Repositories/MailRepository.cs | 25 + .../Services/Contracts/IMailService.cs | 10 + PortBlog.API/Services/MailService.cs | 75 + PortBlog.API/appsettings.Development.json | 9 +- 26 files changed, 6105 insertions(+), 130 deletions(-) create mode 100644 PortBlog.API/Common/MailConstants.cs delete mode 100644 PortBlog.API/Entities/MessageStatusLog.cs create mode 100644 PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.Designer.cs create mode 100644 PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.cs create mode 100644 PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.Designer.cs create mode 100644 PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.cs create mode 100644 PortBlog.API/Migrations/20240430150543_MessageChanges.Designer.cs create mode 100644 PortBlog.API/Migrations/20240430150543_MessageChanges.cs create mode 100644 PortBlog.API/Models/MailSettingsDto.cs create mode 100644 PortBlog.API/Models/MessageDto.cs create mode 100644 PortBlog.API/Models/MessageSendDto.cs create mode 100644 PortBlog.API/Repositories/Contracts/IMailRepository.cs create mode 100644 PortBlog.API/Repositories/MailRepository.cs create mode 100644 PortBlog.API/Services/Contracts/IMailService.cs create mode 100644 PortBlog.API/Services/MailService.cs diff --git a/PortBlog.API/Common/MailConstants.cs b/PortBlog.API/Common/MailConstants.cs new file mode 100644 index 0000000..6024ed2 --- /dev/null +++ b/PortBlog.API/Common/MailConstants.cs @@ -0,0 +1,12 @@ +namespace PortBlog.API.Common +{ + public static class MailConstants + { + public static string Name { get; set; } = "Bangara Raju"; + public enum MailStatus + { + Failed = 0, + Success = 1 + } + } +} diff --git a/PortBlog.API/Controllers/CvController.cs b/PortBlog.API/Controllers/CvController.cs index 9096633..cc03ced 100644 --- a/PortBlog.API/Controllers/CvController.cs +++ b/PortBlog.API/Controllers/CvController.cs @@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Mvc; using PortBlog.API.Entities; using PortBlog.API.Models; using PortBlog.API.Repositories.Contracts; +using PortBlog.API.Services.Contracts; namespace PortBlog.API.Controllers { @@ -16,13 +17,17 @@ namespace PortBlog.API.Controllers private readonly ILogger _logger; private readonly ICandidateRepository _candidateRepository; private readonly IResumeRepository _resumeRepository; + private readonly IMailRepository _mailRepository; + private readonly IMailService _mailService; private readonly IMapper _mapper; - public CvController(ILogger logger, ICandidateRepository candidateRepository, IResumeRepository resumeRepository, IMapper mapper) + public CvController(ILogger logger, ICandidateRepository candidateRepository, IResumeRepository resumeRepository, IMailService mailService, IMapper mapper, IMailRepository mailRepository) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _candidateRepository = candidateRepository ?? throw new ArgumentNullException(nameof(candidateRepository)); _resumeRepository = resumeRepository ?? throw new ArgumentNullException(nameof(resumeRepository)); + _mailRepository = mailRepository; + _mailService = mailService; _mapper = mapper; } @@ -225,5 +230,43 @@ namespace PortBlog.API.Controllers return StatusCode(500, "A problem happened while handling your request."); } } + + /// + /// Send Message through email + /// + /// The id of the candidate to whom the message should be sent + /// Details of the Message to send to the candidate + /// Returns the status code + /// Returns nothing + [HttpPost("SendMessage/{candidateId}")] + [ProducesResponseType(StatusCodes.Status404NotFound)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + [ProducesResponseType(StatusCodes.Status204NoContent)] + public async Task SendMessage(int candidateId, [FromBody] MessageDto message) + { + try + { + var candidate = await _candidateRepository.GetCandidateAsync(candidateId); + if (candidate == null) + { + _logger.LogInformation($"Candidate with id {candidateId} wasn't found when fetching projects."); + return NotFound(); + } + + var candidateDto = _mapper.Map(candidate); + var messageSendDto = _mapper.Map(message); + messageSendDto.ToEmail = candidateDto.Email; + messageSendDto.CandidateName = candidateDto.DisplayName; + messageSendDto.CandidateId = candidateDto.CandidateId; + await _mailService.SendAsync(messageSendDto); + return NoContent(); + } + catch (Exception ex) + { + _logger.LogCritical($"Exception while sending message from {message.Name}.", ex); + return StatusCode(500, "A problem happened while handling your request."); + } + } } } diff --git a/PortBlog.API/DbContexts/CvBlogContext.cs b/PortBlog.API/DbContexts/CvBlogContext.cs index 5890f88..eb48fed 100644 --- a/PortBlog.API/DbContexts/CvBlogContext.cs +++ b/PortBlog.API/DbContexts/CvBlogContext.cs @@ -27,8 +27,6 @@ namespace PortBlog.API.DbContexts public DbSet Messages { get; set; } - public DbSet MessageStatusLogs{ get; set; } - public DbSet Blogs { get; set; } public DbSet Posts { get; set; } diff --git a/PortBlog.API/Entities/Message.cs b/PortBlog.API/Entities/Message.cs index 749f480..1b8dc6e 100644 --- a/PortBlog.API/Entities/Message.cs +++ b/PortBlog.API/Entities/Message.cs @@ -16,7 +16,12 @@ namespace PortBlog.API.Entities [Required] [EmailAddress] [MaxLength(100)] - public string Email { get; set; } = string.Empty; + public string FromEmail { get; set; } = string.Empty; + + [Required] + [EmailAddress] + [MaxLength(100)] + public string ToEmail { get; set; } = string.Empty; [Required] [MaxLength(50)] @@ -26,6 +31,13 @@ namespace PortBlog.API.Entities [MaxLength(500)] public string Content { get; set; } = string.Empty; + public int SentStatus { get; set; } = 0; + public DateTime CreatedDate { get; set; } = DateTime.Now; + + public int CandidateId { get; set; } + + [ForeignKey(nameof(CandidateId))] + public Candidate? Candidate { get; set; } } } diff --git a/PortBlog.API/Entities/MessageStatusLog.cs b/PortBlog.API/Entities/MessageStatusLog.cs deleted file mode 100644 index 7aac4af..0000000 --- a/PortBlog.API/Entities/MessageStatusLog.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace PortBlog.API.Entities -{ - public class MessageStatusLog - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int Id { get; set; } - - public int MessageId { get; set; } - - [ForeignKey(nameof(MessageId))] - public Message? Message { get; set; } - - [MaxLength(10)] - public string Status { get; set; } = string.Empty; - - public DateTime CreatedDate { get; set; } = DateTime.Now; - } -} diff --git a/PortBlog.API/Extensions/ServiceExtensions.cs b/PortBlog.API/Extensions/ServiceExtensions.cs index 1be9871..502312b 100644 --- a/PortBlog.API/Extensions/ServiceExtensions.cs +++ b/PortBlog.API/Extensions/ServiceExtensions.cs @@ -1,5 +1,7 @@ using PortBlog.API.Repositories; using PortBlog.API.Repositories.Contracts; +using PortBlog.API.Services; +using PortBlog.API.Services.Contracts; namespace PortBlog.API.Extensions { @@ -9,6 +11,13 @@ namespace PortBlog.API.Extensions { services.AddScoped(); services.AddScoped(); + services.AddScoped(); + return services; + } + + public static IServiceCollection AddServices(this IServiceCollection services) + { + services.AddTransient(); return services; } } diff --git a/PortBlog.API/Middleware/ApiKeyMiddleware.cs b/PortBlog.API/Middleware/ApiKeyMiddleware.cs index 838b4ee..8640f19 100644 --- a/PortBlog.API/Middleware/ApiKeyMiddleware.cs +++ b/PortBlog.API/Middleware/ApiKeyMiddleware.cs @@ -19,7 +19,7 @@ namespace PortBlog.API.Middleware if (!context.Request.Headers.TryGetValue(APIKEY, out var extractedApiKey)) { context.Response.StatusCode = StatusCodes.Status401Unauthorized; - await context.Response.WriteAsync("Api key was not provided"); + await context.Response.WriteAsync("Unauthorized client"); return; } diff --git a/PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.Designer.cs b/PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.Designer.cs new file mode 100644 index 0000000..1f90058 --- /dev/null +++ b/PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.Designer.cs @@ -0,0 +1,1380 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using PortBlog.API.DbContexts; + +#nullable disable + +namespace PortBlog.API.Migrations +{ + [DbContext(typeof(CvBlogContext))] + [Migration("20240430123112_messagestatuslogtablechanges")] + partial class messagestatuslogtablechanges + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("PortBlog.API.Entities.Academic", b => + { + b.Property("AcademicId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("AcademicId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("DegreeSpecialization") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("EndYear") + .HasColumnType("int"); + + b.Property("Institution") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("AcademicId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Academics"); + + b.HasData( + new + { + AcademicId = 1, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9168), + Degree = "High School", + EndYear = 2007, + Institution = "Pragati Little Public School", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9168), + ResumeId = 1, + StartYear = 2006 + }, + new + { + AcademicId = 2, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9172), + Degree = "Intermediate", + DegreeSpecialization = "MPC", + EndYear = 2009, + Institution = "Sri Chaitanya Junior College", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9173), + ResumeId = 1, + StartYear = 2007 + }, + new + { + AcademicId = 3, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9175), + Degree = "BTech", + DegreeSpecialization = "ECE", + EndYear = 2013, + Institution = "Kakinada Institute of Technology & Science", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9175), + ResumeId = 1, + StartYear = 2009 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Blog", b => + { + b.Property("BlogUrl") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("BlogUrl"); + + b.ToTable("Blogs"); + + b.HasData( + new + { + BlogUrl = "https://bangararaju.kottedi.in/blog", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9257), + Description = "Your Hub for Tech, DIY, and Innovation", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9257), + Name = "Engineer's Odyssey" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Candidate", b => + { + b.Property("CandidateId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CandidateId")); + + b.Property("Address") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Avatar") + .HasColumnType("longtext"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Dob") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Gender") + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.HasKey("CandidateId"); + + b.ToTable("Candidates"); + + b.HasData( + new + { + CandidateId = 1, + Address = "Samalkot, Andhra Pradesh, India", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(8899), + Dob = new DateTime(1992, 5, 6, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "bangararaju.kottedi@gmail.com", + FirstName = "Bangara Raju", + Gender = "Male", + LastName = "Kottedi", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(8914), + Phone = "+91 9441212187" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Certification", b => + { + b.Property("CertificationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CertificationId")); + + b.Property("CertificationLink") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CertificationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpiryDate") + .HasColumnType("datetime(6)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)"); + + b.Property("IssuingOrganization") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("CertificationId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Certifications"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ClientLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ClientIp") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ClientLocation") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SiteUrl") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.ToTable("ClientLogs"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.Property("ExperienceId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ExperienceId")); + + b.Property("Company") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("StartDate") + .HasColumnType("datetime(6)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("ExperienceId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Experiences"); + + b.HasData( + new + { + ExperienceId = 1, + Company = "Agility E Services", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9346), + Description = "", + EndDate = new DateTime(2016, 4, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9346), + ResumeId = 1, + StartDate = new DateTime(2015, 9, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Jr. Software Engineer" + }, + new + { + ExperienceId = 2, + Company = "Agility", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9352), + Description = "", + EndDate = new DateTime(2022, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9352), + ResumeId = 1, + StartDate = new DateTime(2016, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Web Developer" + }, + new + { + ExperienceId = 3, + Company = "Agility", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9355), + Description = "", + EndDate = new DateTime(2022, 10, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9355), + ResumeId = 1, + StartDate = new DateTime(2022, 2, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Senior Web Developer" + }, + new + { + ExperienceId = 4, + Company = "Agility E Services", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9357), + Description = "", + EndDate = new DateTime(2024, 4, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9358), + ResumeId = 1, + StartDate = new DateTime(2022, 11, 4, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Technology Specialist" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ExperienceDetails", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Details") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ExperienceId") + .HasColumnType("int"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ExperienceId"); + + b.ToTable("ExperienceDetails"); + + b.HasData( + new + { + Id = 1, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9381), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 1, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9381), + Order = 1 + }, + new + { + Id = 2, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9384), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 1, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9384), + Order = 2 + }, + new + { + Id = 3, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9386), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 2, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9386), + Order = 1 + }, + new + { + Id = 4, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9387), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 2, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9387), + Order = 2 + }, + new + { + Id = 5, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9389), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 3, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9389), + Order = 1 + }, + new + { + Id = 6, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9391), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 3, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9391), + Order = 2 + }, + new + { + Id = 7, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9392), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 4, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9393), + Order = 1 + }, + new + { + Id = 8, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9394), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 4, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9394), + Order = 2 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Hobby", b => + { + b.Property("HobbyId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("HobbyId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("HobbyId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Hobbies"); + + b.HasData( + new + { + HobbyId = 1, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9077), + Description = "Crafting Professional-Quality Websites with Precision", + Icon = "fa-square-terminal", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9078), + Name = "Web Development", + Order = 1, + ResumeId = 1 + }, + new + { + HobbyId = 2, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9083), + Description = "Streamlining and Simplifying Complex Tasks through Automation", + Icon = "fa-robot", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9083), + Name = "Automation", + Order = 2, + ResumeId = 1 + }, + new + { + HobbyId = 3, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9085), + Description = "Sharing the knowledge and insights I’ve gathered along my journey", + Icon = "fa-typewriter", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9086), + Name = "Blogging", + Order = 3, + ResumeId = 1 + }, + new + { + HobbyId = 4, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9087), + Description = "Cultivating Nature's Beauty and Bounty", + Icon = "fa-seedling", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9087), + Name = "Gardening", + Order = 4, + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Message", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Content") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Messages"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.MessageStatusLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("MessageId") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.ToTable("MessageStatusLogs"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Post", b => + { + b.Property("PostId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PostId")); + + b.Property("Author") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BlogUrl") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Comments") + .HasColumnType("int"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Image") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Likes") + .HasColumnType("int"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("PostUrl") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Views") + .HasColumnType("int"); + + b.HasKey("PostId"); + + b.HasIndex("BlogUrl"); + + b.ToTable("Posts"); + + b.HasData( + new + { + PostId = 1, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9321), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9318), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }, + new + { + PostId = 2, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9327), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9325), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }, + new + { + PostId = 3, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9329), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9328), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProjectId")); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Challenges") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)"); + + b.Property("ImagePath") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Impact") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("LessonsLearned") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Responsibilities") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Roles") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("TechnologiesUsed") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("ProjectId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Projects"); + + b.HasData( + new + { + ProjectId = 1, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9227), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9227), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 2, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9234), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9234), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 3, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9237), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9237), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.Property("ResumeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResumeId")); + + b.Property("About") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CandidateId") + .HasColumnType("int"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("ResumeId"); + + b.HasIndex("CandidateId"); + + b.ToTable("Resumes"); + + b.HasData( + new + { + ResumeId = 1, + About = "I'm Full Stack Developer with 8+ years of hands-on experience in .NET development. Passionate and driven professional with expertise in .NET WebAPI, Angular, CI/CD, and a growing proficiency in Azure. I've successfully delivered robust applications, prioritizing efficiency and user experience. While I'm currently in the early stages of exploring Azure, I'm eager to expand my skill set and leverage cloud technologies to enhance scalability and performance. Known for my proactive approach and dedication to continuous learning, I'm committed to staying abreast of the latest technologies and methodologies to drive innovation and deliver exceptional results.", + CandidateId = 1, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9037), + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9038), + Order = 1, + Title = "Full Stack Developer" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b => + { + b.Property("FileId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("FileId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Version") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.HasKey("FileId"); + + b.HasIndex("ResumeId") + .IsUnique(); + + b.ToTable("Files"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Skill", b => + { + b.Property("SkillId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SkillId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProficiencyLevel") + .HasColumnType("int"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("SkillId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Skills"); + + b.HasData( + new + { + SkillId = 1, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9196), + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9197), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 2, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9200), + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9200), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 3, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9202), + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9202), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 4, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9203), + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9204), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 5, + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9205), + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9205), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("BlogUrl") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Facebook") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("GitHub") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Instagram") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Linkedin") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("PersonalWebsite") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Twitter") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("BlogUrl"); + + b.HasIndex("ResumeId") + .IsUnique(); + + b.ToTable("SocialLinks"); + + b.HasData( + new + { + Id = 1, + BlogUrl = "https://bangararaju.kottedi.in/blog", + CreatedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9059), + GitHub = "https://github.com/rajukottedi", + Linkedin = "https://in.linkedin.com/in/bangara-raju-kottedi-299072109", + ModifiedDate = new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9060), + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Academic", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Academics") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Certification", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Certifications") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Experiences") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ExperienceDetails", b => + { + b.HasOne("PortBlog.API.Entities.Experience", "Experience") + .WithMany("Details") + .HasForeignKey("ExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Experience"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Hobby", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Hobbies") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.MessageStatusLog", b => + { + b.HasOne("PortBlog.API.Entities.Message", "Message") + .WithMany() + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Message"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Post", b => + { + b.HasOne("PortBlog.API.Entities.Blog", "Blog") + .WithMany("Posts") + .HasForeignKey("BlogUrl") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Blog"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Project", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Projects") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.HasOne("PortBlog.API.Entities.Candidate", "Candidate") + .WithMany("Resumes") + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithOne("ResumeFile") + .HasForeignKey("PortBlog.API.Entities.ResumeFile", "ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Skill", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Skills") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b => + { + b.HasOne("PortBlog.API.Entities.Blog", "Blog") + .WithMany() + .HasForeignKey("BlogUrl"); + + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithOne("SocialLinks") + .HasForeignKey("PortBlog.API.Entities.SocialLinks", "ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Blog"); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Blog", b => + { + b.Navigation("Posts"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Candidate", b => + { + b.Navigation("Resumes"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.Navigation("Academics"); + + b.Navigation("Certifications"); + + b.Navigation("Experiences"); + + b.Navigation("Hobbies"); + + b.Navigation("Projects"); + + b.Navigation("ResumeFile"); + + b.Navigation("Skills"); + + b.Navigation("SocialLinks"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.cs b/PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.cs new file mode 100644 index 0000000..bcdae2d --- /dev/null +++ b/PortBlog.API/Migrations/20240430123112_messagestatuslogtablechanges.cs @@ -0,0 +1,515 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace PortBlog.API.Migrations +{ + /// + public partial class messagestatuslogtablechanges : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Status", + table: "MessageStatusLogs", + type: "int", + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(10)", + oldMaxLength: 10) + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9168), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9168) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9172), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9173) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9175), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9175) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9257), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9257) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(8899), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(8914) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9381), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9381) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9384), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9384) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9386), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9386) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9387), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9387) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9389), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9389) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9391), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9391) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9392), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9393) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9394), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9394) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9346), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9346) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9352), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9352) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9355), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9355) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9357), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9358) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9077), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9078) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9083), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9083) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9085), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9086) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9087), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9087) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9321), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9318) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9327), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9325) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9329), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9328) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9227), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9227) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9234), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9234) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9237), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9237) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9037), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9038) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9196), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9197) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9200), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9200) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9202), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9202) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9203), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9204) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9205), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9205) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9059), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9060) }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Status", + table: "MessageStatusLogs", + type: "varchar(10)", + maxLength: 10, + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1988), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1988) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1992), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1992) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1994), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1995) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2101), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2101) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1782), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1797) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2184), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2184) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2187), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2188) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2189), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2189) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2190), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2191) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2192), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2192) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2194), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2194) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2195), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2195) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2196), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2197) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2153), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2154) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2159), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2159) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2162), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2163) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2165), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2166) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1959), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1960) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1964), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1965) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1967), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1967) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1969), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1969) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2123), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2120) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2129), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2128) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2132), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2131) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2039), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2040) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2076), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2076) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2078), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2079) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1920), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1920) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2012), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2013) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2016), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2017) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2018), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2018) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2020), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2020) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2021), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2021) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1939), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1940) }); + } + } +} diff --git a/PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.Designer.cs b/PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.Designer.cs new file mode 100644 index 0000000..dde5e67 --- /dev/null +++ b/PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.Designer.cs @@ -0,0 +1,1348 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using PortBlog.API.DbContexts; + +#nullable disable + +namespace PortBlog.API.Migrations +{ + [DbContext(typeof(CvBlogContext))] + [Migration("20240430143027_MessageStatusLogRemoved")] + partial class MessageStatusLogRemoved + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("PortBlog.API.Entities.Academic", b => + { + b.Property("AcademicId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("AcademicId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("DegreeSpecialization") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("EndYear") + .HasColumnType("int"); + + b.Property("Institution") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("AcademicId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Academics"); + + b.HasData( + new + { + AcademicId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2287), + Degree = "High School", + EndYear = 2007, + Institution = "Pragati Little Public School", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2287), + ResumeId = 1, + StartYear = 2006 + }, + new + { + AcademicId = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2291), + Degree = "Intermediate", + DegreeSpecialization = "MPC", + EndYear = 2009, + Institution = "Sri Chaitanya Junior College", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2291), + ResumeId = 1, + StartYear = 2007 + }, + new + { + AcademicId = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2293), + Degree = "BTech", + DegreeSpecialization = "ECE", + EndYear = 2013, + Institution = "Kakinada Institute of Technology & Science", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2294), + ResumeId = 1, + StartYear = 2009 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Blog", b => + { + b.Property("BlogUrl") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("BlogUrl"); + + b.ToTable("Blogs"); + + b.HasData( + new + { + BlogUrl = "https://bangararaju.kottedi.in/blog", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2404), + Description = "Your Hub for Tech, DIY, and Innovation", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2405), + Name = "Engineer's Odyssey" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Candidate", b => + { + b.Property("CandidateId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CandidateId")); + + b.Property("Address") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Avatar") + .HasColumnType("longtext"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Dob") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Gender") + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.HasKey("CandidateId"); + + b.ToTable("Candidates"); + + b.HasData( + new + { + CandidateId = 1, + Address = "Samalkot, Andhra Pradesh, India", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2070), + Dob = new DateTime(1992, 5, 6, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "bangararaju.kottedi@gmail.com", + FirstName = "Bangara Raju", + Gender = "Male", + LastName = "Kottedi", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2085), + Phone = "+91 9441212187" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Certification", b => + { + b.Property("CertificationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CertificationId")); + + b.Property("CertificationLink") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CertificationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpiryDate") + .HasColumnType("datetime(6)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)"); + + b.Property("IssuingOrganization") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("CertificationId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Certifications"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ClientLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ClientIp") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ClientLocation") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SiteUrl") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.ToTable("ClientLogs"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.Property("ExperienceId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ExperienceId")); + + b.Property("Company") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("StartDate") + .HasColumnType("datetime(6)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("ExperienceId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Experiences"); + + b.HasData( + new + { + ExperienceId = 1, + Company = "Agility E Services", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2454), + Description = "", + EndDate = new DateTime(2016, 4, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2454), + ResumeId = 1, + StartDate = new DateTime(2015, 9, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Jr. Software Engineer" + }, + new + { + ExperienceId = 2, + Company = "Agility", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2459), + Description = "", + EndDate = new DateTime(2022, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2460), + ResumeId = 1, + StartDate = new DateTime(2016, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Web Developer" + }, + new + { + ExperienceId = 3, + Company = "Agility", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2463), + Description = "", + EndDate = new DateTime(2022, 10, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2463), + ResumeId = 1, + StartDate = new DateTime(2022, 2, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Senior Web Developer" + }, + new + { + ExperienceId = 4, + Company = "Agility E Services", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2466), + Description = "", + EndDate = new DateTime(2024, 4, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2466), + ResumeId = 1, + StartDate = new DateTime(2022, 11, 4, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Technology Specialist" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ExperienceDetails", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Details") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ExperienceId") + .HasColumnType("int"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ExperienceId"); + + b.ToTable("ExperienceDetails"); + + b.HasData( + new + { + Id = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2490), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 1, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2490), + Order = 1 + }, + new + { + Id = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2493), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 1, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2494), + Order = 2 + }, + new + { + Id = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2495), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 2, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2496), + Order = 1 + }, + new + { + Id = 4, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2497), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 2, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2497), + Order = 2 + }, + new + { + Id = 5, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2498), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 3, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2499), + Order = 1 + }, + new + { + Id = 6, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2501), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 3, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2501), + Order = 2 + }, + new + { + Id = 7, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2502), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 4, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2502), + Order = 1 + }, + new + { + Id = 8, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2503), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 4, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2504), + Order = 2 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Hobby", b => + { + b.Property("HobbyId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("HobbyId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("HobbyId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Hobbies"); + + b.HasData( + new + { + HobbyId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2255), + Description = "Crafting Professional-Quality Websites with Precision", + Icon = "fa-square-terminal", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2256), + Name = "Web Development", + Order = 1, + ResumeId = 1 + }, + new + { + HobbyId = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2260), + Description = "Streamlining and Simplifying Complex Tasks through Automation", + Icon = "fa-robot", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2260), + Name = "Automation", + Order = 2, + ResumeId = 1 + }, + new + { + HobbyId = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2262), + Description = "Sharing the knowledge and insights I’ve gathered along my journey", + Icon = "fa-typewriter", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2262), + Name = "Blogging", + Order = 3, + ResumeId = 1 + }, + new + { + HobbyId = 4, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2264), + Description = "Cultivating Nature's Beauty and Bounty", + Icon = "fa-seedling", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2264), + Name = "Gardening", + Order = 4, + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Message", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Content") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SentStatus") + .HasColumnType("int"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Messages"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Post", b => + { + b.Property("PostId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PostId")); + + b.Property("Author") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BlogUrl") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Comments") + .HasColumnType("int"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Image") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Likes") + .HasColumnType("int"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("PostUrl") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Views") + .HasColumnType("int"); + + b.HasKey("PostId"); + + b.HasIndex("BlogUrl"); + + b.ToTable("Posts"); + + b.HasData( + new + { + PostId = 1, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2426), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2423), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }, + new + { + PostId = 2, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2431), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2429), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }, + new + { + PostId = 3, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2433), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2432), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProjectId")); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Challenges") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)"); + + b.Property("ImagePath") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Impact") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("LessonsLearned") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Responsibilities") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Roles") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("TechnologiesUsed") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("ProjectId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Projects"); + + b.HasData( + new + { + ProjectId = 1, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2375), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2376), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 2, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2381), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2381), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 3, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2384), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2384), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.Property("ResumeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResumeId")); + + b.Property("About") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CandidateId") + .HasColumnType("int"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("ResumeId"); + + b.HasIndex("CandidateId"); + + b.ToTable("Resumes"); + + b.HasData( + new + { + ResumeId = 1, + About = "I'm Full Stack Developer with 8+ years of hands-on experience in .NET development. Passionate and driven professional with expertise in .NET WebAPI, Angular, CI/CD, and a growing proficiency in Azure. I've successfully delivered robust applications, prioritizing efficiency and user experience. While I'm currently in the early stages of exploring Azure, I'm eager to expand my skill set and leverage cloud technologies to enhance scalability and performance. Known for my proactive approach and dedication to continuous learning, I'm committed to staying abreast of the latest technologies and methodologies to drive innovation and deliver exceptional results.", + CandidateId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2214), + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2215), + Order = 1, + Title = "Full Stack Developer" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b => + { + b.Property("FileId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("FileId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Version") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.HasKey("FileId"); + + b.HasIndex("ResumeId") + .IsUnique(); + + b.ToTable("Files"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Skill", b => + { + b.Property("SkillId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SkillId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProficiencyLevel") + .HasColumnType("int"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("SkillId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Skills"); + + b.HasData( + new + { + SkillId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2314), + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2315), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2318), + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2318), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2319), + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2320), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 4, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2350), + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2351), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 5, + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2352), + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2352), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("BlogUrl") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Facebook") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("GitHub") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Instagram") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Linkedin") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("PersonalWebsite") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Twitter") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("BlogUrl"); + + b.HasIndex("ResumeId") + .IsUnique(); + + b.ToTable("SocialLinks"); + + b.HasData( + new + { + Id = 1, + BlogUrl = "https://bangararaju.kottedi.in/blog", + CreatedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2237), + GitHub = "https://github.com/rajukottedi", + Linkedin = "https://in.linkedin.com/in/bangara-raju-kottedi-299072109", + ModifiedDate = new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2238), + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Academic", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Academics") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Certification", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Certifications") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Experiences") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ExperienceDetails", b => + { + b.HasOne("PortBlog.API.Entities.Experience", "Experience") + .WithMany("Details") + .HasForeignKey("ExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Experience"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Hobby", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Hobbies") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Post", b => + { + b.HasOne("PortBlog.API.Entities.Blog", "Blog") + .WithMany("Posts") + .HasForeignKey("BlogUrl") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Blog"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Project", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Projects") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.HasOne("PortBlog.API.Entities.Candidate", "Candidate") + .WithMany("Resumes") + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithOne("ResumeFile") + .HasForeignKey("PortBlog.API.Entities.ResumeFile", "ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Skill", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Skills") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b => + { + b.HasOne("PortBlog.API.Entities.Blog", "Blog") + .WithMany() + .HasForeignKey("BlogUrl"); + + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithOne("SocialLinks") + .HasForeignKey("PortBlog.API.Entities.SocialLinks", "ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Blog"); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Blog", b => + { + b.Navigation("Posts"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Candidate", b => + { + b.Navigation("Resumes"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.Navigation("Academics"); + + b.Navigation("Certifications"); + + b.Navigation("Experiences"); + + b.Navigation("Hobbies"); + + b.Navigation("Projects"); + + b.Navigation("ResumeFile"); + + b.Navigation("Skills"); + + b.Navigation("SocialLinks"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.cs b/PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.cs new file mode 100644 index 0000000..2221356 --- /dev/null +++ b/PortBlog.API/Migrations/20240430143027_MessageStatusLogRemoved.cs @@ -0,0 +1,537 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace PortBlog.API.Migrations +{ + /// + public partial class MessageStatusLogRemoved : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "MessageStatusLogs"); + + migrationBuilder.AddColumn( + name: "SentStatus", + table: "Messages", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2287), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2287) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2291), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2291) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2293), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2294) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2404), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2405) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2070), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2085) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2490), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2490) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2493), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2494) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2495), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2496) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2497), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2497) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2498), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2499) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2501), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2501) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2502), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2502) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2503), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2504) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2454), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2454) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2459), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2460) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2463), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2463) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2466), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2466) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2255), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2256) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2260), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2260) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2262), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2262) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2264), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2264) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2426), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2423) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2431), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2429) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2433), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2432) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2375), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2376) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2381), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2381) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2384), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2384) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2214), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2215) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2314), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2315) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2318), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2318) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2319), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2320) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2350), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2351) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2352), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2352) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2237), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2238) }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "SentStatus", + table: "Messages"); + + migrationBuilder.CreateTable( + name: "MessageStatusLogs", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + MessageId = table.Column(type: "int", nullable: false), + CreatedDate = table.Column(type: "datetime(6)", nullable: false), + Status = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_MessageStatusLogs", x => x.Id); + table.ForeignKey( + name: "FK_MessageStatusLogs_Messages_MessageId", + column: x => x.MessageId, + principalTable: "Messages", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9168), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9168) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9172), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9173) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9175), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9175) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9257), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9257) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(8899), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(8914) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9381), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9381) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9384), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9384) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9386), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9386) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9387), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9387) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9389), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9389) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9391), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9391) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9392), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9393) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9394), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9394) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9346), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9346) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9352), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9352) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9355), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9355) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9357), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9358) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9077), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9078) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9083), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9083) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9085), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9086) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9087), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9087) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9321), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9318) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9327), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9325) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9329), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9328) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9227), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9227) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9234), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9234) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9237), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9237) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9037), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9038) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9196), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9197) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9200), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9200) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9202), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9202) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9203), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9204) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9205), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9205) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9059), new DateTime(2024, 4, 30, 18, 1, 11, 705, DateTimeKind.Local).AddTicks(9060) }); + + migrationBuilder.CreateIndex( + name: "IX_MessageStatusLogs_MessageId", + table: "MessageStatusLogs", + column: "MessageId"); + } + } +} diff --git a/PortBlog.API/Migrations/20240430150543_MessageChanges.Designer.cs b/PortBlog.API/Migrations/20240430150543_MessageChanges.Designer.cs new file mode 100644 index 0000000..4c3aefc --- /dev/null +++ b/PortBlog.API/Migrations/20240430150543_MessageChanges.Designer.cs @@ -0,0 +1,1369 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using PortBlog.API.DbContexts; + +#nullable disable + +namespace PortBlog.API.Migrations +{ + [DbContext(typeof(CvBlogContext))] + [Migration("20240430150543_MessageChanges")] + partial class MessageChanges + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("PortBlog.API.Entities.Academic", b => + { + b.Property("AcademicId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("AcademicId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Degree") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("DegreeSpecialization") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("EndYear") + .HasColumnType("int"); + + b.Property("Institution") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.HasKey("AcademicId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Academics"); + + b.HasData( + new + { + AcademicId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4502), + Degree = "High School", + EndYear = 2007, + Institution = "Pragati Little Public School", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4503), + ResumeId = 1, + StartYear = 2006 + }, + new + { + AcademicId = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4505), + Degree = "Intermediate", + DegreeSpecialization = "MPC", + EndYear = 2009, + Institution = "Sri Chaitanya Junior College", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4505), + ResumeId = 1, + StartYear = 2007 + }, + new + { + AcademicId = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4538), + Degree = "BTech", + DegreeSpecialization = "ECE", + EndYear = 2013, + Institution = "Kakinada Institute of Technology & Science", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4538), + ResumeId = 1, + StartYear = 2009 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Blog", b => + { + b.Property("BlogUrl") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("BlogUrl"); + + b.ToTable("Blogs"); + + b.HasData( + new + { + BlogUrl = "https://bangararaju.kottedi.in/blog", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4614), + Description = "Your Hub for Tech, DIY, and Innovation", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4615), + Name = "Engineer's Odyssey" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Candidate", b => + { + b.Property("CandidateId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CandidateId")); + + b.Property("Address") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Avatar") + .HasColumnType("longtext"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Dob") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Gender") + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.HasKey("CandidateId"); + + b.ToTable("Candidates"); + + b.HasData( + new + { + CandidateId = 1, + Address = "Samalkot, Andhra Pradesh, India", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4300), + Dob = new DateTime(1992, 5, 6, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "bangararaju.kottedi@gmail.com", + FirstName = "Bangara Raju", + Gender = "Male", + LastName = "Kottedi", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4316), + Phone = "+91 9441212187" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Certification", b => + { + b.Property("CertificationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CertificationId")); + + b.Property("CertificationLink") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CertificationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpiryDate") + .HasColumnType("datetime(6)"); + + b.Property("IssueDate") + .HasColumnType("datetime(6)"); + + b.Property("IssuingOrganization") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("CertificationId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Certifications"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ClientLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ClientIp") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ClientLocation") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("SiteName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SiteUrl") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.ToTable("ClientLogs"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.Property("ExperienceId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ExperienceId")); + + b.Property("Company") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)"); + + b.Property("Location") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("StartDate") + .HasColumnType("datetime(6)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("ExperienceId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Experiences"); + + b.HasData( + new + { + ExperienceId = 1, + Company = "Agility E Services", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4663), + Description = "", + EndDate = new DateTime(2016, 4, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4664), + ResumeId = 1, + StartDate = new DateTime(2015, 9, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Jr. Software Engineer" + }, + new + { + ExperienceId = 2, + Company = "Agility", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4668), + Description = "", + EndDate = new DateTime(2022, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4668), + ResumeId = 1, + StartDate = new DateTime(2016, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Web Developer" + }, + new + { + ExperienceId = 3, + Company = "Agility", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4671), + Description = "", + EndDate = new DateTime(2022, 10, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4671), + ResumeId = 1, + StartDate = new DateTime(2022, 2, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Senior Web Developer" + }, + new + { + ExperienceId = 4, + Company = "Agility E Services", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4673), + Description = "", + EndDate = new DateTime(2024, 4, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4673), + ResumeId = 1, + StartDate = new DateTime(2022, 11, 4, 0, 0, 0, 0, DateTimeKind.Unspecified), + Title = "Technology Specialist" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ExperienceDetails", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Details") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ExperienceId") + .HasColumnType("int"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ExperienceId"); + + b.ToTable("ExperienceDetails"); + + b.HasData( + new + { + Id = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4696), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 1, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4696), + Order = 1 + }, + new + { + Id = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4699), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 1, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4699), + Order = 2 + }, + new + { + Id = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4700), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 2, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4701), + Order = 1 + }, + new + { + Id = 4, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4702), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 2, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4702), + Order = 2 + }, + new + { + Id = 5, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4703), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 3, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4703), + Order = 1 + }, + new + { + Id = 6, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4705), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 3, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4705), + Order = 2 + }, + new + { + Id = 7, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4706), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 4, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4707), + Order = 1 + }, + new + { + Id = 8, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4708), + Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", + ExperienceId = 4, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4708), + Order = 2 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Hobby", b => + { + b.Property("HobbyId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("HobbyId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("HobbyId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Hobbies"); + + b.HasData( + new + { + HobbyId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4471), + Description = "Crafting Professional-Quality Websites with Precision", + Icon = "fa-square-terminal", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4471), + Name = "Web Development", + Order = 1, + ResumeId = 1 + }, + new + { + HobbyId = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4476), + Description = "Streamlining and Simplifying Complex Tasks through Automation", + Icon = "fa-robot", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4476), + Name = "Automation", + Order = 2, + ResumeId = 1 + }, + new + { + HobbyId = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4478), + Description = "Sharing the knowledge and insights I’ve gathered along my journey", + Icon = "fa-typewriter", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4478), + Name = "Blogging", + Order = 3, + ResumeId = 1 + }, + new + { + HobbyId = 4, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4480), + Description = "Cultivating Nature's Beauty and Bounty", + Icon = "fa-seedling", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4480), + Name = "Gardening", + Order = 4, + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Message", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CandidateId") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FromEmail") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SentStatus") + .HasColumnType("int"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ToEmail") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("CandidateId"); + + b.ToTable("Messages"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Post", b => + { + b.Property("PostId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PostId")); + + b.Property("Author") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("BlogUrl") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Comments") + .HasColumnType("int"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Image") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Likes") + .HasColumnType("int"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("PostUrl") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Views") + .HasColumnType("int"); + + b.HasKey("PostId"); + + b.HasIndex("BlogUrl"); + + b.ToTable("Posts"); + + b.HasData( + new + { + PostId = 1, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4636), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4634), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }, + new + { + PostId = 2, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4641), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4639), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }, + new + { + PostId = 3, + BlogUrl = "https://bangararaju.kottedi.in/blog", + Category = "Welcome", + Comments = 0, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4643), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4642), + PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", + Slug = "hello-world", + Title = "Hello World", + Views = 0 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProjectId")); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Challenges") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime(6)"); + + b.Property("ImagePath") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Impact") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("LessonsLearned") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Responsibilities") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Roles") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("StartDate") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("TechnologiesUsed") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("ProjectId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Projects"); + + b.HasData( + new + { + ProjectId = 1, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4586), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4586), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 2, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4590), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4591), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 3, + Category = "Web Development", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4593), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4593), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.Property("ResumeId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResumeId")); + + b.Property("About") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CandidateId") + .HasColumnType("int"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("ResumeId"); + + b.HasIndex("CandidateId"); + + b.ToTable("Resumes"); + + b.HasData( + new + { + ResumeId = 1, + About = "I'm Full Stack Developer with 8+ years of hands-on experience in .NET development. Passionate and driven professional with expertise in .NET WebAPI, Angular, CI/CD, and a growing proficiency in Azure. I've successfully delivered robust applications, prioritizing efficiency and user experience. While I'm currently in the early stages of exploring Azure, I'm eager to expand my skill set and leverage cloud technologies to enhance scalability and performance. Known for my proactive approach and dedication to continuous learning, I'm committed to staying abreast of the latest technologies and methodologies to drive innovation and deliver exceptional results.", + CandidateId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4431), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4431), + Order = 1, + Title = "Full Stack Developer" + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b => + { + b.Property("FileId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("FileId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("FileFormat") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FilePath") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Version") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.HasKey("FileId"); + + b.HasIndex("ResumeId") + .IsUnique(); + + b.ToTable("Files"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Skill", b => + { + b.Property("SkillId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SkillId")); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProficiencyLevel") + .HasColumnType("int"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.HasKey("SkillId"); + + b.HasIndex("ResumeId"); + + b.ToTable("Skills"); + + b.HasData( + new + { + SkillId = 1, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4559), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4559), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 2, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4562), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4562), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 3, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4564), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4564), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 4, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4565), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4565), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 5, + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4566), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4567), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("BlogUrl") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("CreatedBy") + .HasColumnType("longtext"); + + b.Property("CreatedDate") + .HasColumnType("datetime(6)"); + + b.Property("Facebook") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("GitHub") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Instagram") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Linkedin") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ModifiedBy") + .HasColumnType("longtext"); + + b.Property("ModifiedDate") + .HasColumnType("datetime(6)"); + + b.Property("PersonalWebsite") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResumeId") + .HasColumnType("int"); + + b.Property("Twitter") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("BlogUrl"); + + b.HasIndex("ResumeId") + .IsUnique(); + + b.ToTable("SocialLinks"); + + b.HasData( + new + { + Id = 1, + BlogUrl = "https://bangararaju.kottedi.in/blog", + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4453), + GitHub = "https://github.com/rajukottedi", + Linkedin = "https://in.linkedin.com/in/bangara-raju-kottedi-299072109", + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4453), + ResumeId = 1 + }); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Academic", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Academics") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Certification", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Certifications") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Experiences") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ExperienceDetails", b => + { + b.HasOne("PortBlog.API.Entities.Experience", "Experience") + .WithMany("Details") + .HasForeignKey("ExperienceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Experience"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Hobby", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Hobbies") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Message", b => + { + b.HasOne("PortBlog.API.Entities.Candidate", "Candidate") + .WithMany() + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Post", b => + { + b.HasOne("PortBlog.API.Entities.Blog", "Blog") + .WithMany("Posts") + .HasForeignKey("BlogUrl") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Blog"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Project", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Projects") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.HasOne("PortBlog.API.Entities.Candidate", "Candidate") + .WithMany("Resumes") + .HasForeignKey("CandidateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Candidate"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithOne("ResumeFile") + .HasForeignKey("PortBlog.API.Entities.ResumeFile", "ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Skill", b => + { + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithMany("Skills") + .HasForeignKey("ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b => + { + b.HasOne("PortBlog.API.Entities.Blog", "Blog") + .WithMany() + .HasForeignKey("BlogUrl"); + + b.HasOne("PortBlog.API.Entities.Resume", "Resume") + .WithOne("SocialLinks") + .HasForeignKey("PortBlog.API.Entities.SocialLinks", "ResumeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Blog"); + + b.Navigation("Resume"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Blog", b => + { + b.Navigation("Posts"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Candidate", b => + { + b.Navigation("Resumes"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Experience", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("PortBlog.API.Entities.Resume", b => + { + b.Navigation("Academics"); + + b.Navigation("Certifications"); + + b.Navigation("Experiences"); + + b.Navigation("Hobbies"); + + b.Navigation("Projects"); + + b.Navigation("ResumeFile"); + + b.Navigation("Skills"); + + b.Navigation("SocialLinks"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/PortBlog.API/Migrations/20240430150543_MessageChanges.cs b/PortBlog.API/Migrations/20240430150543_MessageChanges.cs new file mode 100644 index 0000000..204932b --- /dev/null +++ b/PortBlog.API/Migrations/20240430150543_MessageChanges.cs @@ -0,0 +1,550 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace PortBlog.API.Migrations +{ + /// + public partial class MessageChanges : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Email", + table: "Messages", + newName: "ToEmail"); + + migrationBuilder.AddColumn( + name: "CandidateId", + table: "Messages", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "FromEmail", + table: "Messages", + type: "varchar(100)", + maxLength: 100, + nullable: false, + defaultValue: "") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4502), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4503) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4505), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4505) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4538), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4538) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4614), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4615) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4300), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4316) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4696), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4696) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4699), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4699) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4700), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4701) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4702), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4702) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4703), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4703) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4705), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4705) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4706), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4707) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4708), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4708) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4663), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4664) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4668), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4668) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4671), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4671) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4673), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4673) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4471), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4471) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4476), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4476) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4478), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4478) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4480), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4480) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4636), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4634) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4641), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4639) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4643), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4642) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4586), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4586) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4590), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4591) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4593), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4593) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4431), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4431) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4559), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4559) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4562), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4562) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4564), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4564) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4565), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4565) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4566), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4567) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4453), new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4453) }); + + migrationBuilder.CreateIndex( + name: "IX_Messages_CandidateId", + table: "Messages", + column: "CandidateId"); + + migrationBuilder.AddForeignKey( + name: "FK_Messages_Candidates_CandidateId", + table: "Messages", + column: "CandidateId", + principalTable: "Candidates", + principalColumn: "CandidateId", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_Messages_Candidates_CandidateId", + table: "Messages"); + + migrationBuilder.DropIndex( + name: "IX_Messages_CandidateId", + table: "Messages"); + + migrationBuilder.DropColumn( + name: "CandidateId", + table: "Messages"); + + migrationBuilder.DropColumn( + name: "FromEmail", + table: "Messages"); + + migrationBuilder.RenameColumn( + name: "ToEmail", + table: "Messages", + newName: "Email"); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2287), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2287) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2291), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2291) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2293), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2294) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2404), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2405) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2070), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2085) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2490), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2490) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2493), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2494) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2495), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2496) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2497), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2497) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2498), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2499) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2501), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2501) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2502), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2502) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2503), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2504) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2454), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2454) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2459), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2460) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2463), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2463) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2466), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2466) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2255), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2256) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2260), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2260) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2262), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2262) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2264), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2264) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2426), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2423) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2431), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2429) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2433), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2432) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2375), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2376) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2381), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2381) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2384), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2384) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2214), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2215) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2314), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2315) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2318), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2318) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2319), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2320) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2350), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2351) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2352), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2352) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2237), new DateTime(2024, 4, 30, 20, 0, 26, 531, DateTimeKind.Local).AddTicks(2238) }); + } + } +} diff --git a/PortBlog.API/Migrations/CvBlogContextModelSnapshot.cs b/PortBlog.API/Migrations/CvBlogContextModelSnapshot.cs index c7d78ef..880a64b 100644 --- a/PortBlog.API/Migrations/CvBlogContextModelSnapshot.cs +++ b/PortBlog.API/Migrations/CvBlogContextModelSnapshot.cs @@ -75,35 +75,35 @@ namespace PortBlog.API.Migrations new { AcademicId = 1, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1988), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4502), Degree = "High School", EndYear = 2007, Institution = "Pragati Little Public School", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1988), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4503), ResumeId = 1, StartYear = 2006 }, new { AcademicId = 2, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1992), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4505), Degree = "Intermediate", DegreeSpecialization = "MPC", EndYear = 2009, Institution = "Sri Chaitanya Junior College", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1992), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4505), ResumeId = 1, StartYear = 2007 }, new { AcademicId = 3, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1994), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4538), Degree = "BTech", DegreeSpecialization = "ECE", EndYear = 2013, Institution = "Kakinada Institute of Technology & Science", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1995), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4538), ResumeId = 1, StartYear = 2009 }); @@ -144,9 +144,9 @@ namespace PortBlog.API.Migrations new { BlogUrl = "https://bangararaju.kottedi.in/blog", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2101), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4614), Description = "Your Hub for Tech, DIY, and Innovation", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2101), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4615), Name = "Engineer's Odyssey" }); }); @@ -213,13 +213,13 @@ namespace PortBlog.API.Migrations { CandidateId = 1, Address = "Samalkot, Andhra Pradesh, India", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1782), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4300), Dob = new DateTime(1992, 5, 6, 0, 0, 0, 0, DateTimeKind.Unspecified), Email = "bangararaju.kottedi@gmail.com", FirstName = "Bangara Raju", Gender = "Male", LastName = "Kottedi", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1797), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4316), Phone = "+91 9441212187" }); }); @@ -366,11 +366,11 @@ namespace PortBlog.API.Migrations { ExperienceId = 1, Company = "Agility E Services", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2153), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4663), Description = "", EndDate = new DateTime(2016, 4, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Hyderabad", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2154), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4664), ResumeId = 1, StartDate = new DateTime(2015, 9, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), Title = "Jr. Software Engineer" @@ -379,11 +379,11 @@ namespace PortBlog.API.Migrations { ExperienceId = 2, Company = "Agility", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2159), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4668), Description = "", EndDate = new DateTime(2022, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Kuwait", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2159), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4668), ResumeId = 1, StartDate = new DateTime(2016, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), Title = "Web Developer" @@ -392,11 +392,11 @@ namespace PortBlog.API.Migrations { ExperienceId = 3, Company = "Agility", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2162), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4671), Description = "", EndDate = new DateTime(2022, 10, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Kuwait", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2163), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4671), ResumeId = 1, StartDate = new DateTime(2022, 2, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), Title = "Senior Web Developer" @@ -405,11 +405,11 @@ namespace PortBlog.API.Migrations { ExperienceId = 4, Company = "Agility E Services", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2165), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4673), Description = "", EndDate = new DateTime(2024, 4, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Hyderabad", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2166), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4673), ResumeId = 1, StartDate = new DateTime(2022, 11, 4, 0, 0, 0, 0, DateTimeKind.Unspecified), Title = "Technology Specialist" @@ -457,73 +457,73 @@ namespace PortBlog.API.Migrations new { Id = 1, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2184), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4696), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 1, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2184), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4696), Order = 1 }, new { Id = 2, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2187), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4699), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 1, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2188), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4699), Order = 2 }, new { Id = 3, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2189), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4700), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 2, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2189), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4701), Order = 1 }, new { Id = 4, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2190), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4702), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 2, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2191), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4702), Order = 2 }, new { Id = 5, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2192), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4703), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 3, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2192), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4703), Order = 1 }, new { Id = 6, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2194), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4705), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 3, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2194), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4705), Order = 2 }, new { Id = 7, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2195), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4706), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 4, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2195), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4707), Order = 1 }, new { Id = 8, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2196), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4708), Details = "Worked on the YouTube Captions team, in Javascript and Python to plan, to design and develop the full stack to add and edit Automatic Speech Recognition captions.", ExperienceId = 4, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2197), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4708), Order = 2 }); }); @@ -578,10 +578,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 1, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1959), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4471), Description = "Crafting Professional-Quality Websites with Precision", Icon = "fa-square-terminal", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1960), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4471), Name = "Web Development", Order = 1, ResumeId = 1 @@ -589,10 +589,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 2, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1964), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4476), Description = "Streamlining and Simplifying Complex Tasks through Automation", Icon = "fa-robot", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1965), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4476), Name = "Automation", Order = 2, ResumeId = 1 @@ -600,10 +600,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 3, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1967), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4478), Description = "Sharing the knowledge and insights I’ve gathered along my journey", Icon = "fa-typewriter", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1967), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4478), Name = "Blogging", Order = 3, ResumeId = 1 @@ -611,10 +611,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 4, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1969), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4480), Description = "Cultivating Nature's Beauty and Bounty", Icon = "fa-seedling", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1969), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4480), Name = "Gardening", Order = 4, ResumeId = 1 @@ -629,6 +629,9 @@ namespace PortBlog.API.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + b.Property("CandidateId") + .HasColumnType("int"); + b.Property("Content") .IsRequired() .HasMaxLength(500) @@ -637,7 +640,7 @@ namespace PortBlog.API.Migrations b.Property("CreatedDate") .HasColumnType("datetime(6)"); - b.Property("Email") + b.Property("FromEmail") .IsRequired() .HasMaxLength(100) .HasColumnType("varchar(100)"); @@ -647,42 +650,26 @@ namespace PortBlog.API.Migrations .HasMaxLength(50) .HasColumnType("varchar(50)"); + b.Property("SentStatus") + .HasColumnType("int"); + b.Property("Subject") .IsRequired() .HasMaxLength(50) .HasColumnType("varchar(50)"); + b.Property("ToEmail") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + b.HasKey("Id"); + b.HasIndex("CandidateId"); + b.ToTable("Messages"); }); - modelBuilder.Entity("PortBlog.API.Entities.MessageStatusLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreatedDate") - .HasColumnType("datetime(6)"); - - b.Property("MessageId") - .HasColumnType("int"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)"); - - b.HasKey("Id"); - - b.HasIndex("MessageId"); - - b.ToTable("MessageStatusLogs"); - }); - modelBuilder.Entity("PortBlog.API.Entities.Post", b => { b.Property("PostId") @@ -763,10 +750,10 @@ namespace PortBlog.API.Migrations BlogUrl = "https://bangararaju.kottedi.in/blog", Category = "Welcome", Comments = 0, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2123), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4636), Description = "Hello World", Likes = 0, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2120), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4634), PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", Slug = "hello-world", Title = "Hello World", @@ -778,10 +765,10 @@ namespace PortBlog.API.Migrations BlogUrl = "https://bangararaju.kottedi.in/blog", Category = "Welcome", Comments = 0, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2129), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4641), Description = "Hello World", Likes = 0, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2128), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4639), PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", Slug = "hello-world", Title = "Hello World", @@ -793,10 +780,10 @@ namespace PortBlog.API.Migrations BlogUrl = "https://bangararaju.kottedi.in/blog", Category = "Welcome", Comments = 0, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2132), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4643), Description = "Hello World", Likes = 0, - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2131), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4642), PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", Slug = "hello-world", Title = "Hello World", @@ -894,10 +881,10 @@ namespace PortBlog.API.Migrations { ProjectId = 1, Category = "Web Development", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2039), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4586), Description = "Business Process Management", ImagePath = "", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2040), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4586), Name = "Transfora (Business Process Management)", Responsibilities = "Developing, Testing, Support", ResumeId = 1, @@ -908,10 +895,10 @@ namespace PortBlog.API.Migrations { ProjectId = 2, Category = "Web Development", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2076), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4590), Description = "Business Process Management", ImagePath = "", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2076), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4591), Name = "Transfora (Business Process Management)", Responsibilities = "Developing, Testing, Support", ResumeId = 1, @@ -922,10 +909,10 @@ namespace PortBlog.API.Migrations { ProjectId = 3, Category = "Web Development", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2078), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4593), Description = "Business Process Management", ImagePath = "", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2079), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4593), Name = "Transfora (Business Process Management)", Responsibilities = "Developing, Testing, Support", ResumeId = 1, @@ -982,8 +969,8 @@ namespace PortBlog.API.Migrations ResumeId = 1, About = "I'm Full Stack Developer with 8+ years of hands-on experience in .NET development. Passionate and driven professional with expertise in .NET WebAPI, Angular, CI/CD, and a growing proficiency in Azure. I've successfully delivered robust applications, prioritizing efficiency and user experience. While I'm currently in the early stages of exploring Azure, I'm eager to expand my skill set and leverage cloud technologies to enhance scalability and performance. Known for my proactive approach and dedication to continuous learning, I'm committed to staying abreast of the latest technologies and methodologies to drive innovation and deliver exceptional results.", CandidateId = 1, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1920), - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1920), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4431), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4431), Order = 1, Title = "Full Stack Developer" }); @@ -1084,8 +1071,8 @@ namespace PortBlog.API.Migrations new { SkillId = 1, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2012), - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2013), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4559), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4559), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1093,8 +1080,8 @@ namespace PortBlog.API.Migrations new { SkillId = 2, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2016), - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2017), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4562), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4562), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1102,8 +1089,8 @@ namespace PortBlog.API.Migrations new { SkillId = 3, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2018), - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2018), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4564), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4564), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1111,8 +1098,8 @@ namespace PortBlog.API.Migrations new { SkillId = 4, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2020), - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2020), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4565), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4565), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1120,8 +1107,8 @@ namespace PortBlog.API.Migrations new { SkillId = 5, - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2021), - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2021), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4566), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4567), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1194,10 +1181,10 @@ namespace PortBlog.API.Migrations { Id = 1, BlogUrl = "https://bangararaju.kottedi.in/blog", - CreatedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1939), + CreatedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4453), GitHub = "https://github.com/rajukottedi", Linkedin = "https://in.linkedin.com/in/bangara-raju-kottedi-299072109", - ModifiedDate = new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1940), + ModifiedDate = new DateTime(2024, 4, 30, 20, 35, 41, 984, DateTimeKind.Local).AddTicks(4453), ResumeId = 1 }); }); @@ -1257,15 +1244,15 @@ namespace PortBlog.API.Migrations b.Navigation("Resume"); }); - modelBuilder.Entity("PortBlog.API.Entities.MessageStatusLog", b => + modelBuilder.Entity("PortBlog.API.Entities.Message", b => { - b.HasOne("PortBlog.API.Entities.Message", "Message") + b.HasOne("PortBlog.API.Entities.Candidate", "Candidate") .WithMany() - .HasForeignKey("MessageId") + .HasForeignKey("CandidateId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("Message"); + b.Navigation("Candidate"); }); modelBuilder.Entity("PortBlog.API.Entities.Post", b => diff --git a/PortBlog.API/Models/MailSettingsDto.cs b/PortBlog.API/Models/MailSettingsDto.cs new file mode 100644 index 0000000..570e4e0 --- /dev/null +++ b/PortBlog.API/Models/MailSettingsDto.cs @@ -0,0 +1,15 @@ +namespace PortBlog.API.Models +{ + public class MailSettingsDto + { + public string Host { get; set; } = string.Empty; + + public int Port { get; set; } + + public string Email { get; set; } = string.Empty; + + public string Password { get; set; } = string.Empty; + + public bool Enable { get; set; } = false; + } +} diff --git a/PortBlog.API/Models/MessageDto.cs b/PortBlog.API/Models/MessageDto.cs new file mode 100644 index 0000000..ab79c3e --- /dev/null +++ b/PortBlog.API/Models/MessageDto.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.DataAnnotations; + +namespace PortBlog.API.Models +{ + public class MessageDto + { + [Required(ErrorMessage = "You should provide a name.")] + [MaxLength(50)] + public string Name { get; set; } = string.Empty; + + [Required(ErrorMessage = "You should provide an email.")] + [EmailAddress] + [MaxLength(100)] + public string FromEmail { get; set; } = string.Empty; + + [Required(ErrorMessage = "Message cannot be empty.")] + [MaxLength(500)] + public string Content { get; set; } = string.Empty; + } +} diff --git a/PortBlog.API/Models/MessageSendDto.cs b/PortBlog.API/Models/MessageSendDto.cs new file mode 100644 index 0000000..803fcf2 --- /dev/null +++ b/PortBlog.API/Models/MessageSendDto.cs @@ -0,0 +1,26 @@ +using System.ComponentModel.DataAnnotations; + +namespace PortBlog.API.Models +{ + public class MessageSendDto + { + + public string Name { get; set; } = string.Empty; + + public string FromEmail { get; set; } = string.Empty; + + public string CandidateName { get; set; } = string.Empty; + + public string ToEmail { get; set; } = string.Empty; + + public string Subject { get; set; } = string.Empty; + + public string Content { get; set; } = string.Empty; + + public int SentStatus { get; set; } = 0; + + public DateTime CreatedDate { get; set; } = DateTime.Now; + + public int CandidateId { get; set; } + } +} diff --git a/PortBlog.API/PortBlog.API.csproj b/PortBlog.API/PortBlog.API.csproj index d67e2a7..fed1c6f 100644 --- a/PortBlog.API/PortBlog.API.csproj +++ b/PortBlog.API/PortBlog.API.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -25,7 +25,7 @@ - + diff --git a/PortBlog.API/PortBlog.API.xml b/PortBlog.API/PortBlog.API.xml index c8adac2..8f117b2 100644 --- a/PortBlog.API/PortBlog.API.xml +++ b/PortBlog.API/PortBlog.API.xml @@ -52,6 +52,15 @@ Candidate blog with posts Returns the requested candidate blog with posts + + + Send Message through email + + The id of the candidate to whom the message should be sent + Details of the Message to send to the candidate + Returns the status code + Returns nothing + @@ -100,6 +109,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CV details of the candidate diff --git a/PortBlog.API/Profiles/ResumeProfile.cs b/PortBlog.API/Profiles/ResumeProfile.cs index faf35db..8841e13 100644 --- a/PortBlog.API/Profiles/ResumeProfile.cs +++ b/PortBlog.API/Profiles/ResumeProfile.cs @@ -64,6 +64,8 @@ namespace PortBlog.API.Profiles CreateMap(); CreateMap(); CreateMap(); + CreateMap(); + CreateMap(); } } } diff --git a/PortBlog.API/Program.cs b/PortBlog.API/Program.cs index ac6567c..cce56f9 100644 --- a/PortBlog.API/Program.cs +++ b/PortBlog.API/Program.cs @@ -17,7 +17,7 @@ Log.Logger = new LoggerConfiguration() var builder = WebApplication.CreateBuilder(args); -var urls = builder.Configuration.GetRequiredSection("Urls"); +var urls = builder.Configuration.GetSection("Urls"); if (!string.IsNullOrEmpty(urls.Value)) { @@ -57,6 +57,7 @@ builder.Services => dbContextOptions.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString))); builder.Services.AddRepositories(); +builder.Services.AddServices(); builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies()); diff --git a/PortBlog.API/Repositories/Contracts/IMailRepository.cs b/PortBlog.API/Repositories/Contracts/IMailRepository.cs new file mode 100644 index 0000000..b9527ba --- /dev/null +++ b/PortBlog.API/Repositories/Contracts/IMailRepository.cs @@ -0,0 +1,11 @@ +using PortBlog.API.Entities; + +namespace PortBlog.API.Repositories.Contracts +{ + public interface IMailRepository + { + void AddMessage(Message message); + + Task SaveChangesAsync(); + } +} diff --git a/PortBlog.API/Repositories/MailRepository.cs b/PortBlog.API/Repositories/MailRepository.cs new file mode 100644 index 0000000..cc15aa7 --- /dev/null +++ b/PortBlog.API/Repositories/MailRepository.cs @@ -0,0 +1,25 @@ +using PortBlog.API.DbContexts; +using PortBlog.API.Entities; +using PortBlog.API.Repositories.Contracts; + +namespace PortBlog.API.Repositories +{ + public class MailRepository : IMailRepository + { + private readonly CvBlogContext _cvBlogContext; + + public MailRepository(CvBlogContext cvBlogContext) + { + _cvBlogContext = cvBlogContext; + } + public void AddMessage(Message message) + { + _cvBlogContext.Messages.Add(message); + } + + public async Task SaveChangesAsync() + { + return (await _cvBlogContext.SaveChangesAsync() >= 0); + } + } +} diff --git a/PortBlog.API/Services/Contracts/IMailService.cs b/PortBlog.API/Services/Contracts/IMailService.cs new file mode 100644 index 0000000..179b1d4 --- /dev/null +++ b/PortBlog.API/Services/Contracts/IMailService.cs @@ -0,0 +1,10 @@ +using PortBlog.API.Entities; +using PortBlog.API.Models; + +namespace PortBlog.API.Services.Contracts +{ + public interface IMailService + { + Task SendAsync(MessageSendDto message); + } +} diff --git a/PortBlog.API/Services/MailService.cs b/PortBlog.API/Services/MailService.cs new file mode 100644 index 0000000..5312f2e --- /dev/null +++ b/PortBlog.API/Services/MailService.cs @@ -0,0 +1,75 @@ +using AutoMapper; +using PortBlog.API.Common; +using PortBlog.API.Entities; +using PortBlog.API.Models; +using PortBlog.API.Repositories.Contracts; +using PortBlog.API.Services.Contracts; +using System.Net; +using System.Net.Mail; + +namespace PortBlog.API.Services +{ + public class MailService : IMailService + { + private readonly ILogger _logger; + private readonly IConfiguration _configuration; + private readonly IMailRepository _mailRepository; + private readonly IMapper _mapper; + + public MailService(IConfiguration configuration, ILogger logger, IMailRepository mailRepository, IMapper mapper) + { + _logger = logger; + _configuration = configuration; + _mailRepository = mailRepository; + _mapper = mapper; + } + + public async Task SendAsync(MessageSendDto messageSendDto) + { + _logger.LogInformation($"Sending message from {messageSendDto.Name} ({messageSendDto.FromEmail})."); + messageSendDto.Subject = $"Hello from {messageSendDto.Name}: Protfolio"; + var messageEntity = _mapper.Map(messageSendDto); + try + { + var mailSettings = _configuration.GetSection("MailSettings").Get(); + + if (mailSettings != null && mailSettings.Enable) + { + using (var client = new SmtpClient()) + { + client.Host = mailSettings.Host; + client.Port = mailSettings.Port; + client.DeliveryMethod = SmtpDeliveryMethod.Network; + client.UseDefaultCredentials = false; + client.EnableSsl = true; + client.Credentials = new NetworkCredential(mailSettings.Email, mailSettings.Password); + + using (var messageMessage = new MailMessage( + from: new MailAddress(messageSendDto.FromEmail, messageSendDto.Name), + to: new MailAddress(messageSendDto.ToEmail, messageSendDto.CandidateName) + )) + { + + messageMessage.Subject = messageSendDto.Subject; + messageMessage.Body = messageSendDto.Content; + + client.Send(messageMessage); + messageSendDto.SentStatus = (int)MailConstants.MailStatus.Success; + } + } + + _mailRepository.AddMessage(messageEntity); + await _mailRepository.SaveChangesAsync(); + } + } + catch (Exception ex) + { + _logger.LogCritical($"Exception while sending mail from {new MailAddress(messageSendDto.FromEmail, messageSendDto.Name)}", ex); + messageSendDto.SentStatus = (int)MailConstants.MailStatus.Failed; + _mailRepository.AddMessage(messageEntity); + await _mailRepository.SaveChangesAsync(); + throw new Exception(); + } + } + } +} diff --git a/PortBlog.API/appsettings.Development.json b/PortBlog.API/appsettings.Development.json index 5b58353..40797ac 100644 --- a/PortBlog.API/appsettings.Development.json +++ b/PortBlog.API/appsettings.Development.json @@ -11,5 +11,12 @@ } }, "XApiKey": "c6eAXYcNT873TT7BfMgQyS4ii7hxa53TLEUN7pAGaaU=", - "Urls": "http://localhost:5000" + , + "MailSettings": { + "Enable": false, + "Host": "smtp.gmail.com", + "Port": 587, + "Email": "", + "Password": "" + } }