Database Migration, Repositories, Automapper, Logger, StaticFiles
This commit is contained in:
Bangara Raju Kottedi 2024-04-26 02:34:47 +05:30
parent 234912badb
commit 4c6f9a4ba8
70 changed files with 10151 additions and 32 deletions

View File

@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace PortBlog.API.Controllers
{
[Route("api/blog")]
[ApiController]
public class BlogController : ControllerBase
{
private readonly ILogger<BlogController> _logger;
public BlogController(ILogger<BlogController> logger)
{
this._logger = logger;
}
}
}

View File

@ -0,0 +1,50 @@
using AutoMapper;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using PortBlog.API.Entities;
using PortBlog.API.Models;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Controllers
{
[Route("api/cv")]
[ApiController]
public class CvController : ControllerBase
{
private readonly ILogger<CvController> _logger;
private readonly ICandidateRepository _candidateRepository;
private readonly IResumeRepository _resumeRepository;
private readonly IMapper _mapper;
public CvController(ILogger<CvController> logger, ICandidateRepository candidateRepository, IResumeRepository resumeRepository, IMapper mapper)
{
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
_candidateRepository = candidateRepository ?? throw new ArgumentNullException(nameof(candidateRepository));
_resumeRepository = resumeRepository ?? throw new ArgumentNullException(nameof(resumeRepository));
_mapper = mapper;
}
[HttpGet("{candidateId}")]
public async Task<ActionResult<ResumeDto>> Get(int candidateId)
{
try
{
if (!await _candidateRepository.CandidateExistAsync(candidateId))
{
_logger.LogInformation($"Candidate with id {candidateId} wasn't found when accessing cv details.");
return NotFound();
}
var latestResumeForCandidate = await _resumeRepository.GetLatestResumeForCandidateAsync(candidateId, true);
return Ok(_mapper.Map<ResumeDto>(latestResumeForCandidate));
}
catch (Exception ex)
{
_logger.LogCritical($"Exception while getting Cv details for the candidate with id {candidateId}.", ex);
return StatusCode(500, "A problem happened while handling your request.");
}
}
}
}

View File

@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Mvc;
namespace PortBlog.API.Controllers
{
[Route("api/blog/post")]
[ApiController]
public class PostController : ControllerBase
{
private readonly ILogger<PostController> _logger;
public PostController(ILogger<PostController> logger)
{
this._logger = logger;
}
}
}

View File

@ -1,8 +0,0 @@
using Microsoft.EntityFrameworkCore;
namespace PortBlog.API.DbContexts
{
public class BlogContext : DbContext
{
}
}

View File

@ -0,0 +1,59 @@
using Microsoft.EntityFrameworkCore;
using PortBlog.API.DbContexts.Seed;
using PortBlog.API.Entities;
namespace PortBlog.API.DbContexts
{
public class CvBlogContext : DbContext
{
public CvBlogContext(DbContextOptions<CvBlogContext> dbContextOptions) : base(dbContextOptions) { }
public DbSet<Candidate> Candidates { get; set; }
public DbSet<Resume> Resumes { get; set; }
public DbSet<Hobby> Hobbies { get; set; }
public DbSet<SocialLinks> SocialLinks { get; set; }
public DbSet<Academic> Academics { get; set; }
public DbSet<Experience> Experiences { get; set; }
public DbSet<ExperienceDetails> ExperienceDetails { get; set; }
public DbSet<Skill> Skills { get; set; }
public DbSet<Certification> Certifications { get; set; }
public DbSet<Message> Messages { get; set; }
public DbSet<MessageStatusLog> MessageStatusLogs{ get; set; }
public DbSet<Blog> Blogs { get; set; }
public DbSet<Post> Posts { get; set; }
public DbSet<Project> Projects { get; set; }
public DbSet<ResumeFile> Files { get; set; }
public DbSet<ClientLog> ClientLogs { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Candidate>().HasData(InitialData.GetCandidateData());
modelBuilder.Entity<Resume>().HasData(InitialData.GetResumeData());
modelBuilder.Entity<SocialLinks>().HasData(InitialData.GetSocialLinksData());
modelBuilder.Entity<Hobby>().HasData(InitialData.GetHobbyData());
modelBuilder.Entity<Academic>().HasData(InitialData.GetAcademicData());
modelBuilder.Entity<Skill>().HasData(InitialData.GetSkillData());
modelBuilder.Entity<Project>().HasData(InitialData.GetProjectData());
modelBuilder.Entity<Blog>().HasData(InitialData.GetBlogData());
modelBuilder.Entity<Post>().HasData(InitialData.GetPostsData());
modelBuilder.Entity<Experience>().HasData(InitialData.GetExperiencesData());
modelBuilder.Entity<ExperienceDetails>().HasData(InitialData.GetExperienceDetailsData());
base.OnModelCreating(modelBuilder);
}
}
}

View File

@ -1,8 +0,0 @@
using Microsoft.EntityFrameworkCore;
namespace PortBlog.API.DbContexts
{
public class PortfolioContext : DbContext
{
}
}

View File

