diff --git a/PortBlog.API/Controllers/BlogController.cs b/PortBlog.API/Controllers/BlogController.cs index ed15017..96b42d0 100644 --- a/PortBlog.API/Controllers/BlogController.cs +++ b/PortBlog.API/Controllers/BlogController.cs @@ -1,17 +1,52 @@ -using Microsoft.AspNetCore.Http; +using Asp.Versioning; +using AutoMapper; using Microsoft.AspNetCore.Mvc; +using PortBlog.API.Models; +using PortBlog.API.Repositories.Contracts; + namespace PortBlog.API.Controllers { - [Route("api/blog")] + [Route("api/v{version:apiVersion}/blog/posts")] [ApiController] + [ApiVersion(1)] public class BlogController : ControllerBase { private readonly ILogger _logger; + private readonly IBlogRepository _blogRepository; + private readonly IMapper _mapper; - public BlogController(ILogger logger) + public BlogController(ILogger logger, IBlogRepository blogRepository, IMapper mapper) { this._logger = logger; + this._blogRepository = blogRepository; + this._mapper = mapper; + } + + [HttpGet("GetPostLikesAndViews")] + public async Task GetPostLikesAndViews(string blogUrl, string postSlug) + { + var postMetrics = new PostMetricsDto(); + + if(!await this._blogRepository.BlogExistsAsync(blogUrl)) + { + _logger.LogInformation($"Blog with id {blogUrl} wasn't found when fetching post likes and views."); + return NotFound(); + } + + if (!await this._blogRepository.PostExistsAsync(blogUrl, postSlug)) + { + _logger.LogInformation($"Post with id {postSlug} wasn't found when fetching post likes and views."); + return Ok(postMetrics); + } + + var post = await _blogRepository.GetPostLikesAndViewsAsync(blogUrl, postSlug); + + postMetrics = _mapper.Map(post); + + postMetrics.PostExists = true; + + return Ok(postMetrics); } } } diff --git a/PortBlog.API/DbContexts/Seed/InitialData.cs b/PortBlog.API/DbContexts/Seed/InitialData.cs index 74a40c9..a1fc3a5 100644 --- a/PortBlog.API/DbContexts/Seed/InitialData.cs +++ b/PortBlog.API/DbContexts/Seed/InitialData.cs @@ -175,7 +175,7 @@ namespace PortBlog.API.DbContexts.Seed ProjectId = 1, Name = "Transfora (Business Process Management)", Description = "Business Process Management", - Categories = "Web Development", + Categories = ["Web Development"], ImagePath = "", TechnologiesUsed = ".NET, Angular", Responsibilities = "Developing, Testing, Support", @@ -187,7 +187,7 @@ namespace PortBlog.API.DbContexts.Seed ProjectId = 2, Name = "Transfora (Business Process Management)", Description = "Business Process Management", - Categories = "Web Development", + Categories = ["Web Development"], ImagePath = "", TechnologiesUsed = ".NET, Angular", Responsibilities = "Developing, Testing, Support", @@ -199,7 +199,7 @@ namespace PortBlog.API.DbContexts.Seed ProjectId = 3, Name = "Transfora (Business Process Management)", Description = "Business Process Management", - Categories = "Web Development", + Categories = ["Web Development"], ImagePath = "", TechnologiesUsed = ".NET, Angular", Responsibilities = "Developing, Testing, Support", @@ -229,7 +229,7 @@ namespace PortBlog.API.DbContexts.Seed Slug = "hello-world", Title = "Hello World", Description = "Hello World", - Categories = "Welcome", + Categories = ["Welcome"], PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", CreatedDate = DateTime.Now, BlogUrl = "https://bangararaju.kottedi.in/blog" @@ -240,7 +240,7 @@ namespace PortBlog.API.DbContexts.Seed Slug = "hello-world", Title = "Hello World", Description = "Hello World", - Categories = "Welcome", + Categories = ["Welcome"], PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", CreatedDate = DateTime.Now, BlogUrl = "https://bangararaju.kottedi.in/blog" @@ -251,7 +251,7 @@ namespace PortBlog.API.DbContexts.Seed Slug = "hello-world", Title = "Hello World", Description = "Hello World", - Categories = "Welcome", + Categories = ["Welcome"], PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", CreatedDate = DateTime.Now, BlogUrl = "https://bangararaju.kottedi.in/blog", diff --git a/PortBlog.API/Entities/Post.cs b/PortBlog.API/Entities/Post.cs index f54cf9f..9123352 100644 --- a/PortBlog.API/Entities/Post.cs +++ b/PortBlog.API/Entities/Post.cs @@ -23,7 +23,7 @@ namespace PortBlog.API.Entities [Required] [MaxLength(200)] - public string Categories { get; set; } = string.Empty; + public string[] Categories { get; set; } = []; [MaxLength(100)] public string? Author { get; set; } diff --git a/PortBlog.API/Entities/Project.cs b/PortBlog.API/Entities/Project.cs index f1cf2d4..fff8df0 100644 --- a/PortBlog.API/Entities/Project.cs +++ b/PortBlog.API/Entities/Project.cs @@ -19,7 +19,7 @@ namespace PortBlog.API.Entities [Required] [MaxLength(200)] - public string Categories { get; set; } = string.Empty; + public string[] Categories { get; set; } = []; [Required] [MaxLength(100)] diff --git a/PortBlog.API/Extensions/ServiceExtensions.cs b/PortBlog.API/Extensions/ServiceExtensions.cs index 502312b..68d4e5f 100644 --- a/PortBlog.API/Extensions/ServiceExtensions.cs +++ b/PortBlog.API/Extensions/ServiceExtensions.cs @@ -12,6 +12,7 @@ namespace PortBlog.API.Extensions services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); return services; } diff --git a/PortBlog.API/Migrations/20240506170311_categorycolumnchanges.Designer.cs b/PortBlog.API/Migrations/20240506170311_categorycolumnchanges.Designer.cs new file mode 100644 index 0000000..17b073b --- /dev/null +++ b/PortBlog.API/Migrations/20240506170311_categorycolumnchanges.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("20240506170311_categorycolumnchanges")] + partial class categorycolumnchanges + { + /// + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3707), + Degree = "High School", + EndYear = 2007, + Institution = "Pragati Little Public School", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3707), + ResumeId = 1, + StartYear = 2006 + }, + new + { + AcademicId = 2, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3710), + Degree = "Intermediate", + DegreeSpecialization = "MPC", + EndYear = 2009, + Institution = "Sri Chaitanya Junior College", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3711), + ResumeId = 1, + StartYear = 2007 + }, + new + { + AcademicId = 3, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3712), + Degree = "BTech", + DegreeSpecialization = "ECE", + EndYear = 2013, + Institution = "Kakinada Institute of Technology & Science", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3713), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3796), + Description = "Your Hub for Tech, DIY, and Innovation", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3796), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3501), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3517), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3858), + Description = "", + EndDate = new DateTime(2016, 4, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3859), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3863), + Description = "", + EndDate = new DateTime(2022, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3864), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3866), + Description = "", + EndDate = new DateTime(2022, 10, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Kuwait", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3867), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3869), + Description = "", + EndDate = new DateTime(2024, 4, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), + Location = "Hyderabad", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3869), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3896), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3896), + Order = 1 + }, + new + { + Id = 2, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3899), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3899), + Order = 2 + }, + new + { + Id = 3, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3900), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3901), + Order = 1 + }, + new + { + Id = 4, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3902), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3902), + Order = 2 + }, + new + { + Id = 5, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3903), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3904), + Order = 1 + }, + new + { + Id = 6, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3905), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3906), + Order = 2 + }, + new + { + Id = 7, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3907), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3907), + Order = 1 + }, + new + { + Id = 8, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3908), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3909), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3673), + Description = "Crafting Professional-Quality Websites with Precision", + Icon = "fa-square-terminal", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3673), + Name = "Web Development", + Order = 1, + ResumeId = 1 + }, + new + { + HobbyId = 2, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3678), + Description = "Streamlining and Simplifying Complex Tasks through Automation", + Icon = "fa-robot", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3678), + Name = "Automation", + Order = 2, + ResumeId = 1 + }, + new + { + HobbyId = 3, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3680), + Description = "Sharing the knowledge and insights I’ve gathered along my journey", + Icon = "fa-typewriter", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3680), + Name = "Blogging", + Order = 3, + ResumeId = 1 + }, + new + { + HobbyId = 4, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3682), + Description = "Cultivating Nature's Beauty and Bounty", + Icon = "fa-seedling", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3682), + 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("Categories") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + 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", + Categories = "[\"Welcome\"]", + Comments = 0, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3816), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3812), + 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", + Categories = "[\"Welcome\"]", + Comments = 0, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3821), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3819), + 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", + Categories = "[\"Welcome\"]", + Comments = 0, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3824), + Description = "Hello World", + Likes = 0, + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3823), + 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("Categories") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + 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, + Categories = "[\"Web Development\"]", + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3769), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3769), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 2, + Categories = "[\"Web Development\"]", + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3774), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3774), + Name = "Transfora (Business Process Management)", + Responsibilities = "Developing, Testing, Support", + ResumeId = 1, + Roles = "Coding, Reviewing, Testing", + TechnologiesUsed = ".NET, Angular" + }, + new + { + ProjectId = 3, + Categories = "[\"Web Development\"]", + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3777), + Description = "Business Process Management", + ImagePath = "", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3777), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3630), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3630), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3735), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3736), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 2, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3738), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3739), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 3, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3740), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3741), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 4, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3742), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3742), + Name = "Web Development", + ProficiencyLevel = 80, + ResumeId = 1 + }, + new + { + SkillId = 5, + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3743), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3743), + 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, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3652), + GitHub = "https://github.com/rajukottedi", + Linkedin = "https://in.linkedin.com/in/bangara-raju-kottedi-299072109", + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3652), + 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/20240506170311_categorycolumnchanges.cs b/PortBlog.API/Migrations/20240506170311_categorycolumnchanges.cs new file mode 100644 index 0000000..54dbfe0 --- /dev/null +++ b/PortBlog.API/Migrations/20240506170311_categorycolumnchanges.cs @@ -0,0 +1,495 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace PortBlog.API.Migrations +{ + /// + public partial class categorycolumnchanges : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3707), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3707) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3710), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3711) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3712), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3713) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3796), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3796) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3501), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3517) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3896), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3896) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3899), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3899) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3900), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3901) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3902), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3902) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3903), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3904) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3905), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3906) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3907), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3907) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3908), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3909) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3858), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3859) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3863), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3864) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3866), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3867) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3869), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3869) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3673), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3673) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3678), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3678) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3680), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3680) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3682), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3682) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "[\"Welcome\"]", new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3816), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3812) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "[\"Welcome\"]", new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3821), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3819) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "[\"Welcome\"]", new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3824), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3823) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "[\"Web Development\"]", new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3769), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3769) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "[\"Web Development\"]", new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3774), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3774) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "[\"Web Development\"]", new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3777), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3777) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3630), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3630) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3735), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3736) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3738), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3739) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3740), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3741) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3742), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3742) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3743), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3743) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3652), new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3652) }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6162), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6162) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6166), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6166) }); + + migrationBuilder.UpdateData( + table: "Academics", + keyColumn: "AcademicId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6168), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6168) }); + + migrationBuilder.UpdateData( + table: "Blogs", + keyColumn: "BlogUrl", + keyValue: "https://bangararaju.kottedi.in/blog", + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6248), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6248) }); + + migrationBuilder.UpdateData( + table: "Candidates", + keyColumn: "CandidateId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(5877), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(5895) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6333), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6333) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6336), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6337) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6338), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6338) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6339), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6340) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6341), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6341) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 6, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6343), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6343) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 7, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6344), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6345) }); + + migrationBuilder.UpdateData( + table: "ExperienceDetails", + keyColumn: "Id", + keyValue: 8, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6346), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6346) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6297), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6297) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6302), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6302) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6305), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6305) }); + + migrationBuilder.UpdateData( + table: "Experiences", + keyColumn: "ExperienceId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6307), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6308) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6128), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6128) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6134), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6135) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6137), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6137) }); + + migrationBuilder.UpdateData( + table: "Hobbies", + keyColumn: "HobbyId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6139), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6139) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 1, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "Welcome", new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6269), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6266) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 2, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "Welcome", new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6274), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6273) }); + + migrationBuilder.UpdateData( + table: "Posts", + keyColumn: "PostId", + keyValue: 3, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "Welcome", new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6277), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6276) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 1, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "Web Development", new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6218), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6219) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 2, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "Web Development", new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6224), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6225) }); + + migrationBuilder.UpdateData( + table: "Projects", + keyColumn: "ProjectId", + keyValue: 3, + columns: new[] { "Categories", "CreatedDate", "ModifiedDate" }, + values: new object[] { "Web Development", new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6227), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6227) }); + + migrationBuilder.UpdateData( + table: "Resumes", + keyColumn: "ResumeId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6082), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6082) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6187), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6187) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 2, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6191), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6191) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 3, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6193), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6193) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 4, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6194), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6195) }); + + migrationBuilder.UpdateData( + table: "Skills", + keyColumn: "SkillId", + keyValue: 5, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6196), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6196) }); + + migrationBuilder.UpdateData( + table: "SocialLinks", + keyColumn: "Id", + keyValue: 1, + columns: new[] { "CreatedDate", "ModifiedDate" }, + values: new object[] { new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6106), new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6106) }); + } + } +} diff --git a/PortBlog.API/Migrations/CvBlogContextModelSnapshot.cs b/PortBlog.API/Migrations/CvBlogContextModelSnapshot.cs index ad7d96b..6c276a5 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6162), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3707), Degree = "High School", EndYear = 2007, Institution = "Pragati Little Public School", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6162), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3707), ResumeId = 1, StartYear = 2006 }, new { AcademicId = 2, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6166), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3710), Degree = "Intermediate", DegreeSpecialization = "MPC", EndYear = 2009, Institution = "Sri Chaitanya Junior College", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6166), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3711), ResumeId = 1, StartYear = 2007 }, new { AcademicId = 3, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6168), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3712), Degree = "BTech", DegreeSpecialization = "ECE", EndYear = 2013, Institution = "Kakinada Institute of Technology & Science", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6168), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3713), ResumeId = 1, StartYear = 2009 }); @@ -144,9 +144,9 @@ namespace PortBlog.API.Migrations new { BlogUrl = "https://bangararaju.kottedi.in/blog", - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6248), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3796), Description = "Your Hub for Tech, DIY, and Innovation", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6248), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3796), Name = "Engineer's Odyssey" }); }); @@ -213,13 +213,13 @@ namespace PortBlog.API.Migrations { CandidateId = 1, Address = "Samalkot, Andhra Pradesh, India", - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(5877), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3501), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(5895), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3517), Phone = "+91 9441212187" }); }); @@ -366,11 +366,11 @@ namespace PortBlog.API.Migrations { ExperienceId = 1, Company = "Agility E Services", - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6297), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3858), Description = "", EndDate = new DateTime(2016, 4, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Hyderabad", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6297), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3859), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6302), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3863), Description = "", EndDate = new DateTime(2022, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Kuwait", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6302), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3864), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6305), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3866), Description = "", EndDate = new DateTime(2022, 10, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Kuwait", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6305), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3867), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6307), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3869), Description = "", EndDate = new DateTime(2024, 4, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), Location = "Hyderabad", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6308), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3869), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6333), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3896), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6333), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3896), Order = 1 }, new { Id = 2, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6336), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3899), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6337), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3899), Order = 2 }, new { Id = 3, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6338), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3900), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6338), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3901), Order = 1 }, new { Id = 4, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6339), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3902), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6340), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3902), Order = 2 }, new { Id = 5, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6341), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3903), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6341), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3904), Order = 1 }, new { Id = 6, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6343), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3905), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6343), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3906), Order = 2 }, new { Id = 7, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6344), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3907), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6345), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3907), Order = 1 }, new { Id = 8, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6346), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3908), 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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6346), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3909), Order = 2 }); }); @@ -578,10 +578,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 1, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6128), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3673), Description = "Crafting Professional-Quality Websites with Precision", Icon = "fa-square-terminal", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6128), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3673), Name = "Web Development", Order = 1, ResumeId = 1 @@ -589,10 +589,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 2, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6134), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3678), Description = "Streamlining and Simplifying Complex Tasks through Automation", Icon = "fa-robot", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6135), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3678), Name = "Automation", Order = 2, ResumeId = 1 @@ -600,10 +600,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 3, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6137), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3680), Description = "Sharing the knowledge and insights I’ve gathered along my journey", Icon = "fa-typewriter", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6137), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3680), Name = "Blogging", Order = 3, ResumeId = 1 @@ -611,10 +611,10 @@ namespace PortBlog.API.Migrations new { HobbyId = 4, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6139), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3682), Description = "Cultivating Nature's Beauty and Bounty", Icon = "fa-seedling", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6139), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3682), Name = "Gardening", Order = 4, ResumeId = 1 @@ -748,12 +748,12 @@ namespace PortBlog.API.Migrations { PostId = 1, BlogUrl = "https://bangararaju.kottedi.in/blog", - Categories = "Welcome", + Categories = "[\"Welcome\"]", Comments = 0, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6269), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3816), Description = "Hello World", Likes = 0, - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6266), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3812), PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", Slug = "hello-world", Title = "Hello World", @@ -763,12 +763,12 @@ namespace PortBlog.API.Migrations { PostId = 2, BlogUrl = "https://bangararaju.kottedi.in/blog", - Categories = "Welcome", + Categories = "[\"Welcome\"]", Comments = 0, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6274), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3821), Description = "Hello World", Likes = 0, - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6273), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3819), PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", Slug = "hello-world", Title = "Hello World", @@ -778,12 +778,12 @@ namespace PortBlog.API.Migrations { PostId = 3, BlogUrl = "https://bangararaju.kottedi.in/blog", - Categories = "Welcome", + Categories = "[\"Welcome\"]", Comments = 0, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6277), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3824), Description = "Hello World", Likes = 0, - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6276), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3823), PostUrl = "https://bangararaju.kottedi.in/blog/hello-world", Slug = "hello-world", Title = "Hello World", @@ -880,11 +880,11 @@ namespace PortBlog.API.Migrations new { ProjectId = 1, - Categories = "Web Development", - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6218), + Categories = "[\"Web Development\"]", + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3769), Description = "Business Process Management", ImagePath = "", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6219), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3769), Name = "Transfora (Business Process Management)", Responsibilities = "Developing, Testing, Support", ResumeId = 1, @@ -894,11 +894,11 @@ namespace PortBlog.API.Migrations new { ProjectId = 2, - Categories = "Web Development", - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6224), + Categories = "[\"Web Development\"]", + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3774), Description = "Business Process Management", ImagePath = "", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6225), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3774), Name = "Transfora (Business Process Management)", Responsibilities = "Developing, Testing, Support", ResumeId = 1, @@ -908,11 +908,11 @@ namespace PortBlog.API.Migrations new { ProjectId = 3, - Categories = "Web Development", - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6227), + Categories = "[\"Web Development\"]", + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3777), Description = "Business Process Management", ImagePath = "", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6227), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3777), Name = "Transfora (Business Process Management)", Responsibilities = "Developing, Testing, Support", ResumeId = 1, @@ -969,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, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6082), - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6082), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3630), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3630), Order = 1, Title = "Full Stack Developer" }); @@ -1071,8 +1071,8 @@ namespace PortBlog.API.Migrations new { SkillId = 1, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6187), - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6187), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3735), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3736), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1080,8 +1080,8 @@ namespace PortBlog.API.Migrations new { SkillId = 2, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6191), - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6191), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3738), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3739), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1089,8 +1089,8 @@ namespace PortBlog.API.Migrations new { SkillId = 3, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6193), - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6193), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3740), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3741), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1098,8 +1098,8 @@ namespace PortBlog.API.Migrations new { SkillId = 4, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6194), - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6195), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3742), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3742), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1107,8 +1107,8 @@ namespace PortBlog.API.Migrations new { SkillId = 5, - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6196), - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6196), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3743), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3743), Name = "Web Development", ProficiencyLevel = 80, ResumeId = 1 @@ -1181,10 +1181,10 @@ namespace PortBlog.API.Migrations { Id = 1, BlogUrl = "https://bangararaju.kottedi.in/blog", - CreatedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6106), + CreatedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3652), GitHub = "https://github.com/rajukottedi", Linkedin = "https://in.linkedin.com/in/bangara-raju-kottedi-299072109", - ModifiedDate = new DateTime(2024, 5, 2, 14, 46, 47, 828, DateTimeKind.Local).AddTicks(6106), + ModifiedDate = new DateTime(2024, 5, 6, 22, 33, 10, 710, DateTimeKind.Local).AddTicks(3652), ResumeId = 1 }); }); diff --git a/PortBlog.API/Models/CvDto.cs b/PortBlog.API/Models/CvDto.cs index 2efe6b8..0bdc31c 100644 --- a/PortBlog.API/Models/CvDto.cs +++ b/PortBlog.API/Models/CvDto.cs @@ -69,7 +69,7 @@ var projectCategories = new List(); foreach (var project in Projects) { - projectCategories.AddRange(project.CategoryList); + projectCategories.AddRange(project.Categories); } return projectCategories.Distinct().ToList(); } diff --git a/PortBlog.API/Models/PostCreatedDto.cs b/PortBlog.API/Models/PostCreatedDto.cs new file mode 100644 index 0000000..7c5c25e --- /dev/null +++ b/PortBlog.API/Models/PostCreatedDto.cs @@ -0,0 +1,29 @@ +namespace PortBlog.API.Models +{ + public class PostCreatedDto + { + public int PostId { get; set; } + + public string Slug { get; set; } = string.Empty; + + public string Title { get; set; } = string.Empty; + + public string Description { get; set; } = string.Empty; + + public string[] Categories { get; set; } = []; + + public string PostUrl { get; set; } = string.Empty; + + public int Likes { get; set; } = 0; + + public int Views { get; set; } = 0; + + public int Comments { get; set; } = 0; + + public string? Image { get; set; } + + public string? CreatedDate { get; set; } + + public string? ModifiedDate { get; set; } + } +} diff --git a/PortBlog.API/Models/PostDto.cs b/PortBlog.API/Models/PostDto.cs index e5f303f..0443b40 100644 --- a/PortBlog.API/Models/PostDto.cs +++ b/PortBlog.API/Models/PostDto.cs @@ -10,7 +10,7 @@ public string Description { get; set; } = string.Empty; - public string Categories { get; set; } = string.Empty; + public string[] Categories { get; set; } = []; public string PostUrl { get; set; } = string.Empty; diff --git a/PortBlog.API/Models/PostMetricsDto.cs b/PortBlog.API/Models/PostMetricsDto.cs new file mode 100644 index 0000000..87af3f8 --- /dev/null +++ b/PortBlog.API/Models/PostMetricsDto.cs @@ -0,0 +1,13 @@ +namespace PortBlog.API.Models +{ + public class PostMetricsDto + { + public int Likes { get; set; } = 0; + + public int Views { get; set; } = 0; + + public int Comments { get; set; } = 0; + + public bool PostExists { get; set; } = false; + } +} diff --git a/PortBlog.API/Models/ProjectDto.cs b/PortBlog.API/Models/ProjectDto.cs index 4e337be..be20506 100644 --- a/PortBlog.API/Models/ProjectDto.cs +++ b/PortBlog.API/Models/ProjectDto.cs @@ -10,9 +10,9 @@ namespace PortBlog.API.Models public string Description { get; set; } = string.Empty; - public string Categories { get; set; } = string.Empty; + public string[] Categories { get; set; } = []; - public ICollection CategoryList { get; set; } = new List(); + //public ICollection CategoryList { get; set; } = new List(); public ICollection Roles { get; set; } = new List(); diff --git a/PortBlog.API/Models/ProjectsDto.cs b/PortBlog.API/Models/ProjectsDto.cs index d40155c..b2a6732 100644 --- a/PortBlog.API/Models/ProjectsDto.cs +++ b/PortBlog.API/Models/ProjectsDto.cs @@ -11,7 +11,7 @@ var projectCategories = new List(); foreach(var project in Projects) { - projectCategories.AddRange(project.CategoryList); + projectCategories.AddRange(project.Categories); } return projectCategories.Distinct().ToList(); } diff --git a/PortBlog.API/PortBlog.API.xml b/PortBlog.API/PortBlog.API.xml index 2aa9968..9e4bf1d 100644 --- a/PortBlog.API/PortBlog.API.xml +++ b/PortBlog.API/PortBlog.API.xml @@ -157,6 +157,18 @@ + + + + + + + + + + + + CV details of the candidate diff --git a/PortBlog.API/Profiles/BlogProfile.cs b/PortBlog.API/Profiles/BlogProfile.cs index fb920f3..6f917dd 100644 --- a/PortBlog.API/Profiles/BlogProfile.cs +++ b/PortBlog.API/Profiles/BlogProfile.cs @@ -18,6 +18,7 @@ namespace PortBlog.API.Profiles dest => dest.ModifiedDate, opts => opts.MapFrom(src => src.ModifiedDate != null ? src.ModifiedDate.Value.ToString("MMM dd, yyyy") : string.Empty) ); + CreateMap(); } } } diff --git a/PortBlog.API/Profiles/ResumeProfile.cs b/PortBlog.API/Profiles/ResumeProfile.cs index 6b7b0e9..a3ebc8d 100644 --- a/PortBlog.API/Profiles/ResumeProfile.cs +++ b/PortBlog.API/Profiles/ResumeProfile.cs @@ -52,11 +52,6 @@ namespace PortBlog.API.Profiles ( dest => dest.TechnologiesUsed, src => src.MapFrom(src => !string.IsNullOrEmpty(src.TechnologiesUsed) ? src.TechnologiesUsed.Split(",", StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries).ToList() : new List()) - ) - .ForMember - ( - dest => dest.CategoryList, - src => src.MapFrom(src => !string.IsNullOrEmpty(src.Categories) ? src.Categories.Split(",", StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries).ToList() : new List()) ); CreateMap(); diff --git a/PortBlog.API/Program.cs b/PortBlog.API/Program.cs index 9732122..99b7dbc 100644 --- a/PortBlog.API/Program.cs +++ b/PortBlog.API/Program.cs @@ -38,6 +38,23 @@ if (!string.IsNullOrEmpty(urls.Value)) builder.WebHost.UseUrls(allowedUrlsToUse); } +var allowedCorsOrigins = builder.Configuration.GetRequiredSection("AllowedCorsOrigins"); + +if (!String.IsNullOrEmpty(allowedCorsOrigins.Value)) +{ + var origins = allowedCorsOrigins.Value.Split(","); + + builder.Services.AddCors(options => + { + options.AddDefaultPolicy( + policy => + { + policy.WithOrigins(origins); + policy.WithHeaders("XApiKey"); + }); + }); +} + builder.Host.UseSerilog(); // Add services to the container. @@ -139,6 +156,8 @@ builder.Services.AddSwaggerGen(c => var app = builder.Build(); +app.UseCors(); + if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler(); diff --git a/PortBlog.API/Repositories/BlogRepository.cs b/PortBlog.API/Repositories/BlogRepository.cs index f3a7b1e..b5b3ff0 100644 --- a/PortBlog.API/Repositories/BlogRepository.cs +++ b/PortBlog.API/Repositories/BlogRepository.cs @@ -23,5 +23,21 @@ namespace PortBlog.API.Repositories } return await _cvBlogContext.Blogs.Where(b => b.BlogUrl == blogUrl).FirstOrDefaultAsync(); } + + public async Task GetPostLikesAndViewsAsync(string blogUrl, string postSlug) + { + return await _cvBlogContext.Posts.Where(p => p.Slug == postSlug && p.BlogUrl == blogUrl).FirstOrDefaultAsync(); + } + + + public async Task PostExistsAsync(string blogUrl, string postSlug) + { + return await _cvBlogContext.Posts.AnyAsync(p => p.Slug == postSlug && p.BlogUrl == blogUrl); + } + + public async Task BlogExistsAsync(string blogUrl) + { + return await _cvBlogContext.Posts.AnyAsync(b => b.BlogUrl == blogUrl); + } } } diff --git a/PortBlog.API/Repositories/Contracts/IBlogRepository.cs b/PortBlog.API/Repositories/Contracts/IBlogRepository.cs index ebc68ff..cbdd270 100644 --- a/PortBlog.API/Repositories/Contracts/IBlogRepository.cs +++ b/PortBlog.API/Repositories/Contracts/IBlogRepository.cs @@ -5,5 +5,11 @@ namespace PortBlog.API.Repositories.Contracts public interface IBlogRepository { Task GetBlogAsync(string blogUrl, bool includePosts); + + Task GetPostLikesAndViewsAsync(string blogUrl, string postSlug); + + Task PostExistsAsync(string blogUrl, string postSlug); + + Task BlogExistsAsync(string blogUrl); } } diff --git a/PortBlog.API/appsettings.Development.json b/PortBlog.API/appsettings.Development.json index 2ba6296..ff1f1b7 100644 --- a/PortBlog.API/appsettings.Development.json +++ b/PortBlog.API/appsettings.Development.json @@ -17,5 +17,6 @@ "Port": 587, "Email": "", "Password": "" - } + }, + "AllowedCorsOrigins": "http://localhost:4000,http://127.0.0.1:4000" }