@ -0,0 +1,377 @@
using PortBlog.API.Entities;
using System.Net.NetworkInformation;
namespace PortBlog.API.DbContexts.Seed
{
public static class InitialData
{
public static Candidate GetCandidateData()
{
return new Candidate()
{
CandidateId = 1,
FirstName = "Bangara Raju",
LastName = "Kottedi",
Phone = "+91 9441212187",
Email = "bangararaju.kottedi@gmail.com",
Dob = new DateTime(1992, 5, 6),
Gender = "Male",
Address = "Samalkot, Andhra Pradesh, India",
};
}
public static Resume GetResumeData()
{
return new Resume()
{
ResumeId = 1,
CandidateId = 1,
Title = "Full Stack Developer",
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.",
Order = 1
};
}
public static SocialLinks GetSocialLinksData()
{
return new SocialLinks()
{
Id = 1,
BlogUrl = "https://bangararaju.kottedi.in/blog",
Linkedin = "https://in.linkedin.com/in/bangara-raju-kottedi-299072109",
GitHub = "https://github.com/rajukottedi",
ResumeId = 1
};
}
public static List<Hobby> GetHobbyData()
{
return new List<Hobby>()
{
new Hobby()
{
HobbyId = 1,
Order = 1,
Name = "Web Development",
Description = "Crafting Professional-Quality Websites with Precision",
Icon = "fa-square-terminal",
ResumeId = 1
},
new Hobby()
{
HobbyId = 2,
Order = 2,
Name = "Automation",
Description = "Streamlining and Simplifying Complex Tasks through Automation",
Icon = "fa-robot",
ResumeId = 1
},
new Hobby()
{
HobbyId = 3,
Order = 3,
Name = "Blogging",
Description = "Sharing the knowledge and insights Ive gathered along my journey",
Icon = "fa-typewriter",
ResumeId = 1
},
new Hobby()
{
HobbyId = 4,
Order = 4,
Name = "Gardening",
Description = "Cultivating Nature's Beauty and Bounty",
Icon = "fa-seedling",
ResumeId = 1
}
};
}
public static List<Academic> GetAcademicData()
{
return new List<Academic>
{
new Academic()
{
AcademicId = 1,
Institution = "Pragati Little Public School",
StartYear = 2006,
EndYear = 2007,
Degree = "High School",
ResumeId = 1
},
new Academic()
{
AcademicId = 2,
Institution = "Sri Chaitanya Junior College",
StartYear = 2007,
EndYear = 2009,
Degree = "Intermediate",
DegreeSpecialization = "MPC",
ResumeId = 1
},
new Academic()
{
AcademicId = 3,
Institution = "Kakinada Institute of Technology & Science",
StartYear = 2009,
EndYear = 2013,
Degree = "BTech",
DegreeSpecialization = "ECE",
ResumeId = 1
}
};
}
public static List<Skill> GetSkillData()
{
return new List<Skill>
{
new Skill()
{
SkillId = 1,
Name = "Web Development",
ProficiencyLevel = 80,
ResumeId = 1
},
new Skill()
{
SkillId = 2,
Name = "Web Development",
ProficiencyLevel = 80,
ResumeId = 1
},
new Skill()
{
SkillId = 3,
Name = "Web Development",
ProficiencyLevel = 80,
ResumeId = 1
},
new Skill()
{
SkillId = 4,
Name = "Web Development",
ProficiencyLevel = 80,
ResumeId = 1
},
new Skill()
{
SkillId= 5,
Name = "Web Development",
ProficiencyLevel = 80,
ResumeId = 1
}
};
}
public static List<Project> GetProjectData()
{
return new List<Project>
{
new Project()
{
ProjectId = 1,
Name = "Transfora (Business Process Management)",
Description = "Business Process Management",
Category = "Web Development",
ImagePath = "",
TechnologiesUsed = ".NET, Angular",
Responsibilities = "Developing, Testing, Support",
Roles = "Coding, Reviewing, Testing",
ResumeId = 1
},
new Project()
{
ProjectId = 2,
Name = "Transfora (Business Process Management)",
Description = "Business Process Management",
Category = "Web Development",
ImagePath = "",
TechnologiesUsed = ".NET, Angular",
Responsibilities = "Developing, Testing, Support",
Roles = "Coding, Reviewing, Testing",
ResumeId = 1
},
new Project()
{
ProjectId = 3,
Name = "Transfora (Business Process Management)",
Description = "Business Process Management",
Category = "Web Development",
ImagePath = "",
TechnologiesUsed = ".NET, Angular",
Responsibilities = "Developing, Testing, Support",
Roles = "Coding, Reviewing, Testing",
ResumeId = 1
}
};
}
public static Blog GetBlogData()
{
return new Blog()
{
BlogUrl = "https://bangararaju.kottedi.in/blog",
Name = "Engineer's Odyssey",
Description = "Your Hub for Tech, DIY, and Innovation"
};
}
public static List<Post> GetPostsData()
{
return new List<Post>
{
new Post()
{
PostId = 1,
Slug = "hello-world",
Title = "Hello World",
Description = "Hello World",
Category = "Welcome",
PostUrl = "https://bangararaju.kottedi.in/blog/hello-world",
CreatedDate = DateTime.Now,
BlogUrl = "https://bangararaju.kottedi.in/blog"
},
new Post()
{
PostId = 2,
Slug = "hello-world",
Title = "Hello World",
Description = "Hello World",
Category = "Welcome",
PostUrl = "https://bangararaju.kottedi.in/blog/hello-world",
CreatedDate = DateTime.Now,
BlogUrl = "https://bangararaju.kottedi.in/blog"
},
new Post()
{
PostId = 3,
Slug = "hello-world",
Title = "Hello World",
Description = "Hello World",
Category = "Welcome",
PostUrl = "https://bangararaju.kottedi.in/blog/hello-world",
CreatedDate = DateTime.Now,
BlogUrl = "https://bangararaju.kottedi.in/blog",
}
};
}
public static List<Experience> GetExperiencesData()
{
return new List<Experience>
{
new Experience()
{
ExperienceId = 1,
Title = "Jr. Software Engineer",
Company = "Agility E Services",
Description = "",
Location = "Hyderabad",
StartDate = new DateTime(2015, 9, 2),
EndDate = new DateTime(2016, 4, 25),
ResumeId = 1
},
new Experience()
{
ExperienceId = 2,
Title = "Web Developer",
Company = "Agility",
Description = "",
Location = "Kuwait",
StartDate = new DateTime(2016, 5, 12),
EndDate = new DateTime(2022, 1, 31),
ResumeId = 1
},
new Experience()
{
ExperienceId = 3,
Title = "Senior Web Developer",
Company = "Agility",
Description = "",
Location = "Kuwait",
StartDate = new DateTime(2022, 2, 1),
EndDate = new DateTime(2022, 10, 31),
ResumeId = 1
},
new Experience()
{
ExperienceId = 4,
Title = "Technology Specialist",
Company = "Agility E Services",
Description = "",
Location = "Hyderabad",
StartDate = new DateTime(2022, 11, 4),
EndDate = new DateTime(2024, 4, 12),
ResumeId = 1
},
};
}
public static List<ExperienceDetails> GetExperienceDetailsData()
{
return new List<ExperienceDetails>
{
new ExperienceDetails()
{
Id = 1,
ExperienceId = 1,
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.",
Order = 1
},
new ExperienceDetails()
{
Id = 2,
ExperienceId = 1,
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.",
Order = 2
},
new ExperienceDetails()
{
Id = 3,
ExperienceId = 2,
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.",
Order = 1
},
new ExperienceDetails()
{
Id = 4,
ExperienceId = 2,
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.",
Order = 2
},
new ExperienceDetails()
{
Id = 5,
ExperienceId = 3,
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.",
Order = 1
},
new ExperienceDetails()
{
Id = 6,
ExperienceId = 3,
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.",
Order = 2
},
new ExperienceDetails()
{
Id = 7,
ExperienceId = 4,
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.",
Order = 1
},
new ExperienceDetails()
{
Id = 8,
ExperienceId = 4,
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.",
Order = 2
},
};
}
}
}

View File

@ -0,0 +1,34 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Academic : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int AcademicId { get; set; }
[Required]
[MaxLength(200)]
public string Institution { get; set; } = string.Empty;
[Required]
public int StartYear { get; set; }
[Required]
public int EndYear { get; set; }
public int ResumeId { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
[Required]
[MaxLength(100)]
public string Degree { get; set; } = string.Empty;
[MaxLength(100)]
public string? DegreeSpecialization { get; set; }
}
}

View File

@ -0,0 +1,13 @@
namespace PortBlog.API.Entities
{
public class BaseEntity
{
public string? CreatedBy { get; set; }
public string? ModifiedBy { get; set; }
public DateTime? CreatedDate { get; set; } = DateTime.Now;
public DateTime? ModifiedDate { get; set; } = DateTime.Now;
}
}

View File

@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Blog : BaseEntity
{
[Required]
[MaxLength(200)]
[Url]
[Key]
public string BlogUrl { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string Name { get; set; } = string.Empty;
[MaxLength(200)]
public string? Description { get; set; } = string.Empty;
public ICollection<Post> Posts { get; set; } = new List<Post>();
}
}

View File

@ -0,0 +1,42 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.Contracts;
namespace PortBlog.API.Entities
{
public class Candidate : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int CandidateId { get; set; }
[Required]
[MaxLength(50)]
public string FirstName { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string LastName { get; set; } = string.Empty;
public string? Gender { get; set; }
public DateTime? Dob { get; set; }
[Required]
[EmailAddress]
[MaxLength(100)]
public string Email { get; set; } = string.Empty;
[Required]
[Phone]
[MaxLength(20)]
public string Phone { get; set; } = string.Empty;
[MaxLength(200)]
public string? Address { get; set; } = string.Empty;
public string? Avatar { get; set; }
public ICollection<Resume> Resumes { get; set; } = new List<Resume>();
}
}

View File

@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Certification : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int CertificationId { get; set; }
[Required]
[MaxLength(100)]
public string CertificationName { get; set; } = string.Empty;
[MaxLength(100)]
public string IssuingOrganization { get; set; } = string.Empty;
[Url]
[MaxLength(200)]
public string? CertificationLink { get; set; }
[Required]
public DateTime IssueDate { get; set; }
public DateTime? ExpiryDate { get; set; }
public int ResumeId { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
}
}

View File

@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class ClientLog
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[Required]
[MaxLength(50)]
public string SiteName { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string SiteUrl { get; set; } = string.Empty;
[Required]
public string ClientIp { get; set; } = string.Empty;
public string? ClientLocation { get; set; } = string.Empty;
public DateTime CreatedDate { get; set; } = DateTime.Now;
}
}

View File

@ -0,0 +1,39 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Experience : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ExperienceId { get; set; }
[Required]
[MaxLength(100)]
public string Title { get; set; } = string.Empty;
[MaxLength(500)]
public string? Description { get; set; }
[Required]
[MaxLength(100)]
public string Company { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string Location { get; set; } = string.Empty;
[Required]
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public int ResumeId { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
public ICollection<ExperienceDetails> Details { get; set; } = new List<ExperienceDetails>();
}
}

View File

@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class ExperienceDetails : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[Required]
[MaxLength(500)]
public string Details { get; set; } = string.Empty;
public int Order { get; set; } = 0;
public int ExperienceId { get; set; }
[ForeignKey(nameof(ExperienceId))]
public Experience? Experience { get; set; }
}
}

View File

@ -0,0 +1,31 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Hobby : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int HobbyId { get; set; }
[Required]
[MaxLength(100)]
public string Name { get; set; } = string.Empty;
[Required]
[MaxLength(500)]
public string Description { get; set; } = string.Empty;
[Required]
public int Order { get; set; }
[MaxLength(50)]
public string? Icon { get; set; }
public int ResumeId { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
}
}

View File

@ -0,0 +1,31 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Message
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[Required]
[MaxLength(50)]
public string Name { get; set; } = string.Empty;
[Required]
[EmailAddress]
[MaxLength(100)]
public string Email { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string Subject { get; set; } = string.Empty;
[Required]
[MaxLength(500)]
public string Content { get; set; } = string.Empty;
public DateTime CreatedDate { get; set; } = DateTime.Now;
}
}

View File

@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class MessageStatusLog
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public int MessageId { get; set; }
[ForeignKey(nameof(MessageId))]
public Message? Message { get; set; }
[MaxLength(10)]
public string Status { get; set; } = string.Empty;
public DateTime CreatedDate { get; set; } = DateTime.Now;
}
}

View File

@ -0,0 +1,51 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Post : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int PostId { get; set; }
[Required]
[MaxLength(100)]
public string Slug { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string Title { get; set; } = string.Empty;
[Required]
[MaxLength(200)]
public string Description { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string Category { get; set; } = string.Empty;
[MaxLength(100)]
public string? Author { get; set; }
[Url]
[MaxLength(200)]
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;
[MaxLength(200)]
public string? Image { get; set; }
[Required]
[MaxLength(200)]
public string BlogUrl { get; set; } = string.Empty;
[ForeignKey(nameof(BlogUrl))]
public Blog? Blog { get; set; }
}
}

View File

@ -0,0 +1,60 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Project : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ProjectId { get; set; }
[Required]
[MaxLength(100)]
public string Name { get; set; } = string.Empty;
[Required]
[MaxLength(500)]
public string Description { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string Category { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string? Roles { get; set; }
[MaxLength(200)]
public string? Challenges { get; set; }
[MaxLength(200)]
public string? LessonsLearned { get; set; }
[MaxLength(200)]
public string? Impact { get; set; }
[Required]
[MaxLength(200)]
public string? Responsibilities { get; set; }
[Required]
[MaxLength(200)]
public string? TechnologiesUsed { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
[MaxLength(20)]
public string? Status { get; set; }
[MaxLength(200)]
public string? ImagePath { get; set; }
public int ResumeId { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
}
}

View File

@ -0,0 +1,44 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Resume : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ResumeId { get; set; }
[Required]
[MaxLength(100)]
public string Title { get; set; } = string.Empty;
[Required]
[MaxLength(1000)]
public string About { get; set; } = string.Empty;
[Required]
public int Order { get; set; }
public int CandidateId { get; set; }
[ForeignKey(nameof(CandidateId))]
public Candidate? Candidate { get; set; }
public ResumeFile? ResumeFile { get; set; }
public SocialLinks? SocialLinks { get; set; }
public ICollection<Academic> Academics { get; set; } = new List<Academic>();
public ICollection<Skill> Skills { get; set; } = new List<Skill>();
public ICollection<Experience> Experiences { get; set; } = new List<Experience>();
public ICollection<Certification> Certifications { get; set; } = new List<Certification>();
public ICollection<Hobby> Hobbies { get; set; } = new List<Hobby>();
public ICollection<Project> Projects { get; set; } = new List<Project>();
}
}

View File

@ -0,0 +1,32 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class ResumeFile : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int FileId { get; set; }
[Required]
[MaxLength(100)]
public string FileName { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string FileFormat { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string FilePath { get; set; } = string.Empty;
[MaxLength(10)]
public string? Version { get; set; } = string.Empty;
public int ResumeId { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
}
}

View File

@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class Skill : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int SkillId { get; set; }
[Required]
[MaxLength(50)]
public string Name { get; set; } = string.Empty;
[MaxLength(200)]
public string? Description { get; set; }
[Required]
public int ProficiencyLevel { get; set; }
public int ResumeId { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
}
}

View File

@ -0,0 +1,42 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PortBlog.API.Entities
{
public class SocialLinks : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[MaxLength(200)]
public string? GitHub { get; set; }
[Required]
[MaxLength(200)]
public string Linkedin { get; set; } = string.Empty;
[MaxLength(200)]
public string? Instagram { get; set; }
[MaxLength(200)]
public string? Facebook { get; set; }
[MaxLength(200)]
public string? Twitter { get; set; }
[MaxLength(200)]
public string? PersonalWebsite { get; set; }
[MaxLength(200)]
public string? BlogUrl { get; set; }
[ForeignKey(nameof(BlogUrl))]
public Blog? Blog { get; set; }
[ForeignKey(nameof(ResumeId))]
public Resume? Resume { get; set; }
public int ResumeId { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using PortBlog.API.Repositories;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Extensions
{
public static class ServiceExtensions
{
public static IServiceCollection AddRepositories(this IServiceCollection services)
{
services.AddScoped<ICandidateRepository, CandidateRepository>();
services.AddScoped<IResumeRepository, ResumeRepository>();
return services;
}
}
}

BIN
PortBlog.API/Images/bpm.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
PortBlog.API/Images/bpm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
PortBlog.API/Images/hcm.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

BIN
PortBlog.API/Images/hms.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

View File

@ -0,0 +1,981 @@
// <auto-generated />
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("20240425092224_InitialDBMigration")]
partial class InitialDBMigration
{
/// <inheritdoc />
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<int>("AcademicId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("AcademicId"));
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Degree")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("DegreeSpecialization")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<int>("EndYear")
.HasColumnType("int");
b.Property<string>("Institution")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.Property<int>("StartYear")
.HasColumnType("int");
b.HasKey("AcademicId");
b.HasIndex("ResumeId");
b.ToTable("Academics");
});
modelBuilder.Entity("PortBlog.API.Entities.Blog", b =>
{
b.Property<string>("BlogUrl")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.HasKey("BlogUrl");
b.ToTable("Blogs");
});
modelBuilder.Entity("PortBlog.API.Entities.Candidate", b =>
{
b.Property<int>("CandidateId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("CandidateId"));
b.Property<string>("Address")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Avatar")
.HasColumnType("longtext");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("Gender")
.HasColumnType("longtext");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Phone")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.HasKey("CandidateId");
b.ToTable("Candidates");
});
modelBuilder.Entity("PortBlog.API.Entities.Certification", b =>
{
b.Property<int>("CertificationId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("CertificationId"));
b.Property<string>("CertificationLink")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("CertificationName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<DateTime?>("ExpiryDate")
.HasColumnType("datetime(6)");
b.Property<DateTime>("IssueDate")
.HasColumnType("datetime(6)");
b.Property<string>("IssuingOrganization")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.HasKey("CertificationId");
b.HasIndex("ResumeId");
b.ToTable("Certifications");
});
modelBuilder.Entity("PortBlog.API.Entities.ClientLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClientIp")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ClientLocation")
.HasColumnType("longtext");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("SiteName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("SiteUrl")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.HasKey("Id");
b.ToTable("ClientLogs");
});
modelBuilder.Entity("PortBlog.API.Entities.Experience", b =>
{
b.Property<int>("ExperienceId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ExperienceId"));
b.Property<string>("Company")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime(6)");
b.Property<string>("Location")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.Property<DateTime>("StartDate")
.HasColumnType("datetime(6)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.HasKey("ExperienceId");
b.HasIndex("ResumeId");
b.ToTable("Experiences");
});
modelBuilder.Entity("PortBlog.API.Entities.ExperienceDetails", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Details")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<int>("ExperienceId")
.HasColumnType("int");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<int>("Order")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ExperienceId");
b.ToTable("ExperienceDetails");
});
modelBuilder.Entity("PortBlog.API.Entities.Hobby", b =>
{
b.Property<int>("HobbyId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("HobbyId"));
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<string>("Icon")
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<int>("Order")
.HasColumnType("int");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.HasKey("HobbyId");
b.HasIndex("ResumeId");
b.ToTable("Hobbies");
});
modelBuilder.Entity("PortBlog.API.Entities.Message", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Content")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("Subject")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.HasKey("Id");
b.ToTable("Messages");
});
modelBuilder.Entity("PortBlog.API.Entities.MessageStatusLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<int>("MessageId")
.HasColumnType("int");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("varchar(10)");
b.HasKey("Id");
b.HasIndex("MessageId");
b.ToTable("MessageStatusLogs");
});
modelBuilder.Entity("PortBlog.API.Entities.Post", b =>
{
b.Property<int>("PostId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("PostId"));
b.Property<string>("Author")
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("BlogUrl")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<int>("Comments")
.HasColumnType("int");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Image")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<int>("Likes")
.HasColumnType("int");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("PostUrl")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Slug")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<int>("Views")
.HasColumnType("int");
b.HasKey("PostId");
b.HasIndex("BlogUrl");
b.ToTable("Posts");
});
modelBuilder.Entity("PortBlog.API.Entities.Project", b =>
{
b.Property<int>("ProjectId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ProjectId"));
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("Challenges")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property<DateTime?>("EndDate")
.HasColumnType("datetime(6)");
b.Property<string>("ImagePath")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Impact")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("LessonsLearned")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("Responsibilities")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.Property<string>("Roles")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<DateTime?>("StartDate")
.HasColumnType("datetime(6)");
b.Property<string>("Status")
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<string>("TechnologiesUsed")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("ProjectId");
b.HasIndex("ResumeId");
b.ToTable("Projects");
});
modelBuilder.Entity("PortBlog.API.Entities.Resume", b =>
{
b.Property<int>("ResumeId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ResumeId"));
b.Property<string>("About")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)");
b.Property<int>("CandidateId")
.HasColumnType("int");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<int>("Order")
.HasColumnType("int");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.HasKey("ResumeId");
b.HasIndex("CandidateId");
b.ToTable("Resumes");
});
modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b =>
{
b.Property<int>("FileId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("FileId"));
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("FileFormat")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<string>("FileName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("FilePath")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.Property<string>("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<int>("SkillId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("SkillId"));
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<int>("ProficiencyLevel")
.HasColumnType("int");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.HasKey("SkillId");
b.HasIndex("ResumeId");
b.ToTable("Skills");
});
modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<string>("BlogUrl")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("CreatedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("CreatedDate")
.HasColumnType("datetime(6)");
b.Property<string>("Facebook")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("GitHub")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Instagram")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("Linkedin")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("ModifiedBy")
.HasColumnType("longtext");
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("PersonalWebsite")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<int>("ResumeId")
.HasColumnType("int");
b.Property<string>("Twitter")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.HasKey("Id");
b.HasIndex("BlogUrl");
b.HasIndex("ResumeId")
.IsUnique();
b.ToTable("SocialLinks");
});
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("Hobbys")
.HasForeignKey("ResumeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Resume");
});
modelBuilder.Entity("PortBlog.API.Entities.MessageStatusLog", b =>
{
b.HasOne("PortBlog.API.Entities.Message", "Message")
.WithMany()
.HasForeignKey("MessageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Message");
});
modelBuilder.Entity("PortBlog.API.Entities.Post", b =>
{
b.HasOne("PortBlog.API.Entities.Blog", "Blog")
.WithMany("Posts")
.HasForeignKey("BlogUrl")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Blog");
});
modelBuilder.Entity("PortBlog.API.Entities.Project", b =>
{
b.HasOne("PortBlog.API.Entities.Resume", "Resume")
.WithMany("Projects")
.HasForeignKey("ResumeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Resume");
});
modelBuilder.Entity("PortBlog.API.Entities.Resume", b =>
{
b.HasOne("PortBlog.API.Entities.Candidate", "Candidate")
.WithMany("Resumes")
.HasForeignKey("CandidateId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Candidate");
});
modelBuilder.Entity("PortBlog.API.Entities.ResumeFile", b =>
{
b.HasOne("PortBlog.API.Entities.Resume", "Resume")
.WithOne("ResumeFile")
.HasForeignKey("PortBlog.API.Entities.ResumeFile", "ResumeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Resume");
});
modelBuilder.Entity("PortBlog.API.Entities.Skill", b =>
{
b.HasOne("PortBlog.API.Entities.Resume", "Resume")
.WithMany("Skills")
.HasForeignKey("ResumeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Resume");
});
modelBuilder.Entity("PortBlog.API.Entities.SocialLinks", b =>
{
b.HasOne("PortBlog.API.Entities.Blog", "Blog")
.WithMany()
.HasForeignKey("BlogUrl");
b.HasOne("PortBlog.API.Entities.Resume", "Resume")
.WithOne("SocialLinks")
.HasForeignKey("PortBlog.API.Entities.SocialLinks", "ResumeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Blog");
b.Navigation("Resume");
});
modelBuilder.Entity("PortBlog.API.Entities.Blog", b =>
{
b.Navigation("Posts");
});
modelBuilder.Entity("PortBlog.API.Entities.Candidate", b =>
{
b.Navigation("Resumes");
});
modelBuilder.Entity("PortBlog.API.Entities.Experience", b =>
{
b.Navigation("Details");
});
modelBuilder.Entity("PortBlog.API.Entities.Resume", b =>
{
b.Navigation("Academics");
b.Navigation("Certifications");
b.Navigation("Experiences");
b.Navigation("Hobbys");
b.Navigation("Projects");
b.Navigation("ResumeFile");
b.Navigation("Skills");
b.Navigation("SocialLinks");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,662 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PortBlog.API.Migrations
{
/// <inheritdoc />
public partial class InitialDBMigration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Blogs",
columns: table => new
{
BlogUrl = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Blogs", x => x.BlogUrl);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Candidates",
columns: table => new
{
CandidateId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
FirstName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Gender = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Email = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Phone = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Address = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Avatar = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Candidates", x => x.CandidateId);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ClientLogs",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
SiteName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SiteUrl = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ClientIp = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ClientLocation = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientLogs", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Messages",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Email = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Subject = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Content = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Messages", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Posts",
columns: table => new
{
PostId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Slug = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Title = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Category = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Author = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PostUrl = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Likes = table.Column<int>(type: "int", nullable: false),
Views = table.Column<int>(type: "int", nullable: false),
Comments = table.Column<int>(type: "int", nullable: false),
Image = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
BlogUrl = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Posts", x => x.PostId);
table.ForeignKey(
name: "FK_Posts_Blogs_BlogUrl",
column: x => x.BlogUrl,
principalTable: "Blogs",
principalColumn: "BlogUrl",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Resumes",
columns: table => new
{
ResumeId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Title = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
About = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Order = table.Column<int>(type: "int", nullable: false),
CandidateId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Resumes", x => x.ResumeId);
table.ForeignKey(
name: "FK_Resumes_Candidates_CandidateId",
column: x => x.CandidateId,
principalTable: "Candidates",
principalColumn: "CandidateId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MessageStatusLogs",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
MessageId = table.Column<int>(type: "int", nullable: false),
Status = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MessageStatusLogs", x => x.Id);
table.ForeignKey(
name: "FK_MessageStatusLogs_Messages_MessageId",
column: x => x.MessageId,
principalTable: "Messages",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Academics",
columns: table => new
{
AcademicId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Institution = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
StartYear = table.Column<int>(type: "int", nullable: false),
EndYear = table.Column<int>(type: "int", nullable: false),
ResumeId = table.Column<int>(type: "int", nullable: false),
Degree = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
DegreeSpecialization = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Academics", x => x.AcademicId);
table.ForeignKey(
name: "FK_Academics_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Certifications",
columns: table => new
{
CertificationId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
CertificationName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
IssuingOrganization = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CertificationLink = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IssueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ExpiryDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ResumeId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Certifications", x => x.CertificationId);
table.ForeignKey(
name: "FK_Certifications_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Experiences",
columns: table => new
{
ExperienceId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Title = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Company = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Location = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ResumeId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Experiences", x => x.ExperienceId);
table.ForeignKey(
name: "FK_Experiences_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Files",
columns: table => new
{
FileId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
FileName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FileFormat = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FilePath = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Version = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ResumeId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Files", x => x.FileId);
table.ForeignKey(
name: "FK_Files_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Hobbies",
columns: table => new
{
HobbyId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Order = table.Column<int>(type: "int", nullable: false),
Icon = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ResumeId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Hobbies", x => x.HobbyId);
table.ForeignKey(
name: "FK_Hobbies_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Projects",
columns: table => new
{
ProjectId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Category = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Roles = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Challenges = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LessonsLearned = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Impact = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Responsibilities = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TechnologiesUsed = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
Status = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ImagePath = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ResumeId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Projects", x => x.ProjectId);
table.ForeignKey(
name: "FK_Projects_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Skills",
columns: table => new
{
SkillId = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ProficiencyLevel = table.Column<int>(type: "int", nullable: false),
ResumeId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Skills", x => x.SkillId);
table.ForeignKey(
name: "FK_Skills_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "SocialLinks",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
GitHub = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Linkedin = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Instagram = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Facebook = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Twitter = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PersonalWebsite = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
BlogUrl = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ResumeId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_SocialLinks", x => x.Id);
table.ForeignKey(
name: "FK_SocialLinks_Blogs_BlogUrl",
column: x => x.BlogUrl,
principalTable: "Blogs",
principalColumn: "BlogUrl");
table.ForeignKey(
name: "FK_SocialLinks_Resumes_ResumeId",
column: x => x.ResumeId,
principalTable: "Resumes",
principalColumn: "ResumeId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ExperienceDetails",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Details = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Order = table.Column<int>(type: "int", nullable: false),
ExperienceId = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ModifiedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ModifiedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ExperienceDetails", x => x.Id);
table.ForeignKey(
name: "FK_ExperienceDetails_Experiences_ExperienceId",
column: x => x.ExperienceId,
principalTable: "Experiences",
principalColumn: "ExperienceId",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_Academics_ResumeId",
table: "Academics",
column: "ResumeId");
migrationBuilder.CreateIndex(
name: "IX_Certifications_ResumeId",
table: "Certifications",
column: "ResumeId");
migrationBuilder.CreateIndex(
name: "IX_ExperienceDetails_ExperienceId",
table: "ExperienceDetails",
column: "ExperienceId");
migrationBuilder.CreateIndex(
name: "IX_Experiences_ResumeId",
table: "Experiences",
column: "ResumeId");
migrationBuilder.CreateIndex(
name: "IX_Files_ResumeId",
table: "Files",
column: "ResumeId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Hobbies_ResumeId",
table: "Hobbies",
column: "ResumeId");
migrationBuilder.CreateIndex(
name: "IX_MessageStatusLogs_MessageId",
table: "MessageStatusLogs",
column: "MessageId");
migrationBuilder.CreateIndex(
name: "IX_Posts_BlogUrl",
table: "Posts",
column: "BlogUrl");
migrationBuilder.CreateIndex(
name: "IX_Projects_ResumeId",
table: "Projects",
column: "ResumeId");
migrationBuilder.CreateIndex(
name: "IX_Resumes_CandidateId",
table: "Resumes",
column: "CandidateId");
migrationBuilder.CreateIndex(
name: "IX_Skills_ResumeId",
table: "Skills",
column: "ResumeId");
migrationBuilder.CreateIndex(
name: "IX_SocialLinks_BlogUrl",
table: "SocialLinks",
column: "BlogUrl");
migrationBuilder.CreateIndex(
name: "IX_SocialLinks_ResumeId",
table: "SocialLinks",
column: "ResumeId",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Academics");
migrationBuilder.DropTable(
name: "Certifications");
migrationBuilder.DropTable(
name: "ClientLogs");
migrationBuilder.DropTable(
name: "ExperienceDetails");
migrationBuilder.DropTable(
name: "Files");
migrationBuilder.DropTable(
name: "Hobbies");
migrationBuilder.DropTable(
name: "MessageStatusLogs");
migrationBuilder.DropTable(
name: "Posts");
migrationBuilder.DropTable(
name: "Projects");
migrationBuilder.DropTable(
name: "Skills");
migrationBuilder.DropTable(
name: "SocialLinks");
migrationBuilder.DropTable(
name: "Experiences");
migrationBuilder.DropTable(
name: "Messages");
migrationBuilder.DropTable(
name: "Blogs");
migrationBuilder.DropTable(
name: "Resumes");
migrationBuilder.DropTable(
name: "Candidates");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,290 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace PortBlog.API.Migrations
{
/// <inheritdoc />
public partial class InitialSeedData : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "Blogs",
columns: new[] { "BlogUrl", "CreatedBy", "CreatedDate", "Description", "ModifiedBy", "ModifiedDate", "Name" },
values: new object[] { "https://bangararaju.kottedi.in/blog", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6122), "Your Hub for Tech, DIY, and Innovation", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6122), "Engineer's Odyssey" });
migrationBuilder.InsertData(
table: "Candidates",
columns: new[] { "CandidateId", "Address", "Avatar", "CreatedBy", "CreatedDate", "Email", "FirstName", "Gender", "LastName", "ModifiedBy", "ModifiedDate", "Phone" },
values: new object[] { 1, "Samalkot, Andhra Pradesh, India", null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5678), "bangararaju.kottedi@gmail.com", "Bangara Raju", "Male", "Kottedi", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5692), "+91 9441212187" });
migrationBuilder.InsertData(
table: "Posts",
columns: new[] { "PostId", "Author", "BlogUrl", "Category", "Comments", "CreatedBy", "CreatedDate", "Description", "Image", "Likes", "ModifiedBy", "ModifiedDate", "PostUrl", "Slug", "Title", "Views" },
values: new object[,]
{
{ 1, null, "https://bangararaju.kottedi.in/blog", "Welcome", 0, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6152), "Hello World", null, 0, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6148), "https://bangararaju.kottedi.in/blog/hello-world", "hello-world", "Hello World", 0 },
{ 2, null, "https://bangararaju.kottedi.in/blog", "Welcome", 0, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6157), "Hello World", null, 0, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6155), "https://bangararaju.kottedi.in/blog/hello-world", "hello-world", "Hello World", 0 },
{ 3, null, "https://bangararaju.kottedi.in/blog", "Welcome", 0, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6160), "Hello World", null, 0, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6158), "https://bangararaju.kottedi.in/blog/hello-world", "hello-world", "Hello World", 0 }
});
migrationBuilder.InsertData(
table: "Resumes",
columns: new[] { "ResumeId", "About", "CandidateId", "CreatedBy", "CreatedDate", "ModifiedBy", "ModifiedDate", "Order", "Title" },
values: new object[] { 1, "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.", 1, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5849), null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5849), 1, "Full Stack Developer" });
migrationBuilder.InsertData(
table: "Academics",
columns: new[] { "AcademicId", "CreatedBy", "CreatedDate", "Degree", "DegreeSpecialization", "EndYear", "Institution", "ModifiedBy", "ModifiedDate", "ResumeId", "StartYear" },
values: new object[,]
{
{ 1, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6028), "High School", null, 2007, "Pragati Little Public School", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6029), 1, 2006 },
{ 2, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6032), "Intermediate", "MPC", 2009, "Sri Chaitanya Junior College", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6032), 1, 2007 },
{ 3, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6034), "BTech", "ECE", 2013, "Kakinada Institute of Technology & Science", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6035), 1, 2009 }
});
migrationBuilder.InsertData(
table: "Experiences",
columns: new[] { "ExperienceId", "Company", "CreatedBy", "CreatedDate", "Description", "EndDate", "Location", "ModifiedBy", "ModifiedDate", "ResumeId", "StartDate", "Title" },
values: new object[,]
{
{ 1, "Agility E Services", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6183), "", new DateTime(2016, 4, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), "Hyderabad", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6183), 1, new DateTime(2015, 9, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), "Jr. Software Engineer" },
{ 2, "Agility", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6192), "", new DateTime(2022, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), "Kuwait", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6192), 1, new DateTime(2016, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), "Web Developer" },
{ 3, "Agility", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6195), "", new DateTime(2022, 10, 31, 0, 0, 0, 0, DateTimeKind.Unspecified), "Kuwait", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6195), 1, new DateTime(2022, 2, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "Senior Web Developer" },
{ 4, "Agility E Services", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6198), "", new DateTime(2024, 4, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), "Hyderabad", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6198), 1, new DateTime(2022, 11, 4, 0, 0, 0, 0, DateTimeKind.Unspecified), "Technology Specialist" }
});
migrationBuilder.InsertData(
table: "Hobbies",
columns: new[] { "HobbyId", "CreatedBy", "CreatedDate", "Description", "Icon", "ModifiedBy", "ModifiedDate", "Name", "Order", "ResumeId" },
values: new object[,]
{
{ 1, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5981), "Crafting Professional-Quality Websites with Precision", "fa-square-terminal", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5983), "Web Development", 1, 1 },
{ 2, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5990), "Streamlining and Simplifying Complex Tasks through Automation", "fa-robot", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5990), "Automation", 2, 1 },
{ 3, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5992), "Sharing the knowledge and insights Ive gathered along my journey", "fa-typewriter", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5993), "Blogging", 3, 1 },
{ 4, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5994), "Cultivating Nature's Beauty and Bounty", "fa-seedling", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5995), "Gardening", 4, 1 }
});
migrationBuilder.InsertData(
table: "Projects",
columns: new[] { "ProjectId", "Category", "Challenges", "CreatedBy", "CreatedDate", "Description", "EndDate", "ImagePath", "Impact", "LessonsLearned", "ModifiedBy", "ModifiedDate", "Name", "Responsibilities", "ResumeId", "Roles", "StartDate", "Status", "TechnologiesUsed" },
values: new object[,]
{
{ 1, "Web Development", null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6091), "Business Process Management", null, "", null, null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6091), "Transfora (Business Process Management)", "Developing, Testing, Support", 1, "Coding, Reviewing, Testing", null, null, ".NET, Angular" },
{ 2, "Web Development", null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6099), "Business Process Management", null, "", null, null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6099), "Transfora (Business Process Management)", "Developing, Testing, Support", 1, "Coding, Reviewing, Testing", null, null, ".NET, Angular" },
{ 3, "Web Development", null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6101), "Business Process Management", null, "", null, null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6102), "Transfora (Business Process Management)", "Developing, Testing, Support", 1, "Coding, Reviewing, Testing", null, null, ".NET, Angular" }
});
migrationBuilder.InsertData(
table: "Skills",
columns: new[] { "SkillId", "CreatedBy", "CreatedDate", "Description", "ModifiedBy", "ModifiedDate", "Name", "ProficiencyLevel", "ResumeId" },
values: new object[,]
{
{ 1, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6060), null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6061), "Web Development", 80, 1 },
{ 2, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6064), null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6064), "Web Development", 80, 1 },
{ 3, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6066), null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6066), "Web Development", 80, 1 },
{ 4, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6067), null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6068), "Web Development", 80, 1 },
{ 5, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6069), null, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6069), "Web Development", 80, 1 }
});
migrationBuilder.InsertData(
table: "SocialLinks",
columns: new[] { "Id", "BlogUrl", "CreatedBy", "CreatedDate", "Facebook", "GitHub", "Instagram", "Linkedin", "ModifiedBy", "ModifiedDate", "PersonalWebsite", "ResumeId", "Twitter" },
values: new object[] { 1, "https://bangararaju.kottedi.in/blog", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5878), null, "https://github.com/rajukottedi", null, "https://in.linkedin.com/in/bangara-raju-kottedi-299072109", null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5878), null, 1, null });
migrationBuilder.InsertData(
table: "ExperienceDetails",
columns: new[] { "Id", "CreatedBy", "CreatedDate", "Details", "ExperienceId", "ModifiedBy", "ModifiedDate", "Order" },
values: new object[,]
{
{ 1, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6219), "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.", 1, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6219), 1 },
{ 2, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6222), "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.", 1, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6223), 2 },
{ 3, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6224), "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.", 2, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6224), 1 },
{ 4, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6226), "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.", 2, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6226), 2 },
{ 5, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6227), "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.", 3, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6228), 1 },
{ 6, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6230), "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.", 3, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6230), 2 },
{ 7, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6231), "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.", 4, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6231), 1 },
{ 8, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6232), "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.", 4, null, new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6233), 2 }
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 3);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 4);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 5);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 6);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 7);
migrationBuilder.DeleteData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 8);
migrationBuilder.DeleteData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 4);
migrationBuilder.DeleteData(
table: "Posts",
keyColumn: "PostId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Posts",
keyColumn: "PostId",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Posts",
keyColumn: "PostId",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 4);
migrationBuilder.DeleteData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 5);
migrationBuilder.DeleteData(
table: "SocialLinks",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Blogs",
keyColumn: "BlogUrl",
keyValue: "https://bangararaju.kottedi.in/blog");
migrationBuilder.DeleteData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 4);
migrationBuilder.DeleteData(
table: "Resumes",
keyColumn: "ResumeId",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Candidates",
keyColumn: "CandidateId",
keyValue: 1);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,505 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PortBlog.API.Migrations
{
/// <inheritdoc />
public partial class AddDobToCandidate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "Dob",
table: "Candidates",
type: "datetime(6)",
nullable: true);
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5962), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5962) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5965), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5966) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5968), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5968) });
migrationBuilder.UpdateData(
table: "Blogs",
keyColumn: "BlogUrl",
keyValue: "https://bangararaju.kottedi.in/blog",
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6082), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6082) });
migrationBuilder.UpdateData(
table: "Candidates",
keyColumn: "CandidateId",
keyValue: 1,
columns: new[] { "CreatedDate", "Dob", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5737), null, new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5755) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6175), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6175) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6178), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6179) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6180), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6180) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6181), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6182) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6183), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6183) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 6,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6185), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6185) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 7,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6186), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6186) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 8,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6187), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6188) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6140), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6141) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6148), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6148) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6151), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6151) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6154), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6154) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5930), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5930) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5934), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5935) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5937), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5937) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5938), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5939) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6107), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6104) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6112), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6111) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6115), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6114) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6022), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6022) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6027), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6027) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6030), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6030) });
migrationBuilder.UpdateData(
table: "Resumes",
keyColumn: "ResumeId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5883), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5884) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5991), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5992) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5995), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5996) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5997), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5998) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5999), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5999) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6000), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6001) });
migrationBuilder.UpdateData(
table: "SocialLinks",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5909), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5910) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Dob",
table: "Candidates");
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6028), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6029) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6032), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6032) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6034), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6035) });
migrationBuilder.UpdateData(
table: "Blogs",
keyColumn: "BlogUrl",
keyValue: "https://bangararaju.kottedi.in/blog",
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6122), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6122) });
migrationBuilder.UpdateData(
table: "Candidates",
keyColumn: "CandidateId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5678), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5692) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6219), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6219) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6222), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6223) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6224), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6224) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6226), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6226) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6227), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6228) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 6,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6230), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6230) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 7,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6231), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6231) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 8,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6232), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6233) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6183), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6183) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6192), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6192) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6195), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6195) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6198), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6198) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5981), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5983) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5990), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5990) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5992), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5993) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5994), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5995) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6152), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6148) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6157), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6155) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6160), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6158) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6091), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6091) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6099), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6099) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6101), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6102) });
migrationBuilder.UpdateData(
table: "Resumes",
keyColumn: "ResumeId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5849), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5849) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6060), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6061) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6064), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6064) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6066), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6066) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6067), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6068) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6069), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(6069) });
migrationBuilder.UpdateData(
table: "SocialLinks",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5878), new DateTime(2024, 4, 25, 14, 53, 46, 863, DateTimeKind.Local).AddTicks(5878) });
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,495 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PortBlog.API.Migrations
{
/// <inheritdoc />
public partial class AddDobData : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1988), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1988) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1992), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1992) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1994), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1995) });
migrationBuilder.UpdateData(
table: "Blogs",
keyColumn: "BlogUrl",
keyValue: "https://bangararaju.kottedi.in/blog",
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2101), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2101) });
migrationBuilder.UpdateData(
table: "Candidates",
keyColumn: "CandidateId",
keyValue: 1,
columns: new[] { "CreatedDate", "Dob", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1782), new DateTime(1992, 5, 6, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1797) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2184), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2184) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2187), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2188) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2189), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2189) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2190), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2191) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2192), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2192) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 6,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2194), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2194) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 7,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2195), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2195) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 8,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2196), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2197) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2153), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2154) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2159), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2159) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2162), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2163) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2165), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2166) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1959), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1960) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1964), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1965) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1967), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1967) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1969), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1969) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2123), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2120) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2129), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2128) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2132), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2131) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2039), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2040) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2076), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2076) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2078), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2079) });
migrationBuilder.UpdateData(
table: "Resumes",
keyColumn: "ResumeId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1920), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1920) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2012), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2013) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2016), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2017) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2018), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2018) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2020), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2020) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2021), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(2021) });
migrationBuilder.UpdateData(
table: "SocialLinks",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1939), new DateTime(2024, 4, 26, 0, 48, 21, 412, DateTimeKind.Local).AddTicks(1940) });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5962), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5962) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5965), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5966) });
migrationBuilder.UpdateData(
table: "Academics",
keyColumn: "AcademicId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5968), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5968) });
migrationBuilder.UpdateData(
table: "Blogs",
keyColumn: "BlogUrl",
keyValue: "https://bangararaju.kottedi.in/blog",
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6082), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6082) });
migrationBuilder.UpdateData(
table: "Candidates",
keyColumn: "CandidateId",
keyValue: 1,
columns: new[] { "CreatedDate", "Dob", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5737), null, new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5755) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6175), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6175) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6178), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6179) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6180), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6180) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6181), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6182) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6183), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6183) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 6,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6185), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6185) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 7,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6186), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6186) });
migrationBuilder.UpdateData(
table: "ExperienceDetails",
keyColumn: "Id",
keyValue: 8,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6187), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6188) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6140), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6141) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6148), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6148) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6151), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6151) });
migrationBuilder.UpdateData(
table: "Experiences",
keyColumn: "ExperienceId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6154), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6154) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5930), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5930) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5934), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5935) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5937), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5937) });
migrationBuilder.UpdateData(
table: "Hobbies",
keyColumn: "HobbyId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5938), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5939) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6107), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6104) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6112), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6111) });
migrationBuilder.UpdateData(
table: "Posts",
keyColumn: "PostId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6115), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6114) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6022), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6022) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6027), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6027) });
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "ProjectId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6030), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6030) });
migrationBuilder.UpdateData(
table: "Resumes",
keyColumn: "ResumeId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5883), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5884) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5991), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5992) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 2,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5995), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5996) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 3,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5997), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5998) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 4,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5999), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5999) });
migrationBuilder.UpdateData(
table: "Skills",
keyColumn: "SkillId",
keyValue: 5,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6000), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(6001) });
migrationBuilder.UpdateData(
table: "SocialLinks",
keyColumn: "Id",
keyValue: 1,
columns: new[] { "CreatedDate", "ModifiedDate" },
values: new object[] { new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5909), new DateTime(2024, 4, 26, 0, 46, 33, 130, DateTimeKind.Local).AddTicks(5910) });
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
namespace PortBlog.API.Models
{
public class AcademicDto
{
public int AcademicId { get; set; }
public string Institution { get; set; } = string.Empty;
public int StartYear { get; set; }
public int EndYear { get; set; }
public string Period { get; set; } = string.Empty;
public string Degree { get; set; } = string.Empty;
public string? DegreeSpecialization { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using PortBlog.API.Entities;
namespace PortBlog.API.Models
{
public class BlogDto
{
public int BlogId { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; } = string.Empty;
public string BlogUrl { get; set; } = string.Empty;
public ICollection<PostDto> Posts { get; set; } = new List<PostDto>();
}
}

View File

@ -0,0 +1,26 @@
namespace PortBlog.API.Models
{
public class CandidateDto
{
public int CandidateId { get; set; }
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public string DisplayName {
get
{
return FirstName + " " + LastName;
}
}
public string Dob { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Phone { get; set; } = string.Empty;
public string? Address { get; set; }
}
}

View File

@ -0,0 +1,17 @@
namespace PortBlog.API.Models
{
public class CertificationDto
{
public int CertificationId { get; set; }
public string CertificationName { get; set; } = string.Empty;
public string IssuingOrganization { get; set; } = string.Empty;
public string? CertificationLink { get; set; }
public DateTime IssueDate { get; set; }
public DateTime? ExpiryDate { get; set; }
}
}

View File

@ -0,0 +1,11 @@
namespace PortBlog.API.Models
{
public class ExperienceDetailsDto
{
public int Id { get; set; }
public string Details { get; set; } = string.Empty;
public int Order { get; set; } = 0;
}
}

View File

@ -0,0 +1,23 @@
using PortBlog.API.Entities;
namespace PortBlog.API.Models
{
public class ExperienceDto
{
public int ExperienceId { get; set; }
public string Title { get; set; } = string.Empty;
public string? Description { get; set; }
public string Company { get; set; } = string.Empty;
public string StartYear { get; set; } = string.Empty;
public string EndYear { get; set; } = string.Empty;
public string Period { get; set; } = string.Empty;
public ICollection<ExperienceDetailsDto> Details { get; set; } = new List<ExperienceDetailsDto>();
}
}

View File

@ -0,0 +1,13 @@
namespace PortBlog.API.Models
{
public class HobbyDto
{
public int HobbyId { get; set; }
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string? Icon { get; set; }
}
}

View File

@ -0,0 +1,23 @@
namespace PortBlog.API.Models
{
public class PostDto
{
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 Category { get; set; } = string.Empty;
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;
}
}

View File

@ -0,0 +1,37 @@
using System.ComponentModel.DataAnnotations;
namespace PortBlog.API.Models
{
public class ProjectDto
{
public int ProjectId { get; set; }
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string Category { get; set; } = string.Empty;
public ICollection<string> Roles { get; set; } = new List<string>();
public string? Challenges { get; set; } = string.Empty;
public string? LessonsLearned { get; set; } = string.Empty;
public string? Impact { get; set; } = string.Empty;
public ICollection<string> Responsibilities { get; set; } = new List<string>();
public ICollection<string> TechnologiesUsed { get; set; } = new List<string>();
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public string? ImagePath { get; set; }
public string? Status { get; set; } = string.Empty;
public int ResumeId { get; set; }
}
}

View File

@ -0,0 +1,35 @@
namespace PortBlog.API.Models
{
public class ResumeDto
{
public int ResumeId { get; set; }
public string Title { get; set; } = string.Empty;
public string About { get; set; } = string.Empty;
public CandidateDto? Candidate { get; set; }
public SocialLinksDto? SocialLinks { get; set; }
public ICollection<PostDto> Posts
{
get
{
return SocialLinks?.Posts ?? new List<PostDto>();
}
}
public ICollection<AcademicDto> Academics { get; set; } = new List<AcademicDto>();
public ICollection<SkillDto> Skills { get; set; } = new List<SkillDto>();
public ICollection<ExperienceDto> Experiences { get; set; } = new List<ExperienceDto>();
public ICollection<CertificationDto> Certifications { get; set; } = new List<CertificationDto>();
public ICollection<HobbyDto> Hobbies { get; set; } = new List<HobbyDto>();
public ICollection<ProjectDto> Projects { get; set; } = new List<ProjectDto>();
}
}

View File

@ -0,0 +1,13 @@
namespace PortBlog.API.Models
{
public class SkillDto
{
public int SkillId { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public int ProficiencyLevel { get; set; }
}
}

View File

@ -0,0 +1,23 @@
namespace PortBlog.API.Models
{
public class SocialLinksDto
{
public int Id { get; set; }
public string? GitHub { get; set; }
public string Linkedin { get; set; } = string.Empty;
public string? Instagram { get; set; }
public string? Facebook { get; set; }
public string? Twitter { get; set; }
public string? PersonalWebsite { get; set; }
public string? BlogUrl { get; set; }
public ICollection<PostDto> Posts { get; set; } = new List<PostDto>();
}
}

View File

@ -7,19 +7,18 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="serilog.sinks.console" Version="5.0.1" />
<PackageReference Include="serilog.sinks.file" Version="5.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
<Folder Include="Models\" />
<Folder Include="Entities\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
using AutoMapper;
using PortBlog.API.Entities;
using PortBlog.API.Models;
namespace PortBlog.API.Profiles
{
public class BlogProfile : Profile
{
public BlogProfile()
{
CreateMap<Blog, BlogDto>();
CreateMap<Post, PostDto>();
}
}
}

View File

@ -0,0 +1,66 @@
using AutoMapper;
using PortBlog.API.Entities;
using PortBlog.API.Models;
namespace PortBlog.API.Profiles
{
public class ResumeProfile : Profile
{
public ResumeProfile()
{
CreateMap<Candidate, CandidateDto>()
.ForMember
(
dest => dest.Dob,
src => src.MapFrom(src => src.Dob != null ? src.Dob.Value.ToString("MMM dd, yyyy") : string.Empty)
);
CreateMap<Academic, AcademicDto>()
.ForMember(
dest => dest.Period,
src => src.MapFrom(src => src.StartYear + " - " + src.EndYear)
);
CreateMap<Certification, CertificationDto>();
CreateMap<Hobby, HobbyDto>();
CreateMap<Experience, ExperienceDto>()
.ForMember(
dest => dest.Period,
src => src.MapFrom(src => src.StartDate.Year + " - " + (src.EndDate != null ? src.EndDate.Value.Year : "Present"))
)
.ForMember
(
dest => dest.StartYear,
opts => opts.MapFrom(src => src.StartDate.Year.ToString())
)
.ForMember
(
dest => dest.EndYear,
opts => opts.MapFrom(src => src.EndDate != null ? src.EndDate.Value.Year.ToString() : "Present")
);
CreateMap<ExperienceDetails, ExperienceDetailsDto>();
CreateMap<Project, ProjectDto>()
.ForMember
(
dest => dest.Roles,
src => src.MapFrom(src => !string.IsNullOrEmpty(src.Roles) ? src.Roles.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList() : new List<string>())
)
.ForMember
(
dest => dest.Responsibilities,
src => src.MapFrom(src => !string.IsNullOrEmpty(src.Responsibilities) ? src.Responsibilities.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList() : new List<string>())
)
.ForMember
(
dest => dest.TechnologiesUsed,
src => src.MapFrom(src => !string.IsNullOrEmpty(src.TechnologiesUsed) ? src.TechnologiesUsed.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList() : new List<string>())
);
CreateMap<Skill, SkillDto>();
CreateMap<SocialLinks, SocialLinksDto>()
.ForMember
(
dest => dest.Posts,
src => src.MapFrom(src => src.Blog != null ? src.Blog.Posts : new List<Post>())
);
CreateMap<Resume, ResumeDto>();
}
}
}

View File

@ -1,5 +1,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.FileProviders;
using PortBlog.API.DbContexts;
using PortBlog.API.Extensions;
using Serilog;
Log.Logger = new LoggerConfiguration()
@ -25,13 +27,20 @@ builder.Services.AddProblemDetails();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services
.AddDbContext<PortfolioContext>(dbContextOptions
=> dbContextOptions.UseSqlite(builder.Configuration["ConnectionStrings:PortBlogDBConnectionString"]));
var connectionString = builder.Configuration.GetConnectionString("PortBlogDBConnectionString");
if (string.IsNullOrEmpty(connectionString))
{
throw new Exception("Connection string cannot be empty");
}
builder.Services
.AddDbContext<BlogContext>(dbContextOptions
=> dbContextOptions.UseSqlite(builder.Configuration["ConnectionStrings:PortBlogDBConnectionString"]));
.AddDbContext<CvBlogContext>(dbContextOptions
=> dbContextOptions.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)));
builder.Services.AddRepositories();
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
var app = builder.Build();
@ -49,6 +58,12 @@ if (app.Environment.IsDevelopment())
app.UseHttpsRedirection();
app.UseStaticFiles(new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @"Images")),
RequestPath = new PathString("/images")
});
app.UseAuthorization();
app.MapControllers();

View File

@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore;
using PortBlog.API.DbContexts;
using PortBlog.API.Entities;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Repositories
{
public class AcademicRepository : IAcademicRepository
{
private readonly CvBlogContext _cvBlogContext;
public AcademicRepository(CvBlogContext cvBlogContext)
{
_cvBlogContext = cvBlogContext;
}
public async Task<IEnumerable<Academic>> GetAcademicsForResumeAsync(int resumeId)
{
return await _cvBlogContext.Academics.Where(a => a.ResumeId == resumeId).OrderByDescending(a => a.StartYear).ToListAsync();
}
}
}

View File

@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore;
using PortBlog.API.DbContexts;
using PortBlog.API.Entities;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Repositories
{
public class BlogRepository : IBlogRepository
{
private readonly CvBlogContext _cvBlogContext;
public BlogRepository(CvBlogContext cvBlogContext)
{
_cvBlogContext = cvBlogContext;
}
public async Task<Blog?> GetBlogAsync(string blogUrl, bool includePosts)
{
if (includePosts)
{
return await _cvBlogContext.Blogs.Include(b => b.Posts)
.Where(b => b.BlogUrl == blogUrl).FirstOrDefaultAsync();
}
return await _cvBlogContext.Blogs.Where(b => b.BlogUrl == blogUrl).FirstOrDefaultAsync();
}
}
}

View File

@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore;
using PortBlog.API.DbContexts;
using PortBlog.API.Entities;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Repositories
{
public class CandidateRepository : ICandidateRepository
{
private readonly CvBlogContext _cvBlogContext;
public CandidateRepository(CvBlogContext cvBlogContext)
{
_cvBlogContext = cvBlogContext ?? throw new ArgumentNullException(nameof(cvBlogContext));
}
public async Task<bool> CandidateExistAsync(int candidateId)
{
return await _cvBlogContext.Candidates.AnyAsync(c => c.CandidateId == candidateId);
}
public async Task<Candidate?> GetCandidateAsync(int id)
{
return await _cvBlogContext.Candidates.FirstOrDefaultAsync(c => c.CandidateId == id);
}
}
}

View File

@ -0,0 +1,9 @@
using PortBlog.API.Entities;
namespace PortBlog.API.Repositories.Contracts
{
public interface IAcademicRepository
{
Task<IEnumerable<Academic>> GetAcademicsForResumeAsync(int resumeId);
}
}

View File

@ -0,0 +1,9 @@
using PortBlog.API.Entities;
namespace PortBlog.API.Repositories.Contracts
{
public interface IBlogRepository
{
Task<Blog?> GetBlogAsync(string blogUrl, bool includePosts);
}
}

View File

@ -0,0 +1,11 @@
using PortBlog.API.Entities;
namespace PortBlog.API.Repositories.Contracts
{
public interface ICandidateRepository
{
Task<Candidate?> GetCandidateAsync(int id);
Task<bool> CandidateExistAsync(int candidateId);
}
}

View File

@ -0,0 +1,9 @@
using PortBlog.API.Entities;
namespace PortBlog.API.Repositories.Contracts
{
public interface IExperienceRepository
{
Task<IEnumerable<Experience>> GetExperiencesForResumeAsync(int resumeId);
}
}

View File

@ -0,0 +1,10 @@
using PortBlog.API.Entities;
using System.Collections.Generic;
namespace PortBlog.API.Repositories.Contracts
{
public interface IHobbyRepository
{
Task<IEnumerable<Hobby>> GetHobbiesForResumeAsync(int resumeId);
}
}

View File

@ -0,0 +1,9 @@
using PortBlog.API.Entities;
namespace PortBlog.API.Repositories.Contracts
{
public interface IResumeRepository
{
Task<Resume?> GetLatestResumeForCandidateAsync(int candidateId, bool includeOtherData = false);
}
}

View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore;
using PortBlog.API.DbContexts;
using PortBlog.API.Entities;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Repositories
{
public class ExperienceRepository : IExperienceRepository
{
private readonly CvBlogContext _cvBlogContext;
public ExperienceRepository(CvBlogContext cvBlogContext)
{
_cvBlogContext = cvBlogContext;
}
public async Task<IEnumerable<Experience>> GetExperiencesForResumeAsync(int resumeId)
{
return await _cvBlogContext.Experiences.Where(e => e.ResumeId == resumeId).OrderByDescending(e => e.StartDate).ToListAsync();
}
}
}

View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore;
using PortBlog.API.DbContexts;
using PortBlog.API.Entities;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Repositories
{
public class HobbyRepository : IHobbyRepository
{
private readonly CvBlogContext _cvBlogContext;
public HobbyRepository(CvBlogContext cvBlogContext)
{
_cvBlogContext = cvBlogContext;
}
public async Task<IEnumerable<Hobby>> GetHobbiesForResumeAsync(int resumeId)
{
return await _cvBlogContext.Hobbies.Where(h => h.ResumeId == resumeId).OrderBy(h => h.Order).ToListAsync();
}
}
}

View File

@ -0,0 +1,39 @@
using Microsoft.EntityFrameworkCore;
using PortBlog.API.DbContexts;
using PortBlog.API.Entities;
using PortBlog.API.Repositories.Contracts;
namespace PortBlog.API.Repositories
{
public class ResumeRepository : IResumeRepository
{
private readonly CvBlogContext _cvBlogContext;
public ResumeRepository(CvBlogContext cvBlogContext)
{
_cvBlogContext = cvBlogContext;
}
public async Task<Resume?> GetLatestResumeForCandidateAsync(int candidateId, bool includeOtherData)
{
if(includeOtherData)
{
return await _cvBlogContext.Resumes
.Include(r => r.Candidate)
.Include(r => r.Academics.OrderByDescending(a => a.StartYear))
.Include(r => r.Experiences.OrderByDescending(e => e.StartDate))
.ThenInclude(e => e.Details)
.Include(r => r.SocialLinks)
.ThenInclude(s => s.Blog)
.ThenInclude(b => b.Posts.Take(5))
.Include(r => r.Hobbies)
.Include(r => r.Certifications)
.Include(r => r.Skills)
.Include(r => r.Projects)
.Where(r => r.CandidateId == candidateId)
.OrderByDescending(r => r.Order).FirstOrDefaultAsync();
}
return await _cvBlogContext.Resumes.Where(r => r.CandidateId == candidateId).OrderByDescending(r => r.Order).FirstOrDefaultAsync();
}
}
}

View File

@ -1,4 +1,7 @@
{
"ConnectionStrings": {
"PortBlogDBConnectionString": "SERVER=192.168.0.197; DATABASE=cv_blog; UID=PortBlogDevUser; PWD=p@$$w0rd1234"
},
"Logging": {
"LogLevel": {
"Default": "Information",

View File

@ -1,4 +1,7 @@
{
"ConnectionStrings": {
"PortBlogDBConnectionString": "SERVER=10.1.0.10;DATABASE=cv_blog;UID=PortBlogProdUser;PWD=pr0dp@$$w0rd6534"
},
"Logging": {
"LogLevel": {
"Default": "Information",

View File

@ -1,12 +1,12 @@
{
"ConnectionString": {
"PortBlogDBConnectionString": "Data Source=Database\\PortBlogDB.db"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"GeoLocationSettings": {
"apiUrl": "https://ipwho.is/"
}
}