Compare commits
	
		
			No commits in common. "d4ba3d5341fd99bcfa54dd868f4321b0197481ec" and "fa5a8c178daaa2a93683fe40d455f66379df6823" have entirely different histories.
		
	
	
		
			d4ba3d5341
			...
			fa5a8c178d
		
	
		
| @ -1,15 +1,12 @@ | |||||||
| using System.Globalization; | using Marco.Pms.Model.Activities; | ||||||
| using Marco.Pms.Model.Activities; |  | ||||||
| using Marco.Pms.Model.AttendanceModule; | using Marco.Pms.Model.AttendanceModule; | ||||||
| using Marco.Pms.Model.Authentication; | using Marco.Pms.Model.Authentication; | ||||||
| using Marco.Pms.Model.DocumentManager; |  | ||||||
| using Marco.Pms.Model.Employees; | using Marco.Pms.Model.Employees; | ||||||
| using Marco.Pms.Model.Entitlements; | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.Forum; | using Marco.Pms.Model.Industries; | ||||||
| using Marco.Pms.Model.Master; |  | ||||||
| using Marco.Pms.Model.Projects; | using Marco.Pms.Model.Projects; | ||||||
| using Marco.Pms.Model.Roles; |  | ||||||
| using Marco.Pms.Model.Utilities; | using Marco.Pms.Model.Utilities; | ||||||
|  | using Marco.Pms.Utility; | ||||||
| using Microsoft.AspNetCore.Http; | using Microsoft.AspNetCore.Http; | ||||||
| using Microsoft.AspNetCore.Identity; | using Microsoft.AspNetCore.Identity; | ||||||
| using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | ||||||
| @ -75,21 +72,10 @@ namespace Marco.Pms.DataAccess.Data | |||||||
|         public DbSet<JobRole> JobRoles { get; set; } |         public DbSet<JobRole> JobRoles { get; set; } | ||||||
|         public DbSet<RolePermissionMappings> RolePermissionMappings { get; set; } |         public DbSet<RolePermissionMappings> RolePermissionMappings { get; set; } | ||||||
| 
 | 
 | ||||||
|         public DbSet<Industry> Industries { get; set; } |         public DbSet<Industry>Industries { get; set; } | ||||||
|         public DbSet<ActivityCheckList> ActivityCheckLists { get; set; } |         public DbSet<ActivityCheckList>ActivityCheckLists { get; set; } | ||||||
|         public DbSet<CheckListMappings> CheckListMappings { get; set; } |         public DbSet<CheckListMappings> CheckListMappings { get; set; } | ||||||
|         public DbSet<Inquiries> Inquiries { get; set; } |         public DbSet<Inquiries> Inquiries { get; set; } | ||||||
|         public DbSet<TicketForum> Tickets { get; set; } |  | ||||||
|         public DbSet<TicketAttachment> TicketAttachments { get; set; } |  | ||||||
|         public DbSet<TicketComment> TicketComments { get; set; } |  | ||||||
|         public DbSet<TicketStatusMaster> TicketStatusMasters { get; set; } |  | ||||||
|         public DbSet<TicketTypeMaster> TicketTypeMasters { get; set; } |  | ||||||
|         public DbSet<TicketPriorityMaster> TicketPriorityMasters { get; set; } |  | ||||||
|         public DbSet<TicketTagMaster> TicketTagMasters { get; set; } |  | ||||||
|         public DbSet<Document> Documents { get; set; } |  | ||||||
|         public DbSet<TicketTag> TicketTags { get; set; } |  | ||||||
|         public DbSet<WorkCategoryMaster> WorkCategoryMasters { get; set; } |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
|         protected override void OnModelCreating(ModelBuilder modelBuilder) |         protected override void OnModelCreating(ModelBuilder modelBuilder) | ||||||
|         { |         { | ||||||
| @ -97,48 +83,48 @@ namespace Marco.Pms.DataAccess.Data | |||||||
| 
 | 
 | ||||||
|             ManageApplicationStructure(modelBuilder); |             ManageApplicationStructure(modelBuilder); | ||||||
| 
 | 
 | ||||||
|             //modelBuilder.Entity<ApplicationRole>().HasData( |             modelBuilder.Entity<ApplicationRole>().HasData( | ||||||
|             //   new ApplicationRole |                new ApplicationRole | ||||||
|             //   { |                { | ||||||
|             //       Id = new Guid("2c8d0808-c421-11ef-9b93-0242ac110002"), |                    Id = new Guid("2c8d0808-c421-11ef-9b93-0242ac110002"), | ||||||
|             //       Role = "Super User", |                    Role = "Admin", | ||||||
|             //       Description = "Super User", |                    Description = "", | ||||||
|             //       TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                    TenantId = 1 | ||||||
|             //   }, |                }, | ||||||
|             //    new ApplicationRole |                 new ApplicationRole | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("62e0918d-c421-11ef-9b93-0242ac110002"), |                     Id = new Guid("62e0918d-c421-11ef-9b93-0242ac110002"), | ||||||
|             //        Role = "Welder", |                     Role = "Welder", | ||||||
|             //        Description = "", |                     Description = "", | ||||||
| 
 | 
 | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    }, |                 }, | ||||||
|             //     new ApplicationRole |                  new ApplicationRole | ||||||
|             //     { |                  { | ||||||
|             //         Id = new Guid("68823f1f-c421-11ef-9b93-0242ac110002"), |                      Id = new Guid("68823f1f-c421-11ef-9b93-0242ac110002"), | ||||||
|             //         Role = "Helper", |                      Role = "Helper", | ||||||
|             //         Description = "", |                      Description = "", | ||||||
| 
 | 
 | ||||||
|             //         TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                      TenantId = 1 | ||||||
|             //     }, |                  }, | ||||||
|             //      new ApplicationRole |                   new ApplicationRole | ||||||
|             //      { |                   { | ||||||
|             //          Id = new Guid("6d3a7c72-c421-11ef-9b93-0242ac110002"), |                       Id = new Guid("6d3a7c72-c421-11ef-9b93-0242ac110002"), | ||||||
|             //          Role = "Site Engineer", |                       Role = "Site Engineer", | ||||||
|             //          Description = "", |                       Description = "", | ||||||
| 
 | 
 | ||||||
|             //          TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                       TenantId = 1 | ||||||
|             //      } |                   } | ||||||
|             //      , |                   , | ||||||
|             //          new ApplicationRole |                       new ApplicationRole | ||||||
|             //          { |                       { | ||||||
|             //              Id = new Guid("6d3aad72-c421-11ef-9b93-0242ac110002"), |                           Id = new Guid("6d3aad72-c421-11ef-9b93-0242ac110002"), | ||||||
|             //              Role = "Project Manager", |                           Role = "Project Manager", | ||||||
|             //              Description = "", |                           Description = "", | ||||||
| 
 | 
 | ||||||
|             //              TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                           TenantId = 1 | ||||||
|             //          } |                       } | ||||||
|             //   ); |                ); | ||||||
| 
 | 
 | ||||||
|             modelBuilder.Entity<RefreshToken>(entity => |             modelBuilder.Entity<RefreshToken>(entity => | ||||||
|             { |             { | ||||||
| @ -150,287 +136,165 @@ namespace Marco.Pms.DataAccess.Data | |||||||
|             }); |             }); | ||||||
| 
 | 
 | ||||||
|             modelBuilder.Entity<Tenant>().HasData( |             modelBuilder.Entity<Tenant>().HasData( | ||||||
|                 new Tenant { Id = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26"), OragnizationSize = "100-200", Name = "MarcoBMS", ContactName = "Admin", ContactNumber = "123456789", Description = "", DomainName = "www.marcobms.org", IndustryId = Guid.Parse("15436ee3-a650-469e-bfc2-59993f7514bb"), OnBoardingDate = DateTime.MinValue } |     new Tenant { Id = 1, Name = "MarcoBMS", ContactName = "Admin", ContactNumber = "123456789", Description = "", DomainName = "www.marcobms.org",IndustryId = 1, OnBoardingDate = DateTime.MinValue } | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|             modelBuilder.Entity<StatusMaster>().HasData( |             modelBuilder.Entity<StatusMaster>().HasData( | ||||||
|                 new StatusMaster |                 new StatusMaster | ||||||
|                 { |                 { | ||||||
|                     Id = new Guid("b74da4c2-d07e-46f2-9919-e75e49b12731"), |                     Id = 1, | ||||||
|                     Status = "Active", |                     Status = "Active", | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|                 }, |                 }, | ||||||
|                  new StatusMaster |                  new StatusMaster | ||||||
|                  { |                  { | ||||||
|                      Id = new Guid("603e994b-a27f-4e5d-a251-f3d69b0498ba"), |                      Id = 2, | ||||||
|                      Status = "In Progress", |                      Status = "In Progress", | ||||||
|                      TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                      TenantId = 1 | ||||||
|                  }, |                  }, | ||||||
|                   new StatusMaster |                   new StatusMaster | ||||||
|                   { |                   { | ||||||
|                       Id = new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"), |                       Id = 3, | ||||||
|                       Status = "On Hold", |                       Status = "On Hold", | ||||||
|                       TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                       TenantId = 1 | ||||||
|                   }, |                   }, | ||||||
|                    new StatusMaster |                    new StatusMaster | ||||||
|                    { |                    { | ||||||
|                        Id = new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"), |                        Id = 4, | ||||||
|                        Status = "Completed", |                        Status = "Completed", | ||||||
|                        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                        TenantId = 1 | ||||||
|                    } |                    } | ||||||
|                 ); |                 ); | ||||||
|             modelBuilder.Entity<Project>().HasData( |             modelBuilder.Entity<Project>().HasData( | ||||||
|                 new Project |                 new Project | ||||||
|                 { |                 { | ||||||
|                     Id = new Guid("85bf587b-7ca9-4685-b77c-d817f5847e85"), |                     Id = 1, | ||||||
|                     Name = "Project 1", |                     Name = "Project 1", | ||||||
|                     ProjectAddress = "Project 1 Address", |                     ProjectAddress = "Project 1 Address", | ||||||
|                     ContactPerson = "Project 1 Contact Person", |                     ContactPerson = "Project 1 Contact Person", | ||||||
|                     StartDate = DateTime.ParseExact("2025-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture), |                     ProjectStatusId = 1, | ||||||
|                     EndDate = DateTime.ParseExact("2026-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture), |                     TenantId = 1 | ||||||
|                     ProjectStatusId = new Guid("b74da4c2-d07e-46f2-9919-e75e49b12731"), |                 }, new Project | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                 { | ||||||
|                 } |                     Id = 2, | ||||||
|                 //, new Project |                     Name = "Project 2", | ||||||
|                 //{ |                     ProjectAddress = "Project 2 Address", | ||||||
|                 //    Id = new Guid("3ef56a12-f5e5-4193-87d6-9e110ed10b86"), |                     ContactPerson = "Project 2 Contact Person", | ||||||
|                 //    Name = "Project 2", |                     ProjectStatusId = 2, | ||||||
|                 //    ProjectAddress = "Project 2 Address", |                     TenantId = 1 | ||||||
|                 //    ContactPerson = "Project 2 Contact Person", |                 }, new Project | ||||||
|                 //    StartDate = DateTime.ParseExact("2025-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture), |                 { | ||||||
|                 //    EndDate = DateTime.ParseExact("2026-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture), |                     Id = 3, | ||||||
|                 //    ProjectStatusId = new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"), |                     Name = "Project 3", | ||||||
|                 //    TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     ProjectAddress = "Project 3 Address", | ||||||
|                 //}, new Project |                     ContactPerson = "Project 3 Contact Person", | ||||||
|                 //{ |                     ProjectStatusId = 3, | ||||||
|                 //    Id = new Guid("54d013e3-0a2b-48be-85c7-5ef03492a18c"), |                     TenantId = 1 | ||||||
|                 //    Name = "Project 3", |                 }); | ||||||
|                 //    ProjectAddress = "Project 3 Address", |  | ||||||
|                 //    ContactPerson = "Project 3 Contact Person", |  | ||||||
|                 //    StartDate = DateTime.ParseExact("2025-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture), |  | ||||||
|                 //    EndDate = DateTime.ParseExact("2026-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture), |  | ||||||
|                 //    ProjectStatusId = new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"), |  | ||||||
|                 //    TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 //} |  | ||||||
|                 ); |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|             var tenantId = _httpContextAccessor.HttpContext?.Items["TenantId"]?.ToString(); |             var tenantId = _httpContextAccessor.HttpContext?.Items["TenantId"]?.ToString(); | ||||||
| 
 | 
 | ||||||
|             //modelBuilder.Entity<ActivityMaster>() |             modelBuilder.Entity<ActivityMaster>() | ||||||
|             //    .HasData( |                 .HasData( | ||||||
|             //    new ActivityMaster |                 new ActivityMaster | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("4117b7de-ef6c-461f-a2c2-64eaac5f9a11"), |                     Id = 1, | ||||||
|             //        ActivityName = "Core Cutting", |                     ActivityName = "Core Cutting", | ||||||
|             //        UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), |                     UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    }, new ActivityMaster |                 }, new ActivityMaster | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("1714f64d-7591-4419-bee5-118d21bb2855"), |                     Id = 2, | ||||||
|             //        ActivityName = "Fabrication", |                     ActivityName = "Fabrication", | ||||||
|             //        UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), |                     UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    }, new ActivityMaster |                 }, new ActivityMaster | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("b3f51a93-dde6-45f9-8b22-f1bf017a640b"), |                     Id = 3, | ||||||
|             //        ActivityName = "Welding", |                     ActivityName = "Lifting", | ||||||
|             //        UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), |                     UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    }, new ActivityMaster |                 }, new ActivityMaster | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("53eedf44-4076-445f-be93-fedef17117e7"), |                     Id = 4, | ||||||
|             //        ActivityName = "MS Support Fabrication", |                     ActivityName = "Hanging", | ||||||
|             //        UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), |                     UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    }, new ActivityMaster |                 }, new ActivityMaster | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("715b9ddb-d9e2-4afa-8987-d9918905cea4"), |                     Id = 5, | ||||||
|             //        ActivityName = "MS Support Hanging", |                     ActivityName = "Tapping", | ||||||
|             //        UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), |                     UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    }, new ActivityMaster |                 }, new ActivityMaster | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("a3d191a7-a5aa-4dd8-a525-12c99263bbd6"), |                     Id = 6, | ||||||
|             //        ActivityName = "Hydrant Volve", |                     ActivityName = "Welding", | ||||||
|             //        UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), |                     UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    }, new ActivityMaster |                 }, new ActivityMaster | ||||||
|             //    { |                 { | ||||||
|             //        Id = new Guid("c138a7de-713a-4bd4-8292-b0b265be77a3"), |                     Id = 7, | ||||||
|             //        ActivityName = "Sprinkler Installation", |                     ActivityName = "Testing", | ||||||
|             //        UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), |                     UnitOfMeasurement = UnitOfMeasurement.Area.ToString(), | ||||||
|             //        TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |                     TenantId = 1 | ||||||
|             //    } |                 }, new ActivityMaster | ||||||
|             //    ); |                 { | ||||||
| 
 |                     Id = 8, | ||||||
|  |                     ActivityName = "Painting", | ||||||
|  |                     UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), | ||||||
|  |                     TenantId = 1 | ||||||
|  |                 }, new ActivityMaster | ||||||
|  |                 { | ||||||
|  |                     Id = 9, | ||||||
|  |                     ActivityName = "Marking Area", | ||||||
|  |                     UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(), | ||||||
|  |                     TenantId = 1 | ||||||
|  |                 }, new ActivityMaster | ||||||
|  |                 { | ||||||
|  |                     Id = 10, | ||||||
|  |                     ActivityName = "Drilling", | ||||||
|  |                     UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), | ||||||
|  |                     TenantId = 1 | ||||||
|  |                 }, new ActivityMaster | ||||||
|  |                 { | ||||||
|  |                     Id = 11, | ||||||
|  |                     ActivityName = "MS Support Fabrication", | ||||||
|  |                     UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), | ||||||
|  |                     TenantId = 1 | ||||||
|  |                 }, new ActivityMaster | ||||||
|  |                 { | ||||||
|  |                     Id = 12, | ||||||
|  |                     ActivityName = "MS Support Hanging", | ||||||
|  |                     UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), | ||||||
|  |                     TenantId = 1 | ||||||
|  |                 }, new ActivityMaster | ||||||
|  |                 { | ||||||
|  |                     Id = 13, | ||||||
|  |                     ActivityName = "Hydrant Volve", | ||||||
|  |                     UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), | ||||||
|  |                     TenantId = 1 | ||||||
|  |                 }, new ActivityMaster | ||||||
|  |                 { | ||||||
|  |                     Id = 14, | ||||||
|  |                     ActivityName = "Sprinkler Installation", | ||||||
|  |                     UnitOfMeasurement = UnitOfMeasurement.Number.ToString(), | ||||||
|  |                     TenantId = 1 | ||||||
|  |                 } | ||||||
|  |                 ); | ||||||
|             modelBuilder.Entity<Industry>().HasData( |             modelBuilder.Entity<Industry>().HasData( | ||||||
|                 new Industry { Id = Guid.Parse("15436ee3-a650-469e-bfc2-59993f7514bb"), Name = "Information Technology (IT) Services" }, |                 new Industry {Id = 1,Name = "Information Technology (IT) Services"}, | ||||||
|                 new Industry { Id = Guid.Parse("0a63e657-2c5f-49b5-854b-42c978293154"), Name = "Manufacturing & Production" }, |                 new Industry { Id = 2,Name = "Manufacturing & Production" }, | ||||||
|                 new Industry { Id = Guid.Parse("bdc61e3b-69ea-4394-bab6-079ec135b5bd"), Name = "Energy & Resources" }, |                 new Industry { Id = 3,Name = "Energy & Resources" }, | ||||||
|                 new Industry { Id = Guid.Parse("5ca200ac-00d7-415e-a410-b948e27ac9d2"), Name = "Finance & Professional Services" }, |                 new Industry { Id = 4,Name = "Finance & Professional Services" }, | ||||||
|                 new Industry { Id = Guid.Parse("d5621700-cd87-441f-8cdb-6051ddfc83b4"), Name = "Hospitals and Healthcare Services" }, |                 new Industry { Id = 5, Name = "Hospitals and Healthcare Services" }, | ||||||
|                 new Industry { Id = Guid.Parse("23608891-657e-40f0-bbd4-2b0a2ec1a76f"), Name = "Social Services" }, |                 new Industry { Id = 6, Name = "Social Services" }, | ||||||
|                 new Industry { Id = Guid.Parse("a493f4e3-16b1-4411-be3c-6bf2987a3168"), Name = "Retail & Consumer Services" }, |                 new Industry { Id = 7, Name = "Retail & Consumer Services" }, | ||||||
|                 new Industry { Id = Guid.Parse("e9d8ce92-9371-4ed9-9831-83c07f78edec"), Name = "Transportation & Logistics" }, |                 new Industry { Id = 8, Name = "Transportation & Logistics" }, | ||||||
|                 new Industry { Id = Guid.Parse("8a0d6134-2dbe-4e0a-b250-ff34cb7b9df0"), Name = "Education & Training" } |                 new Industry { Id = 9, Name = "Education & Training" } | ||||||
| 
 | 
 | ||||||
|                 ); |                 ); | ||||||
|             modelBuilder.Entity<TicketStatusMaster>().HasData( |  | ||||||
|                 new TicketStatusMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("6b0c409b-3e80-4165-8b39-f3fcacb4c797"), |  | ||||||
|                     Name = "New", |  | ||||||
|                     Description = "This is a newly created issue.", |  | ||||||
|                     ColorCode = "#FFCC99", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketStatusMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("6c5ac37d-5b7d-40f3-adec-2dabaa5cca86"), |  | ||||||
|                     Name = "Assigned", |  | ||||||
|                     Description = "Assigned to employee or team of employees", |  | ||||||
|                     ColorCode = "#E6FF99", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketStatusMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("7f96bcd5-0c66-411b-8a1d-9d1a4785194e"), |  | ||||||
|                     Name = "In Progress", |  | ||||||
|                     Description = "These issues are currently in progress", |  | ||||||
|                     ColorCode = "#99E6FF", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketStatusMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("5c72b630-6923-4215-bf2c-b1622afd76e7"), |  | ||||||
|                     Name = "In Review", |  | ||||||
|                     Description = "These issues are currently under review", |  | ||||||
|                     ColorCode = "#6c757d", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketStatusMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("8ff85685-a875-4f21-aa95-d99551315fcc"), |  | ||||||
|                     Name = "Done", |  | ||||||
|                     Description = "The following issues are resolved and closed", |  | ||||||
|                     ColorCode = "#B399FF", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 } |  | ||||||
|             ); |  | ||||||
|             modelBuilder.Entity<TicketTypeMaster>().HasData( |  | ||||||
|                 new TicketTypeMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("c74e5480-2b71-483c-8f4a-1a9c69c32603"), |  | ||||||
|                     Name = "Quality Issue", |  | ||||||
|                     Description = "An identified problem that affects the performance, reliability, or standards of a product or service", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketTypeMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("d1f55eab-9898-4e46-9f03-b263e33e5d38"), |  | ||||||
|                     Name = "Help Desk", |  | ||||||
|                     Description = "A support service that assists users with technical issues, requests, or inquiries.", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 } |  | ||||||
|                 ); |  | ||||||
|             modelBuilder.Entity<TicketPriorityMaster>().HasData( |  | ||||||
|                 new TicketPriorityMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("188d29b3-10f3-42d0-9587-1a46ae7a0320"), |  | ||||||
|                     Name = "Low", |  | ||||||
|                     ColorCode = "008000", |  | ||||||
|                     Level = 1, |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketPriorityMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("0919bc84-9f82-4ecf-98c7-962755dd9a97"), |  | ||||||
|                     Name = "Medium", |  | ||||||
|                     ColorCode = "FFFF00", |  | ||||||
|                     Level = 2, |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, new TicketPriorityMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("a13b7e59-16fd-4665-b5cf-a97399e8445a"), |  | ||||||
|                     Name = "High", |  | ||||||
|                     ColorCode = "#FFA500", |  | ||||||
|                     Level = 3, |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, new TicketPriorityMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("f340fbc3-c9fd-46aa-b063-0093418830e4"), |  | ||||||
|                     Name = "Critical", |  | ||||||
|                     ColorCode = "#FFA500", |  | ||||||
|                     Level = 4, |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketPriorityMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("44a7b91d-a0dd-45d1-8616-4d2f71e16401"), |  | ||||||
|                     Name = "Urgent", |  | ||||||
|                     ColorCode = "#FF0000", |  | ||||||
|                     Level = 5, |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 } |  | ||||||
|                 ); |  | ||||||
|             modelBuilder.Entity<TicketTagMaster>().HasData( |  | ||||||
|                 new TicketTagMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("ef6c2a65-f61d-4537-9650-a7ab7f8d98db"), |  | ||||||
|                     Name = "Quality Issue", |  | ||||||
|                     ColorCode = "#e59866", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new TicketTagMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("5a168569-8ad7-4422-8db6-51ef25caddeb"), |  | ||||||
|                     Name = "Help Desk", |  | ||||||
|                     ColorCode = "#85c1e9", |  | ||||||
|                     IsDefault = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 } |  | ||||||
|                 ); |  | ||||||
|             modelBuilder.Entity<WorkCategoryMaster>().HasData( |  | ||||||
|                 new WorkCategoryMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("86bb2cc8-f6b5-4fdd-bbee-c389c713a44b"), |  | ||||||
|                     Name = "Fresh Work", |  | ||||||
|                     Description = "Created new task in a professional or creative context", |  | ||||||
|                     IsSystem = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new WorkCategoryMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("9ebfa19c-53b9-481b-b863-c25d2f843201"), |  | ||||||
|                     Name = "Rework", |  | ||||||
|                     Description = "Revising, modifying, or correcting a task to improve its quality or fix issues", |  | ||||||
|                     IsSystem = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 }, |  | ||||||
|                 new WorkCategoryMaster |  | ||||||
|                 { |  | ||||||
|                     Id = new Guid("11a79929-1d07-42dc-9e98-82d0d2f4a240"), |  | ||||||
|                     Name = "Quality Issue", |  | ||||||
|                     Description = "Any defect, deviation, or non-conformance in a task that fails to meet established standards or customer expectations.", |  | ||||||
|                     IsSystem = true, |  | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") |  | ||||||
|                 } |  | ||||||
|                 ); |  | ||||||
| 
 |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         private static void ManageApplicationStructure(ModelBuilder modelBuilder) |         private static void ManageApplicationStructure(ModelBuilder modelBuilder) | ||||||
| @ -459,19 +323,19 @@ namespace Marco.Pms.DataAccess.Data | |||||||
| 
 | 
 | ||||||
|             modelBuilder.Entity<Module>().HasData(new Module |             modelBuilder.Entity<Module>().HasData(new Module | ||||||
|             { |             { | ||||||
|                 Id = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), |                 Id = 1, | ||||||
|                 Name = "Project", |                 Name = "Project", | ||||||
|                 Description = "Project Module", |                 Description = "Project Module", | ||||||
|                 Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02" |                 Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02" | ||||||
|             }, new Module |             }, new Module | ||||||
|             { |             { | ||||||
|                 Id = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), |                 Id = 2, | ||||||
|                 Name = "Employee", |                 Name = "Employee", | ||||||
|                 Description = "Employee Module", |                 Description = "Employee Module", | ||||||
|                 Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637" |                 Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637" | ||||||
|             }, new Module |             }, new Module | ||||||
|             { |             { | ||||||
|                 Id = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), |                 Id = 3, | ||||||
|                 Name = "Masters", |                 Name = "Masters", | ||||||
|                 Description = "Masters Module", |                 Description = "Masters Module", | ||||||
|                 Key = "504ec132-e6a9-422f-8f85-050602cfce05" |                 Key = "504ec132-e6a9-422f-8f85-050602cfce05" | ||||||
| @ -480,23 +344,23 @@ namespace Marco.Pms.DataAccess.Data | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|             modelBuilder.Entity<Feature>().HasData( |             modelBuilder.Entity<Feature>().HasData( | ||||||
|                 new Feature { Id = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), Description = "Manage Project", Name = "Manage Project", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true }, |                 new Feature { Id = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), Description = "Manage Project", Name = "Manage Project", ModuleId = 1, IsActive = true }, | ||||||
|                 new Feature { Id = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), Description = "Manage Infra", Name = "Manage Infra", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true }, |                 new Feature { Id = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), Description = "Manage Infra", Name = "Manage Infra", ModuleId = 1, IsActive = true }, | ||||||
| 
 | 
 | ||||||
|                 new Feature { Id = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Manage Tasks", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true }, |                 new Feature { Id = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Manage Tasks", ModuleId = 1, IsActive = true }, | ||||||
| 
 | 
 | ||||||
|                  new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Assign and Update Tasks Progress", Name = "Assign and Update Tasks Progress", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true }, |                  new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Assign and Update Tasks Progress", Name = "Assign and Update Tasks Progress", ModuleId = 1, IsActive = true }, | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|                 new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Manage Employee", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true }, |                 new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Manage Employee", ModuleId = 2, IsActive = true }, | ||||||
|                 new Feature { Id = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true }, |                 new Feature { Id = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance", ModuleId = 2, IsActive = true }, | ||||||
| 
 | 
 | ||||||
|                  new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Global Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }, |                  new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Global Masters", ModuleId = 3, IsActive = true }, | ||||||
|                  new Feature { Id = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), Description = "Tenant Masters", Name = "Tenant Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true } |                  new Feature { Id = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), Description = "Tenant Masters", Name = "Tenant Masters", ModuleId = 3, IsActive = true } | ||||||
|              ); |              ); | ||||||
| 
 | 
 | ||||||
|             modelBuilder.Entity<FeaturePermission>().HasData( |             modelBuilder.Entity<FeaturePermission>().HasData( | ||||||
|                 new FeaturePermission { Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project", Description = "" }, |                 new FeaturePermission { Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project" , Description=""}, | ||||||
|                  new FeaturePermission { Id = new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Project", Description = "" }, |                  new FeaturePermission { Id = new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Project", Description = "" }, | ||||||
|                  new FeaturePermission { Id = new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Team", Description = "" }, |                  new FeaturePermission { Id = new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Team", Description = "" }, | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| using Marco.Pms.DataAccess.Data; | using Marco.Pms.DataAccess.Data; | ||||||
| using Marco.Pms.Model.Employees; | using Marco.Pms.Model.Employees; | ||||||
| using Marco.Pms.Model.Entitlements; | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.ViewModels.Projects; | using Marco.Pms.Model.ViewModels; | ||||||
| using Marco.Pms.Utility; | using Marco.Pms.Utility; | ||||||
| using Microsoft.AspNetCore.Identity; | using Microsoft.AspNetCore.Identity; | ||||||
| using Microsoft.EntityFrameworkCore; | using Microsoft.EntityFrameworkCore; | ||||||
| @ -34,10 +34,7 @@ namespace Marco.Pms.DataAccess.Initializer | |||||||
|                     _db.Database.Migrate(); |                     _db.Database.Migrate(); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             catch (Exception ex) |             catch (Exception ex) { } | ||||||
|             { |  | ||||||
|                 Console.WriteLine(ex.ToString()); |  | ||||||
|             } |  | ||||||
| 
 | 
 | ||||||
|             // Create roes if not created |             // Create roes if not created | ||||||
| 
 | 
 | ||||||
| @ -62,12 +59,12 @@ namespace Marco.Pms.DataAccess.Initializer | |||||||
|                     // State = "State", |                     // State = "State", | ||||||
|                     // Postalcode = "1234567890", |                     // Postalcode = "1234567890", | ||||||
|                     //  City = "City", |                     //  City = "City", | ||||||
|                     TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26"), |                     TenantId = 1, | ||||||
|                     IsRootUser = true, |                     IsRootUser = true, | ||||||
| 
 | 
 | ||||||
|                 }, "User@123").GetAwaiter().GetResult(); |                 }, "User@123").GetAwaiter().GetResult(); | ||||||
| 
 | 
 | ||||||
|                 ApplicationUser user = _db.ApplicationUsers.FirstOrDefault(u => u.Email == "admin@marcobms.com") ?? new ApplicationUser(); |                 ApplicationUser user = _db.ApplicationUsers.FirstOrDefault(u => u.Email == "admin@marcobms.com"); | ||||||
|                 _userManager.AddToRoleAsync(user, APP_ROLES.Admin.ToString()).GetAwaiter().GetResult(); |                 _userManager.AddToRoleAsync(user, APP_ROLES.Admin.ToString()).GetAwaiter().GetResult(); | ||||||
| 
 | 
 | ||||||
|                 Employee emp = new Employee() |                 Employee emp = new Employee() | ||||||
|  | |||||||
| @ -12,6 +12,13 @@ | |||||||
|     <None Remove="Repository\**" /> |     <None Remove="Repository\**" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
| 
 | 
 | ||||||
|  |   <ItemGroup> | ||||||
|  |     <Compile Remove="Migrations\20240926175604_identitySetup.cs" /> | ||||||
|  |     <Compile Remove="Migrations\20240926175604_identitySetup.Designer.cs" /> | ||||||
|  |     <Compile Remove="Migrations\20240927100058_AddModels.cs" /> | ||||||
|  |     <Compile Remove="Migrations\20240927100058_AddModels.Designer.cs" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <ProjectReference Include="..\Marco.Pms.Model\Marco.Pms.Model.csproj" /> |     <ProjectReference Include="..\Marco.Pms.Model\Marco.Pms.Model.csproj" /> | ||||||
|     <ProjectReference Include="..\Marco.Pms.Utility\Marco.Pms.Utility.csproj" /> |     <ProjectReference Include="..\Marco.Pms.Utility\Marco.Pms.Utility.csproj" /> | ||||||
| @ -25,4 +32,8 @@ | |||||||
|     <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" /> |     <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
| 
 | 
 | ||||||
|  |   <ItemGroup> | ||||||
|  |     <Folder Include="Migrations\" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | 
 | ||||||
| </Project> | </Project> | ||||||
|  | |||||||
							
								
								
									
										1946
									
								
								Marco.Pms.DataAccess/Migrations/20250326054022_initmigration.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										1946
									
								
								Marco.Pms.DataAccess/Migrations/20250326054022_initmigration.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2031
									
								
								Marco.Pms.DataAccess/Migrations/20250331105744_Add_Industry_Table.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										2031
									
								
								Marco.Pms.DataAccess/Migrations/20250331105744_Add_Industry_Table.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,135 @@ | |||||||
|  | using Microsoft.EntityFrameworkCore.Metadata; | ||||||
|  | using Microsoft.EntityFrameworkCore.Migrations; | ||||||
|  | 
 | ||||||
|  | #nullable disable | ||||||
|  | 
 | ||||||
|  | #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.DataAccess.Migrations | ||||||
|  | { | ||||||
|  |     /// <inheritdoc /> | ||||||
|  |     public partial class Add_Industry_Table : Migration | ||||||
|  |     { | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             //migrationBuilder.DropColumn( | ||||||
|  |             //    name: "Role", | ||||||
|  |             //    table: "AspNetUsers"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<int>( | ||||||
|  |                 name: "IndustryId", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<bool>( | ||||||
|  |                 name: "IsActive", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "tinyint(1)", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: false); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<string>( | ||||||
|  |                 name: "OragnizationSize", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<bool>( | ||||||
|  |                 name: "IsActive", | ||||||
|  |                 table: "AspNetUsers", | ||||||
|  |                 type: "tinyint(1)", | ||||||
|  |                 nullable: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateTable( | ||||||
|  |                 name: "Industries", | ||||||
|  |                 columns: table => new | ||||||
|  |                 { | ||||||
|  |                     Id = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                         .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||||||
|  |                     Name = table.Column<string>(type: "longtext", nullable: false) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 }, | ||||||
|  |                 constraints: table => | ||||||
|  |                 { | ||||||
|  |                     table.PrimaryKey("PK_Industries", x => x.Id); | ||||||
|  |                 }) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.InsertData( | ||||||
|  |                 table: "Industries", | ||||||
|  |                 columns: new[] { "Id", "Name" }, | ||||||
|  |                 values: new object[,] | ||||||
|  |                 { | ||||||
|  |                     { 1, "Information Technology (IT) Services" }, | ||||||
|  |                     { 2, "Manufacturing & Production" }, | ||||||
|  |                     { 3, "Energy & Resources" }, | ||||||
|  |                     { 4, "Finance & Professional Services" }, | ||||||
|  |                     { 5, "Hospitals and Healthcare Services" }, | ||||||
|  |                     { 6, "Social Services" }, | ||||||
|  |                     { 7, "Retail & Consumer Services" }, | ||||||
|  |                     { 8, "Transportation & Logistics" }, | ||||||
|  |                     { 9, "Education & Training" } | ||||||
|  |                 }); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 1, | ||||||
|  |                 columns: new[] { "IndustryId", "IsActive", "OragnizationSize" }, | ||||||
|  |                 values: new object[] { 1, true, null }); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_Tenants_IndustryId", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 column: "IndustryId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_Tenants_Industries_IndustryId", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 column: "IndustryId", | ||||||
|  |                 principalTable: "Industries", | ||||||
|  |                 principalColumn: "Id"); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_Tenants_Industries_IndustryId", | ||||||
|  |                 table: "Tenants"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropTable( | ||||||
|  |                 name: "Industries"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropIndex( | ||||||
|  |                 name: "IX_Tenants_IndustryId", | ||||||
|  |                 table: "Tenants"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "IndustryId", | ||||||
|  |                 table: "Tenants"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "IsActive", | ||||||
|  |                 table: "Tenants"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "OragnizationSize", | ||||||
|  |                 table: "Tenants"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "IsActive", | ||||||
|  |                 table: "AspNetUsers"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<string>( | ||||||
|  |                 name: "Role", | ||||||
|  |                 table: "AspNetUsers", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,543 @@ | |||||||
|  | using System; | ||||||
|  | using Microsoft.EntityFrameworkCore.Metadata; | ||||||
|  | using Microsoft.EntityFrameworkCore.Migrations; | ||||||
|  | 
 | ||||||
|  | #nullable disable | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.DataAccess.Migrations | ||||||
|  | { | ||||||
|  |     /// <inheritdoc /> | ||||||
|  |     public partial class TaskAllocationModels : Migration | ||||||
|  |     { | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_ActivityMasters_TaskAllocations_TaskAllocationId", | ||||||
|  |                 table: "ActivityMasters"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Buildings_BuildingId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Employees_EmployeeId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Projects_ProjectId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkAreas_WorkAreaId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropIndex( | ||||||
|  |                 name: "IX_TaskAllocations_BuildingId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropIndex( | ||||||
|  |                 name: "IX_TaskAllocations_EmployeeId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropIndex( | ||||||
|  |                 name: "IX_ActivityMasters_TaskAllocationId", | ||||||
|  |                 table: "ActivityMasters"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "BuildingId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "EmployeeId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "TaskAllocationId", | ||||||
|  |                 table: "ActivityMasters"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "WorkAreaId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "WorkItemMappingId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "ReAllocationDate", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "ReportedDate"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "ProjectId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "WorkItemId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "EmployeeRole", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "AssignedBy"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "AllocationDate", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "AssignmentDate"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameIndex( | ||||||
|  |                 name: "IX_TaskAllocations_WorkAreaId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "IX_TaskAllocations_WorkItemMappingId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameIndex( | ||||||
|  |                 name: "IX_TaskAllocations_ProjectId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "IX_TaskAllocations_WorkItemId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<double>( | ||||||
|  |                 name: "PlannedWork", | ||||||
|  |                 table: "WorkItems", | ||||||
|  |                 type: "double", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(int), | ||||||
|  |                 oldType: "int"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<double>( | ||||||
|  |                 name: "CompletedWork", | ||||||
|  |                 table: "WorkItems", | ||||||
|  |                 type: "double", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(int), | ||||||
|  |                 oldType: "int"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<long>( | ||||||
|  |                 name: "Id", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "bigint", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(int), | ||||||
|  |                 oldType: "int") | ||||||
|  |                 .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn) | ||||||
|  |                 .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<double>( | ||||||
|  |                 name: "CompletedTask", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "double", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: 0.0); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<double>( | ||||||
|  |                 name: "PlannedTask", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "double", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: 0.0); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateTable( | ||||||
|  |                 name: "TaskComments", | ||||||
|  |                 columns: table => new | ||||||
|  |                 { | ||||||
|  |                     Id = table.Column<long>(type: "bigint", nullable: false) | ||||||
|  |                         .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||||||
|  |                     TaskAllocationId = table.Column<long>(type: "bigint", nullable: false), | ||||||
|  |                     CommentDate = table.Column<DateTime>(type: "datetime(6)", nullable: false), | ||||||
|  |                     Comment = table.Column<string>(type: "longtext", nullable: false) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4"), | ||||||
|  |                     CommentedBy = table.Column<int>(type: "int", nullable: false), | ||||||
|  |                     TenantId = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                 }, | ||||||
|  |                 constraints: table => | ||||||
|  |                 { | ||||||
|  |                     table.PrimaryKey("PK_TaskComments", x => x.Id); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_TaskComments_Employees_CommentedBy", | ||||||
|  |                         column: x => x.CommentedBy, | ||||||
|  |                         principalTable: "Employees", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_TaskComments_TaskAllocations_TaskAllocationId", | ||||||
|  |                         column: x => x.TaskAllocationId, | ||||||
|  |                         principalTable: "TaskAllocations", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_TaskComments_Tenants_TenantId", | ||||||
|  |                         column: x => x.TenantId, | ||||||
|  |                         principalTable: "Tenants", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                 }) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateTable( | ||||||
|  |                 name: "TaskMembers", | ||||||
|  |                 columns: table => new | ||||||
|  |                 { | ||||||
|  |                     Id = table.Column<long>(type: "bigint", nullable: false) | ||||||
|  |                         .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||||||
|  |                     TaskAllocationId = table.Column<long>(type: "bigint", nullable: false), | ||||||
|  |                     EmployeeId = table.Column<int>(type: "int", nullable: false), | ||||||
|  |                     TenantId = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                 }, | ||||||
|  |                 constraints: table => | ||||||
|  |                 { | ||||||
|  |                     table.PrimaryKey("PK_TaskMembers", x => x.Id); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_TaskMembers_Employees_EmployeeId", | ||||||
|  |                         column: x => x.EmployeeId, | ||||||
|  |                         principalTable: "Employees", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_TaskMembers_TaskAllocations_TaskAllocationId", | ||||||
|  |                         column: x => x.TaskAllocationId, | ||||||
|  |                         principalTable: "TaskAllocations", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_TaskMembers_Tenants_TenantId", | ||||||
|  |                         column: x => x.TenantId, | ||||||
|  |                         principalTable: "Tenants", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                 }) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskAllocations_AssignedBy", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "AssignedBy"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskComments_CommentedBy", | ||||||
|  |                 table: "TaskComments", | ||||||
|  |                 column: "CommentedBy"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskComments_TaskAllocationId", | ||||||
|  |                 table: "TaskComments", | ||||||
|  |                 column: "TaskAllocationId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskComments_TenantId", | ||||||
|  |                 table: "TaskComments", | ||||||
|  |                 column: "TenantId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskMembers_EmployeeId", | ||||||
|  |                 table: "TaskMembers", | ||||||
|  |                 column: "EmployeeId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskMembers_TaskAllocationId", | ||||||
|  |                 table: "TaskMembers", | ||||||
|  |                 column: "TaskAllocationId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskMembers_TenantId", | ||||||
|  |                 table: "TaskMembers", | ||||||
|  |                 column: "TenantId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Employees_AssignedBy", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "AssignedBy", | ||||||
|  |                 principalTable: "Employees", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "WorkItemMappingId", | ||||||
|  |                 principalTable: "WorkItemMapping", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkItems_WorkItemId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "WorkItemId", | ||||||
|  |                 principalTable: "WorkItems", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Employees_AssignedBy", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkItems_WorkItemId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropTable( | ||||||
|  |                 name: "TaskComments"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropTable( | ||||||
|  |                 name: "TaskMembers"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropIndex( | ||||||
|  |                 name: "IX_TaskAllocations_AssignedBy", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "CompletedTask", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "PlannedTask", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "WorkAreaId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "WorkItemId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "ProjectId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "ReportedDate", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "ReAllocationDate"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "AssignmentDate", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "AllocationDate"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameColumn( | ||||||
|  |                 name: "AssignedBy", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "EmployeeRole"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameIndex( | ||||||
|  |                 name: "IX_TaskAllocations_WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "IX_TaskAllocations_WorkAreaId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.RenameIndex( | ||||||
|  |                 name: "IX_TaskAllocations_WorkItemId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 newName: "IX_TaskAllocations_ProjectId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<int>( | ||||||
|  |                 name: "PlannedWork", | ||||||
|  |                 table: "WorkItems", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(double), | ||||||
|  |                 oldType: "double"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<int>( | ||||||
|  |                 name: "CompletedWork", | ||||||
|  |                 table: "WorkItems", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(double), | ||||||
|  |                 oldType: "double"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<int>( | ||||||
|  |                 name: "Id", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(long), | ||||||
|  |                 oldType: "bigint") | ||||||
|  |                 .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn) | ||||||
|  |                 .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<int>( | ||||||
|  |                 name: "BuildingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: 0); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<int>( | ||||||
|  |                 name: "EmployeeId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: 0); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<int>( | ||||||
|  |                 name: "TaskAllocationId", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 1, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 2, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 3, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 4, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 5, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 6, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 7, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 8, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 9, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 10, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 11, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 12, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 13, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 14, | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 value: null); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskAllocations_BuildingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "BuildingId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskAllocations_EmployeeId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "EmployeeId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_ActivityMasters_TaskAllocationId", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 column: "TaskAllocationId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_ActivityMasters_TaskAllocations_TaskAllocationId", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 column: "TaskAllocationId", | ||||||
|  |                 principalTable: "TaskAllocations", | ||||||
|  |                 principalColumn: "Id"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Buildings_BuildingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "BuildingId", | ||||||
|  |                 principalTable: "Buildings", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Employees_EmployeeId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "EmployeeId", | ||||||
|  |                 principalTable: "Employees", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_Projects_ProjectId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "ProjectId", | ||||||
|  |                 principalTable: "Projects", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkAreas_WorkAreaId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "WorkAreaId", | ||||||
|  |                 principalTable: "WorkAreas", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,37 @@ | |||||||
|  | using System; | ||||||
|  | using Microsoft.EntityFrameworkCore.Migrations; | ||||||
|  | 
 | ||||||
|  | #nullable disable | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.DataAccess.Migrations | ||||||
|  | { | ||||||
|  |     /// <inheritdoc /> | ||||||
|  |     public partial class Make_ReportDate_Nullable : Migration | ||||||
|  |     { | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.AlterColumn<DateTime>( | ||||||
|  |                 name: "ReportedDate", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "datetime(6)", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(DateTime), | ||||||
|  |                 oldType: "datetime(6)"); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.AlterColumn<DateTime>( | ||||||
|  |                 name: "ReportedDate", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "datetime(6)", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), | ||||||
|  |                 oldClrType: typeof(DateTime), | ||||||
|  |                 oldType: "datetime(6)", | ||||||
|  |                 oldNullable: true); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										2059
									
								
								Marco.Pms.DataAccess/Migrations/20250403133824_Removed_WorkItemMapping.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										2059
									
								
								Marco.Pms.DataAccess/Migrations/20250403133824_Removed_WorkItemMapping.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,131 @@ | |||||||
|  | using Microsoft.EntityFrameworkCore.Metadata; | ||||||
|  | using Microsoft.EntityFrameworkCore.Migrations; | ||||||
|  | 
 | ||||||
|  | #nullable disable | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.DataAccess.Migrations | ||||||
|  | { | ||||||
|  |     /// <inheritdoc /> | ||||||
|  |     public partial class Removed_WorkItemMapping : Migration | ||||||
|  |     { | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropTable( | ||||||
|  |                 name: "WorkItemMapping"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropIndex( | ||||||
|  |                 name: "IX_TaskAllocations_WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 keyColumn: "Description", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Description", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<int>( | ||||||
|  |                 name: "WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 type: "int", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: 0); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateTable( | ||||||
|  |                 name: "WorkItemMapping", | ||||||
|  |                 columns: table => new | ||||||
|  |                 { | ||||||
|  |                     Id = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                         .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||||||
|  |                     TenantId = table.Column<int>(type: "int", nullable: false), | ||||||
|  |                     WorkAreaId = table.Column<int>(type: "int", nullable: false), | ||||||
|  |                     WorkItemId = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                 }, | ||||||
|  |                 constraints: table => | ||||||
|  |                 { | ||||||
|  |                     table.PrimaryKey("PK_WorkItemMapping", x => x.Id); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_WorkItemMapping_Tenants_TenantId", | ||||||
|  |                         column: x => x.TenantId, | ||||||
|  |                         principalTable: "Tenants", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_WorkItemMapping_WorkAreas_WorkAreaId", | ||||||
|  |                         column: x => x.WorkAreaId, | ||||||
|  |                         principalTable: "WorkAreas", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                     table.ForeignKey( | ||||||
|  |                         name: "FK_WorkItemMapping_WorkItems_WorkItemId", | ||||||
|  |                         column: x => x.WorkItemId, | ||||||
|  |                         principalTable: "WorkItems", | ||||||
|  |                         principalColumn: "Id", | ||||||
|  |                         onDelete: ReferentialAction.Cascade); | ||||||
|  |                 }) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_TaskAllocations_WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "WorkItemMappingId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_WorkItemMapping_TenantId", | ||||||
|  |                 table: "WorkItemMapping", | ||||||
|  |                 column: "TenantId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_WorkItemMapping_WorkAreaId", | ||||||
|  |                 table: "WorkItemMapping", | ||||||
|  |                 column: "WorkAreaId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateIndex( | ||||||
|  |                 name: "IX_WorkItemMapping_WorkItemId", | ||||||
|  |                 table: "WorkItemMapping", | ||||||
|  |                 column: "WorkItemId"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddForeignKey( | ||||||
|  |                 name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId", | ||||||
|  |                 table: "TaskAllocations", | ||||||
|  |                 column: "WorkItemMappingId", | ||||||
|  |                 principalTable: "WorkItemMapping", | ||||||
|  |                 principalColumn: "Id", | ||||||
|  |                 onDelete: ReferentialAction.Cascade); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										2073
									
								
								Marco.Pms.DataAccess/Migrations/20250414053152_Added_Check_List_Table.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										2073
									
								
								Marco.Pms.DataAccess/Migrations/20250414053152_Added_Check_List_Table.Designer.cs
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,984 @@ | |||||||
|  | using Microsoft.EntityFrameworkCore.Metadata; | ||||||
|  | using Microsoft.EntityFrameworkCore.Migrations; | ||||||
|  | 
 | ||||||
|  | #nullable disable | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.DataAccess.Migrations | ||||||
|  | { | ||||||
|  |     /// <inheritdoc /> | ||||||
|  |     public partial class Added_Check_List_Table : Migration | ||||||
|  |     { | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "PeramnentAddress", | ||||||
|  |                 table: "Employees"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "WorkShifts", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "DomainName", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ContactNumber", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ContactName", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Status", | ||||||
|  |                 table: "StatusMasters", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "UserId", | ||||||
|  |                 table: "RefreshTokens", | ||||||
|  |                 type: "varchar(255)", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "varchar(255)") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Token", | ||||||
|  |                 table: "RefreshTokens", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ProjectAddress", | ||||||
|  |                 table: "Projects", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ContactPerson", | ||||||
|  |                 table: "Projects", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "Modules", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "JobRoles", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "Industries", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "Features", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "Features", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "FeaturePermissions", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "FeaturePermissions", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "PhoneNumber", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "LastName", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Gender", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "FirstName", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "EmergencyPhoneNumber", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "EmergencyContactPerson", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "CurrentAddress", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<string>( | ||||||
|  |                 name: "PermanentAddress", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Role", | ||||||
|  |                 table: "ApplicationRoles", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "ApplicationRoles", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "UnitOfMeasurement", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ActivityName", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: true, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext") | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<bool>( | ||||||
|  |                 name: "IsActive", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 type: "tinyint(1)", | ||||||
|  |                 nullable: false, | ||||||
|  |                 defaultValue: false); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.CreateTable( | ||||||
|  |                 name: "ActivityCheckLists", | ||||||
|  |                 columns: table => new | ||||||
|  |                 { | ||||||
|  |                     Id = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                         .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||||||
|  |                     ActivityId = table.Column<int>(type: "int", nullable: false), | ||||||
|  |                     Description = table.Column<string>(type: "longtext", nullable: true) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4"), | ||||||
|  |                     IsChecked = table.Column<bool>(type: "tinyint(1)", nullable: false), | ||||||
|  |                     IsMandatory = table.Column<bool>(type: "tinyint(1)", nullable: false), | ||||||
|  |                     TenantId = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                 }, | ||||||
|  |                 constraints: table => | ||||||
|  |                 { | ||||||
|  |                     table.PrimaryKey("PK_ActivityCheckLists", x => x.Id); | ||||||
|  |                 }) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 1, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 2, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 3, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 4, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 5, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 6, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 7, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 8, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 9, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 10, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 11, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 12, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 13, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "Id", | ||||||
|  |                 keyValue: 14, | ||||||
|  |                 column: "IsActive", | ||||||
|  |                 value: true); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropTable( | ||||||
|  |                 name: "ActivityCheckLists"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "PermanentAddress", | ||||||
|  |                 table: "Employees"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.DropColumn( | ||||||
|  |                 name: "IsActive", | ||||||
|  |                 table: "ActivityMasters"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "WorkShifts", | ||||||
|  |                 keyColumn: "Name", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Name", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "WorkShifts", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 keyColumn: "Name", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Name", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 keyColumn: "DomainName", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "DomainName", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "DomainName", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 keyColumn: "Description", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Description", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 keyColumn: "ContactNumber", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "ContactNumber", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ContactNumber", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 keyColumn: "ContactName", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "ContactName", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ContactName", | ||||||
|  |                 table: "Tenants", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "StatusMasters", | ||||||
|  |                 keyColumn: "Status", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Status", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Status", | ||||||
|  |                 table: "StatusMasters", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "RefreshTokens", | ||||||
|  |                 keyColumn: "UserId", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "UserId", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "UserId", | ||||||
|  |                 table: "RefreshTokens", | ||||||
|  |                 type: "varchar(255)", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "varchar(255)", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "RefreshTokens", | ||||||
|  |                 keyColumn: "Token", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Token", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Token", | ||||||
|  |                 table: "RefreshTokens", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Projects", | ||||||
|  |                 keyColumn: "ProjectAddress", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "ProjectAddress", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ProjectAddress", | ||||||
|  |                 table: "Projects", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Projects", | ||||||
|  |                 keyColumn: "ContactPerson", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "ContactPerson", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ContactPerson", | ||||||
|  |                 table: "Projects", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Modules", | ||||||
|  |                 keyColumn: "Description", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Description", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "Modules", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "JobRoles", | ||||||
|  |                 keyColumn: "Name", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Name", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "JobRoles", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Industries", | ||||||
|  |                 keyColumn: "Name", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Name", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "Industries", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Features", | ||||||
|  |                 keyColumn: "Name", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Name", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "Features", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Features", | ||||||
|  |                 keyColumn: "Description", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Description", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "Features", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "FeaturePermissions", | ||||||
|  |                 keyColumn: "Name", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Name", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Name", | ||||||
|  |                 table: "FeaturePermissions", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "FeaturePermissions", | ||||||
|  |                 keyColumn: "Description", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Description", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "FeaturePermissions", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Employees", | ||||||
|  |                 keyColumn: "PhoneNumber", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "PhoneNumber", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "PhoneNumber", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Employees", | ||||||
|  |                 keyColumn: "LastName", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "LastName", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "LastName", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Employees", | ||||||
|  |                 keyColumn: "Gender", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Gender", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Gender", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Employees", | ||||||
|  |                 keyColumn: "FirstName", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "FirstName", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "FirstName", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Employees", | ||||||
|  |                 keyColumn: "EmergencyPhoneNumber", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "EmergencyPhoneNumber", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "EmergencyPhoneNumber", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Employees", | ||||||
|  |                 keyColumn: "EmergencyContactPerson", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "EmergencyContactPerson", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "EmergencyContactPerson", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "Employees", | ||||||
|  |                 keyColumn: "CurrentAddress", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "CurrentAddress", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "CurrentAddress", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AddColumn<string>( | ||||||
|  |                 name: "PeramnentAddress", | ||||||
|  |                 table: "Employees", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ApplicationRoles", | ||||||
|  |                 keyColumn: "Role", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Role", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Role", | ||||||
|  |                 table: "ApplicationRoles", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ApplicationRoles", | ||||||
|  |                 keyColumn: "Description", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "Description", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "Description", | ||||||
|  |                 table: "ApplicationRoles", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "UnitOfMeasurement", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "UnitOfMeasurement", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "UnitOfMeasurement", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.UpdateData( | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 keyColumn: "ActivityName", | ||||||
|  |                 keyValue: null, | ||||||
|  |                 column: "ActivityName", | ||||||
|  |                 value: ""); | ||||||
|  | 
 | ||||||
|  |             migrationBuilder.AlterColumn<string>( | ||||||
|  |                 name: "ActivityName", | ||||||
|  |                 table: "ActivityMasters", | ||||||
|  |                 type: "longtext", | ||||||
|  |                 nullable: false, | ||||||
|  |                 oldClrType: typeof(string), | ||||||
|  |                 oldType: "longtext", | ||||||
|  |                 oldNullable: true) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 .OldAnnotation("MySql:CharSet", "utf8mb4"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,37 @@ | |||||||
|  | using Microsoft.EntityFrameworkCore.Metadata; | ||||||
|  | using Microsoft.EntityFrameworkCore.Migrations; | ||||||
|  | 
 | ||||||
|  | #nullable disable | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.DataAccess.Migrations | ||||||
|  | { | ||||||
|  |     /// <inheritdoc /> | ||||||
|  |     public partial class Added_CheckListMappings_Table : Migration | ||||||
|  |     { | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.CreateTable( | ||||||
|  |                 name: "CheckListMappings", | ||||||
|  |                 columns: table => new | ||||||
|  |                 { | ||||||
|  |                     Id = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                         .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||||||
|  |                     TaskAllocationId = table.Column<long>(type: "bigint", nullable: false), | ||||||
|  |                     CheckListId = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                 }, | ||||||
|  |                 constraints: table => | ||||||
|  |                 { | ||||||
|  |                     table.PrimaryKey("PK_CheckListMappings", x => x.Id); | ||||||
|  |                 }) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropTable( | ||||||
|  |                 name: "CheckListMappings"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,48 @@ | |||||||
|  | using Microsoft.EntityFrameworkCore.Metadata; | ||||||
|  | using Microsoft.EntityFrameworkCore.Migrations; | ||||||
|  | 
 | ||||||
|  | #nullable disable | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.DataAccess.Migrations | ||||||
|  | { | ||||||
|  |     /// <inheritdoc /> | ||||||
|  |     public partial class Added_Inquiries_table : Migration | ||||||
|  |     { | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.CreateTable( | ||||||
|  |                 name: "Inquiries", | ||||||
|  |                 columns: table => new | ||||||
|  |                 { | ||||||
|  |                     Id = table.Column<int>(type: "int", nullable: false) | ||||||
|  |                         .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), | ||||||
|  |                     OrganizatioinName = table.Column<string>(type: "longtext", nullable: true) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4"), | ||||||
|  |                     Email = table.Column<string>(type: "longtext", nullable: true) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4"), | ||||||
|  |                     About = table.Column<string>(type: "longtext", nullable: true) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4"), | ||||||
|  |                     OragnizationSize = table.Column<string>(type: "longtext", nullable: true) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4"), | ||||||
|  |                     IndustryId = table.Column<int>(type: "int", nullable: false), | ||||||
|  |                     ContactPerson = table.Column<string>(type: "longtext", nullable: true) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4"), | ||||||
|  |                     ContactNumber = table.Column<string>(type: "longtext", nullable: true) | ||||||
|  |                         .Annotation("MySql:CharSet", "utf8mb4") | ||||||
|  |                 }, | ||||||
|  |                 constraints: table => | ||||||
|  |                 { | ||||||
|  |                     table.PrimaryKey("PK_Inquiries", x => x.Id); | ||||||
|  |                 }) | ||||||
|  |                 .Annotation("MySql:CharSet", "utf8mb4"); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         /// <inheritdoc /> | ||||||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | ||||||
|  |         { | ||||||
|  |             migrationBuilder.DropTable( | ||||||
|  |                 name: "Inquiries"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,109 +0,0 @@ | |||||||
| using System; |  | ||||||
| using Microsoft.EntityFrameworkCore.Migrations; |  | ||||||
| 
 |  | ||||||
| #nullable disable |  | ||||||
| 
 |  | ||||||
| #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.DataAccess.Migrations |  | ||||||
| { |  | ||||||
|     /// <inheritdoc /> |  | ||||||
|     public partial class Changed_DataType_ApproverdBY : Migration |  | ||||||
|     { |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Up(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("1714f64d-7591-4419-bee5-118d21bb2855")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("4117b7de-ef6c-461f-a2c2-64eaac5f9a11")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("53eedf44-4076-445f-be93-fedef17117e7")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("715b9ddb-d9e2-4afa-8987-d9918905cea4")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("a3d191a7-a5aa-4dd8-a525-12c99263bbd6")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("b3f51a93-dde6-45f9-8b22-f1bf017a640b")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("c138a7de-713a-4bd4-8292-b0b265be77a3")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "Projects", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("3ef56a12-f5e5-4193-87d6-9e110ed10b86")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DeleteData( |  | ||||||
|                 table: "Projects", |  | ||||||
|                 keyColumn: "Id", |  | ||||||
|                 keyValue: new Guid("54d013e3-0a2b-48be-85c7-5ef03492a18c")); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.AlterColumn<Guid>( |  | ||||||
|                 name: "ApprovedBy", |  | ||||||
|                 table: "Attendes", |  | ||||||
|                 type: "char(36)", |  | ||||||
|                 nullable: true, |  | ||||||
|                 collation: "ascii_general_ci", |  | ||||||
|                 oldClrType: typeof(int), |  | ||||||
|                 oldType: "int", |  | ||||||
|                 oldNullable: true); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Down(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.AlterColumn<int>( |  | ||||||
|                 name: "ApprovedBy", |  | ||||||
|                 table: "Attendes", |  | ||||||
|                 type: "int", |  | ||||||
|                 nullable: true, |  | ||||||
|                 oldClrType: typeof(Guid), |  | ||||||
|                 oldType: "char(36)", |  | ||||||
|                 oldNullable: true) |  | ||||||
|                 .OldAnnotation("Relational:Collation", "ascii_general_ci"); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.InsertData( |  | ||||||
|                 table: "ActivityMasters", |  | ||||||
|                 columns: new[] { "Id", "ActivityName", "IsActive", "TenantId", "UnitOfMeasurement" }, |  | ||||||
|                 values: new object[,] |  | ||||||
|                 { |  | ||||||
|                     { new Guid("1714f64d-7591-4419-bee5-118d21bb2855"), "Fabrication", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Meter" }, |  | ||||||
|                     { new Guid("4117b7de-ef6c-461f-a2c2-64eaac5f9a11"), "Core Cutting", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" }, |  | ||||||
|                     { new Guid("53eedf44-4076-445f-be93-fedef17117e7"), "MS Support Fabrication", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" }, |  | ||||||
|                     { new Guid("715b9ddb-d9e2-4afa-8987-d9918905cea4"), "MS Support Hanging", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" }, |  | ||||||
|                     { new Guid("a3d191a7-a5aa-4dd8-a525-12c99263bbd6"), "Hydrant Volve", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" }, |  | ||||||
|                     { new Guid("b3f51a93-dde6-45f9-8b22-f1bf017a640b"), "Welding", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Meter" }, |  | ||||||
|                     { new Guid("c138a7de-713a-4bd4-8292-b0b265be77a3"), "Sprinkler Installation", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" } |  | ||||||
|                 }); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.InsertData( |  | ||||||
|                 table: "Projects", |  | ||||||
|                 columns: new[] { "Id", "ContactPerson", "EndDate", "Name", "ProjectAddress", "ProjectStatusId", "StartDate", "TenantId" }, |  | ||||||
|                 values: new object[,] |  | ||||||
|                 { |  | ||||||
|                     { new Guid("3ef56a12-f5e5-4193-87d6-9e110ed10b86"), "Project 2 Contact Person", new DateTime(2026, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), "Project 2", "Project 2 Address", new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"), new DateTime(2025, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }, |  | ||||||
|                     { new Guid("54d013e3-0a2b-48be-85c7-5ef03492a18c"), "Project 3 Contact Person", new DateTime(2026, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), "Project 3", "Project 3 Address", new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"), new DateTime(2025, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") } |  | ||||||
|                 }); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,40 +0,0 @@ | |||||||
| using Microsoft.EntityFrameworkCore.Migrations; |  | ||||||
| 
 |  | ||||||
| #nullable disable |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.DataAccess.Migrations |  | ||||||
| { |  | ||||||
|     /// <inheritdoc /> |  | ||||||
|     public partial class Added_IsSystem_Flag : Migration |  | ||||||
|     { |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Up(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.AddColumn<bool>( |  | ||||||
|                 name: "IsSystem", |  | ||||||
|                 table: "Employees", |  | ||||||
|                 type: "tinyint(1)", |  | ||||||
|                 nullable: false, |  | ||||||
|                 defaultValue: false); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.AddColumn<bool>( |  | ||||||
|                 name: "IsSystem", |  | ||||||
|                 table: "ApplicationRoles", |  | ||||||
|                 type: "tinyint(1)", |  | ||||||
|                 nullable: false, |  | ||||||
|                 defaultValue: false); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Down(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.DropColumn( |  | ||||||
|                 name: "IsSystem", |  | ||||||
|                 table: "Employees"); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DropColumn( |  | ||||||
|                 name: "IsSystem", |  | ||||||
|                 table: "ApplicationRoles"); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,63 +0,0 @@ | |||||||
| using System; |  | ||||||
| using Microsoft.EntityFrameworkCore.Migrations; |  | ||||||
| 
 |  | ||||||
| #nullable disable |  | ||||||
| 
 |  | ||||||
| #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.DataAccess.Migrations |  | ||||||
| { |  | ||||||
|     /// <inheritdoc /> |  | ||||||
|     public partial class Added_WorkCategory_Master_Table : Migration |  | ||||||
|     { |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Up(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.CreateTable( |  | ||||||
|                 name: "WorkCategoryMasters", |  | ||||||
|                 columns: table => new |  | ||||||
|                 { |  | ||||||
|                     Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |  | ||||||
|                     Name = table.Column<string>(type: "longtext", nullable: false) |  | ||||||
|                         .Annotation("MySql:CharSet", "utf8mb4"), |  | ||||||
|                     Description = table.Column<string>(type: "longtext", nullable: false) |  | ||||||
|                         .Annotation("MySql:CharSet", "utf8mb4"), |  | ||||||
|                     IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false), |  | ||||||
|                     TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci") |  | ||||||
|                 }, |  | ||||||
|                 constraints: table => |  | ||||||
|                 { |  | ||||||
|                     table.PrimaryKey("PK_WorkCategoryMasters", x => x.Id); |  | ||||||
|                     table.ForeignKey( |  | ||||||
|                         name: "FK_WorkCategoryMasters_Tenants_TenantId", |  | ||||||
|                         column: x => x.TenantId, |  | ||||||
|                         principalTable: "Tenants", |  | ||||||
|                         principalColumn: "Id", |  | ||||||
|                         onDelete: ReferentialAction.Cascade); |  | ||||||
|                 }) |  | ||||||
|                 .Annotation("MySql:CharSet", "utf8mb4"); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.InsertData( |  | ||||||
|                 table: "WorkCategoryMasters", |  | ||||||
|                 columns: new[] { "Id", "Description", "IsSystem", "Name", "TenantId" }, |  | ||||||
|                 values: new object[,] |  | ||||||
|                 { |  | ||||||
|                     { new Guid("11a79929-1d07-42dc-9e98-82d0d2f4a240"), "Any defect, deviation, or non-conformance in a task that fails to meet established standards or customer expectations.", true, "Quality Issue", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }, |  | ||||||
|                     { new Guid("86bb2cc8-f6b5-4fdd-bbee-c389c713a44b"), "Created new task in a professional or creative context", true, "Fresh Work", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }, |  | ||||||
|                     { new Guid("9ebfa19c-53b9-481b-b863-c25d2f843201"), "Revising, modifying, or correcting a task to improve its quality or fix issues", true, "Rework", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") } |  | ||||||
|                 }); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.CreateIndex( |  | ||||||
|                 name: "IX_WorkCategoryMasters_TenantId", |  | ||||||
|                 table: "WorkCategoryMasters", |  | ||||||
|                 column: "TenantId"); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Down(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.DropTable( |  | ||||||
|                 name: "WorkCategoryMasters"); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,50 +0,0 @@ | |||||||
| using System; |  | ||||||
| using Microsoft.EntityFrameworkCore.Migrations; |  | ||||||
| 
 |  | ||||||
| #nullable disable |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.DataAccess.Migrations |  | ||||||
| { |  | ||||||
|     /// <inheritdoc /> |  | ||||||
|     public partial class Added_Foreign_key_For_WorkCategery_To_WorkItem : Migration |  | ||||||
|     { |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Up(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.AddColumn<Guid>( |  | ||||||
|                 name: "WorkCategoryId", |  | ||||||
|                 table: "WorkItems", |  | ||||||
|                 type: "char(36)", |  | ||||||
|                 nullable: true, |  | ||||||
|                 collation: "ascii_general_ci"); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.CreateIndex( |  | ||||||
|                 name: "IX_WorkItems_WorkCategoryId", |  | ||||||
|                 table: "WorkItems", |  | ||||||
|                 column: "WorkCategoryId"); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.AddForeignKey( |  | ||||||
|                 name: "FK_WorkItems_WorkCategoryMasters_WorkCategoryId", |  | ||||||
|                 table: "WorkItems", |  | ||||||
|                 column: "WorkCategoryId", |  | ||||||
|                 principalTable: "WorkCategoryMasters", |  | ||||||
|                 principalColumn: "Id"); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         /// <inheritdoc /> |  | ||||||
|         protected override void Down(MigrationBuilder migrationBuilder) |  | ||||||
|         { |  | ||||||
|             migrationBuilder.DropForeignKey( |  | ||||||
|                 name: "FK_WorkItems_WorkCategoryMasters_WorkCategoryId", |  | ||||||
|                 table: "WorkItems"); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DropIndex( |  | ||||||
|                 name: "IX_WorkItems_WorkCategoryId", |  | ||||||
|                 table: "WorkItems"); |  | ||||||
| 
 |  | ||||||
|             migrationBuilder.DropColumn( |  | ||||||
|                 name: "WorkCategoryId", |  | ||||||
|                 table: "WorkItems"); |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,15 +1,15 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Marco.Pms.Model.Employees; | using Marco.Pms.Model.Employees; | ||||||
|  | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.Projects; | using Marco.Pms.Model.Projects; | ||||||
| using Marco.Pms.Model.Utilities; |  | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Activities | namespace Marco.Pms.Model.Activities | ||||||
| { | { | ||||||
|     public class TaskAllocation : TenantRelation |     public class TaskAllocation | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public long Id { get; set; } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         public DateTime AssignmentDate { get; set; } |         public DateTime AssignmentDate { get; set; } | ||||||
| @ -24,15 +24,20 @@ namespace Marco.Pms.Model.Activities | |||||||
|         //[ValidateNever] |         //[ValidateNever] | ||||||
|         //public WorkItemMapping? WorkItemMapping { get; set; } |         //public WorkItemMapping? WorkItemMapping { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid AssignedBy { get; set; }   //Employee Id |         public int AssignedBy { get; set; }   //Employee Id | ||||||
|         [ForeignKey("AssignedBy")] |         [ForeignKey("AssignedBy")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Employee? Employee { get; set; } |         public Employee? Employee { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid WorkItemId { get; set; } |         public int WorkItemId { get; set; } | ||||||
|         [ForeignKey("WorkItemId")] |         [ForeignKey("WorkItemId")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public WorkItem? WorkItem { get; set; } |         public WorkItem? WorkItem { get; set; } | ||||||
| 
 | 
 | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  | 
 | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; }       | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -5,18 +5,18 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | |||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Activities | namespace Marco.Pms.Model.Activities | ||||||
| { | { | ||||||
|     public class TaskComment : TenantRelation |     public class TaskComment : TenantTest | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public long Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid TaskAllocationId { get; set; } |         public long TaskAllocationId { get; set; } | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         [ForeignKey(nameof(TaskAllocationId))] |         [ForeignKey(nameof(TaskAllocationId))] | ||||||
|         public TaskAllocation? TaskAllocation { get; set; } |         public TaskAllocation? TaskAllocation { get; set; } | ||||||
| 
 | 
 | ||||||
|         public DateTime CommentDate { get; set; } |         public DateTime CommentDate { get; set; } | ||||||
|         public string Comment { get; set; } = string.Empty; |         public string Comment { get; set; } = string.Empty; | ||||||
|         public Guid CommentedBy { get; set; } |         public int CommentedBy { get; set; } | ||||||
|         [ForeignKey("CommentedBy")] |         [ForeignKey("CommentedBy")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Employee? Employee { get; set; } |         public Employee? Employee { get; set; } | ||||||
|  | |||||||
| @ -1,13 +1,13 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Activities | namespace Marco.Pms.Model.Activities | ||||||
| { | { | ||||||
|     public class TaskImages |     public class TaskImages | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public long Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid TaskAllocationId { get; set; } |         public long TaskAllocationId { get; set; } | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         [ForeignKey(nameof(TaskAllocationId))] |         [ForeignKey(nameof(TaskAllocationId))] | ||||||
|         public TaskAllocation? TaskAllocation { get; set; } |         public TaskAllocation? TaskAllocation { get; set; } | ||||||
|  | |||||||
| @ -1,22 +1,27 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Marco.Pms.Model.Employees; | using Marco.Pms.Model.Employees; | ||||||
| using Marco.Pms.Model.Utilities; | using Marco.Pms.Model.Entitlements; | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Activities | namespace Marco.Pms.Model.Activities | ||||||
| { | { | ||||||
|     public class TaskMembers : TenantRelation |     public class TaskMembers | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public long Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid TaskAllocationId { get; set; } |         public long TaskAllocationId { get; set; } | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         [ForeignKey(nameof(TaskAllocationId))] |         [ForeignKey(nameof(TaskAllocationId))] | ||||||
|         public TaskAllocation? TaskAllocation { get; set; } |         public TaskAllocation? TaskAllocation { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid EmployeeId { get; set; } |         public int EmployeeId { get; set; } | ||||||
|         [ForeignKey("EmployeeId")] |         [ForeignKey("EmployeeId")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Employee? Employee { get; set; } |         public Employee? Employee { get; set; } | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  | 
 | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,20 +1,21 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel; | ||||||
|  | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Marco.Pms.Model.Dtos.Attendance; | using Marco.Pms.Model.Dtos.Attendance; | ||||||
| using Marco.Pms.Model.Employees; | using Marco.Pms.Model.Employees; | ||||||
| using Marco.Pms.Model.Utilities; | using Marco.Pms.Model.Entitlements; | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.AttendanceModule | namespace Marco.Pms.Model.AttendanceModule | ||||||
| { | { | ||||||
|     public class Attendance : TenantRelation |     public class Attendance | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string Comment { get; set; } = string.Empty; |         public string Comment { get; set; } = string.Empty; | ||||||
|         public Guid EmployeeID { get; set; } |         public int EmployeeID { get; set; } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         public DateTime Date { get; set; } |         public DateTime Date { get; set; } | ||||||
|         public Guid ProjectID { get; set; } |         public int ProjectID { get; set; } | ||||||
| 
 | 
 | ||||||
|         public DateTime AttendanceDate { get; set; } |         public DateTime AttendanceDate { get; set; } | ||||||
|         public DateTime? InTime { get; set; } |         public DateTime? InTime { get; set; } | ||||||
| @ -22,9 +23,17 @@ namespace Marco.Pms.Model.AttendanceModule | |||||||
|         public bool IsApproved { get; set; } |         public bool IsApproved { get; set; } | ||||||
|         public ATTENDANCE_MARK_TYPE Activity { get; set; } |         public ATTENDANCE_MARK_TYPE Activity { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid? ApprovedBy { get; set; } |         public int? ApprovedBy { get; set; } | ||||||
|         [ForeignKey("EmployeeID")] |         [ForeignKey("EmployeeID")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Employee? Approver { get; set; } |         public Employee? Approver { get; set; } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,23 +1,23 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel; | ||||||
| using Marco.Pms.Model.DocumentManager; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Marco.Pms.Model.Dtos.Attendance; | using Marco.Pms.Model.Dtos.Attendance; | ||||||
| using Marco.Pms.Model.Employees; | using Marco.Pms.Model.Employees; | ||||||
| using Marco.Pms.Model.Utilities; | using Marco.Pms.Model.Entitlements; | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.AttendanceModule | namespace Marco.Pms.Model.AttendanceModule | ||||||
| { | { | ||||||
|     public class AttendanceLog : TenantRelation |     public class AttendanceLog | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string Comment { get; set; } = string.Empty; |         public string Comment { get; set; } = string.Empty; | ||||||
|         public Guid AttendanceId { get; set; } |         public int AttendanceId { get; set; } | ||||||
|         [ForeignKey("AttendanceId")] |         [ForeignKey("AttendanceId")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Attendance? Attendance { get; set; } |         public Attendance? Attendance { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid EmployeeID { get; set; } |         public int EmployeeID { get; set; } | ||||||
|         [ForeignKey("EmployeeID")] |         [ForeignKey("EmployeeID")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Employee? Employee { get; set; } |         public Employee? Employee { get; set; } | ||||||
| @ -36,15 +36,16 @@ namespace Marco.Pms.Model.AttendanceModule | |||||||
| 
 | 
 | ||||||
|         public DateTime UpdatedOn { get; set; } |         public DateTime UpdatedOn { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid? UpdatedBy { get; set; } |         public int? UpdatedBy { get; set; } | ||||||
|         [ForeignKey("UpdatedBy")] |         [ForeignKey("UpdatedBy")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Employee? UpdatedByEmployee { get; set; } |         public Employee? UpdatedByEmployee { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid? DocumentId { get; set; } |  | ||||||
|         [ForeignKey("DocumentId")] |  | ||||||
|         [ValidateNever] |  | ||||||
|         public Document? Document { get; set; } |  | ||||||
| 
 | 
 | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ namespace Marco.Pms.Model.Authentication | |||||||
| { | { | ||||||
|     public class RefreshToken |     public class RefreshToken | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? Token { get; set; } |         public string? Token { get; set; } | ||||||
|         public string? UserId { get; set; } |         public string? UserId { get; set; } | ||||||
|         public DateTime ExpiryDate { get; set; } |         public DateTime ExpiryDate { get; set; } | ||||||
|  | |||||||
| @ -1,25 +0,0 @@ | |||||||
| using Marco.Pms.Model.Utilities; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.DocumentManager |  | ||||||
| { |  | ||||||
|     public class Document : TenantRelation |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public Guid? BatchId { get; set; } |  | ||||||
|         public string FileName { get; set; } = string.Empty; |  | ||||||
|         /// <summary> |  | ||||||
|         ///  Full S3 object key |  | ||||||
|         /// </summary> |  | ||||||
|         public string S3Key { get; set; } = string.Empty; |  | ||||||
|         /// <summary> |  | ||||||
|         ///  S3 key for thumbnail image |  | ||||||
|         /// </summary> |  | ||||||
|         public string? ThumbS3Key { get; set; } |  | ||||||
| 
 |  | ||||||
|         public string? Base64Data { get; set; } |  | ||||||
| 
 |  | ||||||
|         public long FileSize { get; set; } |  | ||||||
|         public string ContentType { get; set; } = string.Empty; |  | ||||||
|         public DateTime UploadedAt { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -5,8 +5,8 @@ | |||||||
|         public DateTime AssignmentDate { get; set; } |         public DateTime AssignmentDate { get; set; } | ||||||
|         public double PlannedTask { get; set; } |         public double PlannedTask { get; set; } | ||||||
|         public string? Description { get; set; } |         public string? Description { get; set; } | ||||||
|         public List<Guid>? TaskTeam { get; set; }   //Employee Ids |         public List<int>? TaskTeam { get; set; }   //Employee Ids | ||||||
|         public Guid WorkItemId { get; set; } |         public int WorkItemId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| { | { | ||||||
|     public class CreateCheckListDto |     public class CreateCheckListDto | ||||||
|     { |     { | ||||||
|         public Guid? Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? Description { get; set; } |         public string? Description { get; set; } | ||||||
|         public bool IsMandatory { get; set; } |         public bool IsMandatory { get; set; } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| { | { | ||||||
|     public class CreateCommentDto |     public class CreateCommentDto | ||||||
|     { |     { | ||||||
|         public Guid TaskAllocationId { get; set; } |         public long TaskAllocationId { get; set; } | ||||||
| 
 | 
 | ||||||
|         public DateTime CommentDate { get; set; } |         public DateTime CommentDate { get; set; } | ||||||
|         public string? Comment { get; set; } |         public string? Comment { get; set; } | ||||||
|  | |||||||
| @ -2,8 +2,8 @@ | |||||||
| { | { | ||||||
|     public class ReportCheckListDto |     public class ReportCheckListDto | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string Description { get; set; } = string.Empty; |         public string Description { get; set; }= string.Empty; | ||||||
|         public bool IsMandatory { get; set; } |         public bool IsMandatory { get; set; } | ||||||
|         public bool IsChecked { get; set; } |         public bool IsChecked { get; set; } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| { | { | ||||||
|     public class ReportTaskDto |     public class ReportTaskDto | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public long Id { get; set; } | ||||||
|         public double CompletedTask { get; set; } |         public double CompletedTask { get; set; } | ||||||
|         public DateTime ReportedDate { get; set; } |         public DateTime ReportedDate { get; set; } | ||||||
|         public string? Comment { get; set; } |         public string? Comment { get; set; } | ||||||
|  | |||||||
| @ -4,10 +4,10 @@ namespace Marco.Pms.Model.Dtos.Attendance | |||||||
| { | { | ||||||
|     public class RecordAttendanceDot |     public class RecordAttendanceDot | ||||||
|     { |     { | ||||||
|         public Guid? Id { get; set; } |         public int? Id { get; set; } | ||||||
|         public string? Comment { get; set; } |         public string? Comment { get; set; } | ||||||
|         public Guid EmployeeID { get; set; } |         public int EmployeeID { get; set; } | ||||||
|         public Guid ProjectID { get; set; } |         public int ProjectID { get; set; } | ||||||
| 
 | 
 | ||||||
|         public DateTime Date { get; set; } |         public DateTime Date { get; set; } | ||||||
| 
 | 
 | ||||||
| @ -18,7 +18,7 @@ namespace Marco.Pms.Model.Dtos.Attendance | |||||||
| 
 | 
 | ||||||
|         public ATTENDANCE_MARK_TYPE Action { get; set; } |         public ATTENDANCE_MARK_TYPE Action { get; set; } | ||||||
| 
 | 
 | ||||||
|         public FileUploadModel? Image { get; set; } |         public List<FileUploadModel>? Image { get; set; } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public enum ATTENDANCE_MARK_TYPE |     public enum ATTENDANCE_MARK_TYPE | ||||||
|  | |||||||
| @ -1,4 +1,5 @@ | |||||||
| using Microsoft.AspNetCore.Http; | using Marco.Pms.Model.Employees; | ||||||
|  | using Microsoft.AspNetCore.Http; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Dtos.Employees | namespace Marco.Pms.Model.Dtos.Employees | ||||||
| { | { | ||||||
| @ -31,7 +32,7 @@ namespace Marco.Pms.Model.Dtos.Employees | |||||||
| 
 | 
 | ||||||
|         public Guid RoleId { get; set; } |         public Guid RoleId { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid TenantId { get; set; } |         public int TenantId { get; set; } | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| { | { | ||||||
|     public class CreateUserDto |     public class CreateUserDto | ||||||
|     { |     { | ||||||
|         public Guid? Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? FirstName { get; set; } |         public string? FirstName { get; set; } | ||||||
|         public string? LastName { get; set; } |         public string? LastName { get; set; } | ||||||
|         public string? MiddleName { get; set; } |         public string? MiddleName { get; set; } | ||||||
| @ -26,13 +26,13 @@ | |||||||
|         //public IFormFile? Photo { get; set; } // To store the captured photo |         //public IFormFile? Photo { get; set; } // To store the captured photo | ||||||
|         //public List<IFormFile>? Documents { get; set; } |         //public List<IFormFile>? Documents { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid? JobRoleId { get; set; } |        public string? JobRoleId { get; set; } | ||||||
| 
 | 
 | ||||||
|        // public int TenantId { get; set; } |        // public int TenantId { get; set; } | ||||||
|     } |     } | ||||||
|     public class CreateQuickUserDto |     public class CreateQuickUserDto | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? FirstName { get; set; } |         public string? FirstName { get; set; } | ||||||
|         public string? LastName { get; set; }        |         public string? LastName { get; set; }        | ||||||
| 
 | 
 | ||||||
| @ -44,7 +44,7 @@ | |||||||
|         public string? EmergencyPhoneNumber { get; set; } |         public string? EmergencyPhoneNumber { get; set; } | ||||||
|         public string? EmergencyContactPerson { get; set; } |         public string? EmergencyContactPerson { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid? JobRoleId { get; set; } |         public string? JobRoleId { get; set; } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ | |||||||
|     { |     { | ||||||
| 
 | 
 | ||||||
|         public string Id { get; set; } = string.Empty; |         public string Id { get; set; } = string.Empty; | ||||||
|         public Guid EmployeeId { get; set; } |         public int EmployeeId { get; set; } | ||||||
|         public Guid RoleId { get; set; } |         public Guid RoleId { get; set; } | ||||||
|         public bool IsEnabled { get; set; } |         public bool IsEnabled { get; set; } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -1,12 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Forum |  | ||||||
| { |  | ||||||
|     public class AddCommentDto |  | ||||||
|     { |  | ||||||
|         public Guid TicketId { get; set; } = Guid.Empty; |  | ||||||
|         public Guid AuthorId { get; set; } |  | ||||||
|         public string MessageText { get; set; } = string.Empty; |  | ||||||
|         public DateTime SentAt { get; set; } |  | ||||||
|         public Guid? ParentMessageId { get; set; } // For threaded replies |  | ||||||
|         public ICollection<ForumAttachmentDto>? Attachments { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,17 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Forum |  | ||||||
| { |  | ||||||
|     public class CreateTicketDto |  | ||||||
|     { |  | ||||||
|         public string Subject { get; set; } = string.Empty; |  | ||||||
|         public string Description { get; set; } = string.Empty; |  | ||||||
|         public Guid StatusId { get; set; } |  | ||||||
|         public Guid TypeId { get; set; }         // QualityIssue, HelpDesk, Feedback |  | ||||||
|         public Guid CreatedById { get; set; } |  | ||||||
|         public DateTime CreatedAt { get; set; } |  | ||||||
|         public Guid? LinkedProjectId { get; set; } |  | ||||||
|         public Guid? LinkedActivityId { get; set; } // task or project ID |  | ||||||
|         public ICollection<ForumAttachmentDto>? Attachments { get; set; } |  | ||||||
|         public Guid PriorityId { get; set; } |  | ||||||
|         public ICollection<Guid>? TagIds { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,13 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Forum |  | ||||||
| { |  | ||||||
|     public class ForumAttachmentDto |  | ||||||
|     { |  | ||||||
|         public Guid? TicketId { get; set; } |  | ||||||
|         public Guid? CommentId { get; set; } |  | ||||||
|         public string FileName { get; set; } = string.Empty; |  | ||||||
|         public string? Base64Data { get; set; } |  | ||||||
|         public int FileSize { get; set; } |  | ||||||
|         public string ContentType { get; set; } = string.Empty; |  | ||||||
|         public DateTime SentAt { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,14 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Forum |  | ||||||
| { |  | ||||||
|     public class UpdateAttachmentDto |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public Guid TicketId { get; set; } = Guid.Empty; |  | ||||||
|         public Guid? CommentId { get; set; } |  | ||||||
|         public string FileName { get; set; } = string.Empty; |  | ||||||
|         public string? Base64Data { get; set; } |  | ||||||
|         public int FileSize { get; set; } |  | ||||||
|         public string ContentType { get; set; } = string.Empty; |  | ||||||
|         public DateTime SentAt { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,13 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Forum |  | ||||||
| { |  | ||||||
|     public class UpdateCommentDto |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public Guid TicketId { get; set; } |  | ||||||
|         public Guid AuthorId { get; set; } |  | ||||||
|         public string MessageText { get; set; } = string.Empty; |  | ||||||
|         public DateTime SentAt { get; set; } |  | ||||||
|         public Guid? ParentMessageId { get; set; } // For threaded replies |  | ||||||
|         public ICollection<UpdateAttachmentDto>? Attachments { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,18 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Forum |  | ||||||
| { |  | ||||||
|     public class UpdateTicketDto |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public string Subject { get; set; } = string.Empty; |  | ||||||
|         public string Description { get; set; } = string.Empty; |  | ||||||
|         public Guid StatusId { get; set; } |  | ||||||
|         public Guid TypeId { get; set; }         // QualityIssue, HelpDesk, Feedback |  | ||||||
|         public Guid CreatedById { get; set; } |  | ||||||
|         public DateTime CreatedAt { get; set; } |  | ||||||
|         public Guid? LinkedProjectId { get; set; } |  | ||||||
|         public Guid? LinkedActivityId { get; set; } // task or project ID |  | ||||||
|         public ICollection<UpdateAttachmentDto>? Attachments { get; set; } |  | ||||||
|         public Guid PriorityId { get; set; } |  | ||||||
|         public ICollection<Guid>? TagIds { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,11 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Master |  | ||||||
| { |  | ||||||
|     public class TicketPriorityMasterDto |  | ||||||
|     { |  | ||||||
|         public Guid? Id { get; set; } |  | ||||||
|         public string Name { get; set; } = string.Empty;  // e.g., Low, Medium, High, Critical |  | ||||||
|         public int Level { get; set; } // 1 = Low, 2 = Medium... |  | ||||||
|         public string? ColorCode { get; set; } |  | ||||||
|         public bool IsDefault { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,11 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Master |  | ||||||
| { |  | ||||||
|     public class TicketStatusMasterDto |  | ||||||
|     { |  | ||||||
|         public Guid? Id { get; set; } |  | ||||||
|         public string Name { get; set; } = string.Empty; // e.g., "Open", "In Progress" |  | ||||||
|         public string? Description { get; set; } |  | ||||||
|         public string? ColorCode { get; set; } // e.g., "#FF0000" |  | ||||||
|         public bool IsDefault { get; set; } // true for system defaults |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,10 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Master |  | ||||||
| { |  | ||||||
|     public class TicketTagMasterDto |  | ||||||
|     { |  | ||||||
|         public Guid? Id { get; set; } |  | ||||||
|         public string Name { get; set; } = string.Empty; // e.g., "Bug", "UI", "Urgent" |  | ||||||
|         public string? ColorCode { get; set; } |  | ||||||
|         public bool IsDefault { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,10 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Master |  | ||||||
| { |  | ||||||
|     public class TicketTypeMasterDto |  | ||||||
|     { |  | ||||||
|         public Guid? Id { get; set; } |  | ||||||
|         public string Name { get; set; } = string.Empty; // e.g., "Quality Issue" |  | ||||||
|         public string? Description { get; set; } |  | ||||||
|         public bool IsDefault { get; set; } // true for system defaults |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,9 +0,0 @@ | |||||||
| namespace Marco.Pms.Model.Dtos.Master |  | ||||||
| { |  | ||||||
|     public class WorkCategoryMasterDto |  | ||||||
|     { |  | ||||||
|         public Guid? Id { get; set; } |  | ||||||
|         public string Name { get; set; } = string.Empty; |  | ||||||
|         public string? Description { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -6,11 +6,14 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
|     public class BuildingDot |     public class BuildingDot | ||||||
|     { |     { | ||||||
|         [Key] |         [Key] | ||||||
|         public Guid? Id { get; set; } |         public int Id { get; set; } | ||||||
|         [Required] |         [Required] | ||||||
|         [DisplayName("Building Name")] |         [DisplayName("Building Name")] | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
|         public string? Description { get; set; } |         public string? Description { get; set; } | ||||||
|         public Guid ProjectId { get; set; } |         public int ProjectId { get; set; } | ||||||
|  | 
 | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -1,8 +1,10 @@ | |||||||
| namespace Marco.Pms.Model.ViewModels.Projects |  | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.Model.Dtos.Project | ||||||
| { | { | ||||||
|     public class BuildingVM |     public class BuildingVM | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; }       | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
|         public string? Description { get; set; } |         public string? Description { get; set; } | ||||||
| 
 | 
 | ||||||
| @ -5,6 +5,7 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
| { | { | ||||||
|     public class CreateProjectDto |     public class CreateProjectDto | ||||||
|     { |     { | ||||||
|  |         //public int Id { get; set; } | ||||||
|         [Required(ErrorMessage = "Project Name is required!")] |         [Required(ErrorMessage = "Project Name is required!")] | ||||||
|         [DisplayName("Project Name")] |         [DisplayName("Project Name")] | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
| @ -23,6 +24,8 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
| 
 | 
 | ||||||
|         [DisplayName("Project Status")] |         [DisplayName("Project Status")] | ||||||
|         [Required(ErrorMessage = "Project Status is required!")] |         [Required(ErrorMessage = "Project Status is required!")] | ||||||
|         public Guid ProjectStatusId { get; set; } |         public int ProjectStatusId { get; set; } | ||||||
|  | 
 | ||||||
|  |             public int TenantId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -5,14 +5,17 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
| { | { | ||||||
|     public class FloorDot |     public class FloorDot | ||||||
|     { |     { | ||||||
|         public Guid? Id { get; set; } |         public int Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         [Required] |         [Required] | ||||||
|         [DisplayName("Floor Name")] |         [DisplayName("Floor Name")] | ||||||
|         public string? FloorName { get; set; } |         public string? FloorName { get; set; } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         public Guid BuildingId { get; set; } |         public int BuildingId { get; set; } | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -1,11 +1,11 @@ | |||||||
| using System.ComponentModel; | using System.ComponentModel; | ||||||
| using System.ComponentModel.DataAnnotations; | using System.ComponentModel.DataAnnotations; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.ViewModels.Projects | namespace Marco.Pms.Model.Dtos.Project | ||||||
| { | { | ||||||
|     public class FloorsVM |     public class FloorsVM | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         [Required] |         [Required] | ||||||
|         [DisplayName("Floor Name")] |         [DisplayName("Floor Name")] | ||||||
| @ -2,9 +2,9 @@ | |||||||
| { | { | ||||||
|     public class ProjectAllocationDot |     public class ProjectAllocationDot | ||||||
|     { |     { | ||||||
|         public Guid EmpID { get; set; } |         public int EmpID { get; set; } | ||||||
|         public Guid JobRoleId { get; set; } |         public int JobRoleId { get; set; } | ||||||
|         public Guid ProjectId { get; set; } |         public int ProjectId { get; set; } | ||||||
| 
 | 
 | ||||||
|         public bool Status { get; set; } |         public bool Status { get; set; } | ||||||
|     } |     } | ||||||
| @ -5,7 +5,7 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
| { | { | ||||||
|     public class ProjectDto |     public class ProjectDto | ||||||
|     {        |     {        | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         [Required(ErrorMessage = "Project Name is required!")] |         [Required(ErrorMessage = "Project Name is required!")] | ||||||
|         [DisplayName("Project Name")] |         [DisplayName("Project Name")] | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
| @ -24,7 +24,8 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
| 
 | 
 | ||||||
|         [DisplayName("Project Status")] |         [DisplayName("Project Status")] | ||||||
|         [Required(ErrorMessage = "Project Status is required!")] |         [Required(ErrorMessage = "Project Status is required!")] | ||||||
|         public Guid ProjectStatusId { get; set; } |         public int ProjectStatusId { get; set; } | ||||||
|  |         public int TenantId { get; set; } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| @ -1,6 +1,4 @@ | |||||||
| using Marco.Pms.Model.Dtos.Project; | namespace Marco.Pms.Model.Dtos.Project | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.ViewModels.Projects |  | ||||||
| { | { | ||||||
|     public class ProjectVM : ProjectDto |     public class ProjectVM : ProjectDto | ||||||
|     { |     { | ||||||
| @ -5,7 +5,7 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
| { | { | ||||||
|     public class UpdateProjectDto |     public class UpdateProjectDto | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         [Required(ErrorMessage = "Project Name is required!")] |         [Required(ErrorMessage = "Project Name is required!")] | ||||||
|         [DisplayName("Project Name")] |         [DisplayName("Project Name")] | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
| @ -24,6 +24,8 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
| 
 | 
 | ||||||
|         [DisplayName("Project Status")] |         [DisplayName("Project Status")] | ||||||
|         [Required(ErrorMessage = "Project Status is required!")] |         [Required(ErrorMessage = "Project Status is required!")] | ||||||
|         public Guid ProjectStatusId { get; set; } |         public int ProjectStatusId { get; set; } | ||||||
|  | 
 | ||||||
|  |             public int TenantId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -6,13 +6,16 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
|     public class WorkAreaDot |     public class WorkAreaDot | ||||||
|     { |     { | ||||||
|         [Key] |         [Key] | ||||||
|         public Guid? Id { get; set; } |         public int Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         [Required] |         [Required] | ||||||
|         [DisplayName("Area Name")] |         [DisplayName("Area Name")] | ||||||
|         public string? AreaName { get; set; } |         public string? AreaName { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid FloorId { get; set; } |         public int FloorId { get; set; } | ||||||
|  |         | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -1,11 +1,11 @@ | |||||||
| using System.ComponentModel; | using System.ComponentModel; | ||||||
| using System.ComponentModel.DataAnnotations; | using System.ComponentModel.DataAnnotations; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.ViewModels.Projects | namespace Marco.Pms.Model.Dtos.Project | ||||||
| { | { | ||||||
|     public class WorkAreaVM |     public class WorkAreaVM | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         [Required] |         [Required] | ||||||
|         [DisplayName("Area Name")] |         [DisplayName("Area Name")] | ||||||
| @ -5,11 +5,12 @@ namespace Marco.Pms.Model.Dtos.Project | |||||||
|     public class WorkItemDot |     public class WorkItemDot | ||||||
|     { |     { | ||||||
|         [Key] |         [Key] | ||||||
|         public Guid? Id { get; set; } |         public int Id { get; set; } | ||||||
|         public Guid WorkAreaID { get; set; } |         public int WorkAreaID { get; set; } | ||||||
|         public Guid WorkCategoryId { get; set; } | 
 | ||||||
|         public Guid ActivityID { get; set; } |         public int ActivityID { get; set; } | ||||||
|         public int PlannedWork { get; set; } |         public int PlannedWork { get; set; } | ||||||
|         public int CompletedWork { get; set; } |         public int CompletedWork { get; set; } | ||||||
|  |         public int TenantId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -1,10 +1,10 @@ | |||||||
| using Marco.Pms.Model.Projects; | using Marco.Pms.Model.Projects; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.ViewModels.Projects | namespace Marco.Pms.Model.Dtos.Project | ||||||
| { | { | ||||||
|     public class WorkItemVM |     public class WorkItemVM | ||||||
|     { |     { | ||||||
|         public Guid WorkItemId { get; set; } |         public int WorkItemId { get; set; } | ||||||
|         public WorkItem? WorkItem { get; set; } |         public WorkItem? WorkItem { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -2,7 +2,7 @@ | |||||||
| { | { | ||||||
|     public class UpdateJobRoleDto |     public class UpdateJobRoleDto | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
|         public string? Description { get; set; } |         public string? Description { get; set; } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ | |||||||
|         public string? Email { get; set; } |         public string? Email { get; set; } | ||||||
|         public string? About { get; set; } |         public string? About { get; set; } | ||||||
|         public string? OragnizationSize { get; set; } |         public string? OragnizationSize { get; set; } | ||||||
|         public Guid IndustryId { get; set; } |         public int IndustryId { get; set; } | ||||||
|         public string? ContactPerson { get; set; } |         public string? ContactPerson { get; set; } | ||||||
|         public string? ContactNumber { get; set; } |         public string? ContactNumber { get; set; } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -1,14 +1,13 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.Entitlements; |  | ||||||
| using Marco.Pms.Model.Roles; |  | ||||||
| using Marco.Pms.Model.Utilities; |  | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
|  | using System.ComponentModel; | ||||||
|  | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Employees | namespace Marco.Pms.Model.Employees | ||||||
| { | { | ||||||
|     public class Employee : TenantRelation |     public class Employee | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? FirstName { get; set; } |         public string? FirstName { get; set; } | ||||||
|         public string? LastName { get; set; } |         public string? LastName { get; set; } | ||||||
|         public string? MiddleName { get; set; } |         public string? MiddleName { get; set; } | ||||||
| @ -36,17 +35,19 @@ namespace Marco.Pms.Model.Employees | |||||||
|         [ForeignKey("ApplicationUserId")] |         [ForeignKey("ApplicationUserId")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public ApplicationUser? ApplicationUser { get; set; } |         public ApplicationUser? ApplicationUser { get; set; } | ||||||
| 
 |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
| 
 | 
 | ||||||
|         public bool IsActive { get; set; } = true; |         public bool IsActive { get; set; } = true; | ||||||
| 
 | 
 | ||||||
|         public bool IsSystem { get; set; } = false; |         [ValidateNever] | ||||||
| 
 |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|         public Guid RoleId { get; set; } |         public Guid RoleId { get; set; } | ||||||
|         //[ForeignKey(nameof(RoleId))] |         //[ForeignKey(nameof(RoleId))] | ||||||
|         //public EmployeeRole EmployeeRole { get; set; } |         //public EmployeeRole EmployeeRole { get; set; } | ||||||
| 
 | 
 | ||||||
|         public Guid? JobRoleId { get; set; } |         public int? JobRoleId { get; set; } | ||||||
|         [ForeignKey("JobRoleId")] |         [ForeignKey("JobRoleId")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public JobRole? JobRole { get; set; } |         public JobRole? JobRole { get; set; } | ||||||
|  | |||||||
| @ -1,16 +1,24 @@ | |||||||
| using System.ComponentModel; | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.Utilities; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
|  | using System.ComponentModel; | ||||||
|  | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Employees | namespace Marco.Pms.Model.Employees | ||||||
| { | { | ||||||
|     public class WorkShift : TenantRelation |     public class WorkShift | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         [DisplayName("Shift Name")] |         [DisplayName("Shift Name")] | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
|         public TimeOnly StartTime { get; set; } |         public TimeOnly StartTime { get; set; } | ||||||
|         public TimeOnly EndTime { get; set; } |         public TimeOnly EndTime { get; set; } | ||||||
| 
 | 
 | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  | 
 | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -2,11 +2,11 @@ | |||||||
| { | { | ||||||
|     public class ActivityCheckList |     public class ActivityCheckList | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public Guid ActivityId { get; set; } |         public int ActivityId { get; set; } | ||||||
|         public string? Description { get; set; } = string.Empty; |         public string? Description { get; set; } = string.Empty; | ||||||
|         public bool IsChecked { get; set; } = false; |         public bool IsChecked { get; set; } = false; | ||||||
|         public bool IsMandatory { get; set; } |         public bool IsMandatory { get; set; } | ||||||
|         public Guid TenantId { get; set; } |         public int TenantId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										22
									
								
								Marco.Pms.Model/Entitlements/ActivityMaster.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Marco.Pms.Model/Entitlements/ActivityMaster.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | using System.ComponentModel; | ||||||
|  | using System.ComponentModel.DataAnnotations.Schema; | ||||||
|  | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.Model.Entitlements | ||||||
|  | { | ||||||
|  |     public class ActivityMaster | ||||||
|  |     { | ||||||
|  |         public int Id { get; set; } | ||||||
|  |         public string? ActivityName { get; set; } | ||||||
|  | 
 | ||||||
|  |         public string? UnitOfMeasurement { get; set; } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|  |         public bool IsActive { get; set; } = true; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,13 +1,12 @@ | |||||||
| namespace Marco.Pms.Model.Roles | namespace Marco.Pms.Model.Entitlements | ||||||
| { | { | ||||||
|     public class ApplicationRole |     public class ApplicationRole | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public Guid Id { get; set; } | ||||||
|         public string? Role { get; set; } |         public string? Role { get; set; } | ||||||
|         public string? Description { get; set; } |         public string? Description { get; set; } | ||||||
|         public bool IsSystem { get; set; } = false; |  | ||||||
| 
 | 
 | ||||||
|         public Guid TenantId { get; set; } |         public int TenantId { get; set; }     | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| @ -1,5 +1,9 @@ | |||||||
| using System.ComponentModel; | using Microsoft.AspNetCore.Identity; | ||||||
| using Microsoft.AspNetCore.Identity; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
|  | using Microsoft.Extensions.Logging; | ||||||
|  | using System.ComponentModel; | ||||||
|  | using System.ComponentModel.DataAnnotations; | ||||||
|  | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Entitlements | namespace Marco.Pms.Model.Entitlements | ||||||
| { | { | ||||||
| @ -10,7 +14,7 @@ namespace Marco.Pms.Model.Entitlements | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         [DisplayName("TenantId")] |         [DisplayName("TenantId")] | ||||||
|         public Guid TenantId { get; set; } |         public int TenantId { get; set; } | ||||||
| 
 | 
 | ||||||
|         public bool? IsRootUser { get; set; } = false; |         public bool? IsRootUser { get; set; } = false; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2,8 +2,8 @@ | |||||||
| { | { | ||||||
|     public class CheckListMappings |     public class CheckListMappings | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public Guid TaskAllocationId { get; set; } |         public long TaskAllocationId { get; set; } | ||||||
|         public Guid CheckListId { get; set; } |         public int CheckListId { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,12 +1,12 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Marco.Pms.Model.Master; | using Marco.Pms.Model.Industries; | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Entitlements | namespace Marco.Pms.Model.Entitlements | ||||||
| { | { | ||||||
|     public class Tenant |     public class Tenant | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
|         public string? Description { get; set; } |         public string? Description { get; set; } | ||||||
|         public string? DomainName { get; set; } |         public string? DomainName { get; set; } | ||||||
| @ -14,11 +14,11 @@ namespace Marco.Pms.Model.Entitlements | |||||||
|         public string? ContactNumber { get; set; } |         public string? ContactNumber { get; set; } | ||||||
|         public DateTime OnBoardingDate { get; set; } |         public DateTime OnBoardingDate { get; set; } | ||||||
|         public string? OragnizationSize { get; set; } |         public string? OragnizationSize { get; set; } | ||||||
|         public Guid? IndustryId { get; set; } |         public int? IndustryId { get;set; } | ||||||
| 
 | 
 | ||||||
|         [ForeignKey("IndustryId")] |         [ForeignKey("IndustryId")] | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         public Industry? Industry { get; set; } |         public Industry? Industry{ get; set; } | ||||||
| 
 | 
 | ||||||
|         public bool IsActive { get; set; } = true; |         public bool IsActive { get; set; } = true; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -1,14 +1,13 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Marco.Pms.Model.Roles; | using Marco.Pms.Model.Employees; | ||||||
| using Marco.Pms.Model.Utilities; |  | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Employees | namespace Marco.Pms.Model.Entitlements | ||||||
| { | { | ||||||
|     public class EmployeeRoleMapping : TenantRelation |     public class EmployeeRoleMapping | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public Guid Id { get; set; } | ||||||
|         public Guid EmployeeId { get; set; } |         public int EmployeeId { get; set; } | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         [ForeignKey(nameof(EmployeeId))] |         [ForeignKey(nameof(EmployeeId))] | ||||||
|         public Employee? Employee { get; set; } // Navigation property to Employee |         public Employee? Employee { get; set; } // Navigation property to Employee | ||||||
| @ -20,6 +19,11 @@ namespace Marco.Pms.Model.Employees | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         public bool IsEnabled { get; set; } |         public bool IsEnabled { get; set; } | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|  | 
 | ||||||
|     }    |     }    | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -1,13 +1,12 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| using Marco.Pms.Model.Entitlements; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; |  | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Master | namespace Marco.Pms.Model.Entitlements | ||||||
| { | { | ||||||
|     public class Feature |     public class Feature | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } // Unique identifier for the feature |         public Guid Id { get; set; } // Unique identifier for the feature | ||||||
|         public Guid ModuleId { get; set; } |         public int ModuleId { get; set; } | ||||||
|         [ValidateNever] |         [ValidateNever] | ||||||
|         [ForeignKey(nameof(ModuleId))] |         [ForeignKey(nameof(ModuleId))] | ||||||
|         public Module? Module { get; set; } |         public Module? Module { get; set; } | ||||||
| @ -1,5 +1,4 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel.DataAnnotations.Schema; | ||||||
| using Marco.Pms.Model.Master; |  | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Entitlements | namespace Marco.Pms.Model.Entitlements | ||||||
|  | |||||||
							
								
								
									
										17
									
								
								Marco.Pms.Model/Entitlements/JobRole.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Marco.Pms.Model/Entitlements/JobRole.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | using System.ComponentModel.DataAnnotations.Schema; | ||||||
|  | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.Model.Entitlements | ||||||
|  | { | ||||||
|  |     public class JobRole | ||||||
|  |     { | ||||||
|  |         public int Id { get; set; } | ||||||
|  |         public string? Name { get; set; } | ||||||
|  |         public string? Description { get; set; } | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,6 +1,6 @@ | |||||||
| using System.ComponentModel.DataAnnotations; | using System.ComponentModel.DataAnnotations; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Master | namespace Marco.Pms.Model.Entitlements | ||||||
| { | { | ||||||
|     public class Module |     public class Module | ||||||
|     { |     { | ||||||
| @ -10,7 +10,7 @@ namespace Marco.Pms.Model.Master | |||||||
|             Key = Guid.NewGuid().ToString(); |             Key = Guid.NewGuid().ToString(); | ||||||
|         } |         } | ||||||
|         [Key] |         [Key] | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
| 
 | 
 | ||||||
|         [Required] |         [Required] | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
							
								
								
									
										19
									
								
								Marco.Pms.Model/Entitlements/StatusMaster.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								Marco.Pms.Model/Entitlements/StatusMaster.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | using System.ComponentModel; | ||||||
|  | using System.ComponentModel.DataAnnotations.Schema; | ||||||
|  | using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | ||||||
|  | 
 | ||||||
|  | namespace Marco.Pms.Model.Entitlements | ||||||
|  | { | ||||||
|  |     public class StatusMaster | ||||||
|  |     { | ||||||
|  |         public int Id { get; set; } | ||||||
|  |         public string? Status { get; set; } | ||||||
|  | 
 | ||||||
|  |         [DisplayName("TenantId")] | ||||||
|  |         public int TenantId { get; set; } | ||||||
|  | 
 | ||||||
|  |         [ValidateNever] | ||||||
|  |         [ForeignKey(nameof(TenantId))] | ||||||
|  |         public Tenant? Tenant { get; set; } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,21 +0,0 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; |  | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Forum |  | ||||||
| { |  | ||||||
| 
 |  | ||||||
|     public class TicketAttachment |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public Guid TicketId { get; set; } |  | ||||||
|         [ValidateNever] |  | ||||||
|         [ForeignKey(nameof(TicketId))] |  | ||||||
|         public TicketForum? Ticket { get; set; } |  | ||||||
|         public Guid? CommentId { get; set; } |  | ||||||
|         [ValidateNever] |  | ||||||
|         [ForeignKey(nameof(CommentId))] |  | ||||||
|         public TicketComment? TicketComment { get; set; } |  | ||||||
|         public string FileName { get; set; } = string.Empty; |  | ||||||
|         public Guid FileId { get; set; } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,17 +0,0 @@ | |||||||
| using Marco.Pms.Model.Utilities; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Forum |  | ||||||
| { |  | ||||||
|     public class TicketComment : TenantRelation |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public Guid TicketId { get; set; } |  | ||||||
|         public Guid AuthorId { get; set; } |  | ||||||
|         public string MessageText { get; set; } = string.Empty; |  | ||||||
|         public DateTime SentAt { get; set; } |  | ||||||
|         public Guid? ParentMessageId { get; set; } // For threaded replies |  | ||||||
| 
 |  | ||||||
|         public ICollection<TicketAttachment>? Attachments { get; set; } |  | ||||||
| 
 |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,38 +0,0 @@ | |||||||
| using System.ComponentModel.DataAnnotations.Schema; |  | ||||||
| using Marco.Pms.Model.Master; |  | ||||||
| using Marco.Pms.Model.Utilities; |  | ||||||
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Forum |  | ||||||
| { |  | ||||||
|     public class TicketForum : TenantRelation |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public string Subject { get; set; } = string.Empty; |  | ||||||
|         public string Description { get; set; } = string.Empty; |  | ||||||
|         public Guid StatusId { get; set; } |  | ||||||
|         [ValidateNever] |  | ||||||
|         [ForeignKey(nameof(StatusId))] |  | ||||||
|         public TicketStatusMaster? TicketStatusMaster { get; set; } |  | ||||||
|         public Guid TypeId { get; set; }         // QualityIssue, HelpDesk, Feedback |  | ||||||
|         [ValidateNever] |  | ||||||
|         [ForeignKey(nameof(TypeId))] |  | ||||||
|         public TicketTypeMaster? TicketTypeMaster { get; set; } |  | ||||||
|         public Guid CreatedById { get; set; } |  | ||||||
|         public DateTime CreatedAt { get; set; } |  | ||||||
| 
 |  | ||||||
|         public Guid? LinkedProjectId { get; set; } |  | ||||||
|         public Guid? LinkedActivityId { get; set; } // task or project ID |  | ||||||
| 
 |  | ||||||
|         //public ICollection<TicketComment>? Comments { get; set; } // view model |  | ||||||
|         //public ICollection<TicketAttachment>? Attachments { get; set; } // view model |  | ||||||
| 
 |  | ||||||
|         public Guid PriorityId { get; set; } |  | ||||||
|         [ValidateNever] |  | ||||||
|         [ForeignKey(nameof(PriorityId))] |  | ||||||
|         public TicketPriorityMaster? Priority { get; set; } |  | ||||||
| 
 |  | ||||||
|         //public ICollection<TicketTag>? Tags { get; set; }  // view model |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,15 +0,0 @@ | |||||||
| using Marco.Pms.Model.Master; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Forum |  | ||||||
| { |  | ||||||
|     public class TicketTag |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public Guid TicketId { get; set; } |  | ||||||
|         public TicketForum? Ticket { get; set; } |  | ||||||
| 
 |  | ||||||
|         public Guid TagId { get; set; } |  | ||||||
|         public TicketTagMaster? Tag { get; set; } |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,8 +1,8 @@ | |||||||
| namespace Marco.Pms.Model.Master | namespace Marco.Pms.Model.Industries | ||||||
| { | { | ||||||
|     public class Industry |     public class Industry | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public int Id { get; set; } | ||||||
|         public string? Name { get; set; } |         public string? Name { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -1,14 +1,13 @@ | |||||||
| using Marco.Pms.Model.Activities; | using Marco.Pms.Model.Activities; | ||||||
| using Marco.Pms.Model.Dtos.Activities; | using Marco.Pms.Model.Dtos.Activities; | ||||||
| using Marco.Pms.Model.Entitlements; | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.Master; |  | ||||||
| using Marco.Pms.Model.ViewModels.Activities; | using Marco.Pms.Model.ViewModels.Activities; | ||||||
| 
 | #nullable disable | ||||||
| namespace Marco.Pms.Model.Mapper | namespace Marco.Pms.Model.Mapper | ||||||
| { | { | ||||||
|     public static class ActivitiesMapper |     public static class ActivitiesMapper | ||||||
|     { |     { | ||||||
|         public static TaskAllocation ToTaskAllocationFromAssignTaskDto(this AssignTaskDto assignTask, Guid EmployeeId, Guid tenantId) |         public static TaskAllocation ToTaskAllocationFromAssignTaskDto(this AssignTaskDto assignTask, int EmployeeId,int tenantId) | ||||||
|         { |         { | ||||||
|             return new TaskAllocation |             return new TaskAllocation | ||||||
|             { |             { | ||||||
| @ -21,29 +20,27 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 TenantId = tenantId |                 TenantId = tenantId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static TaskComment ToCommentFromReportTaskDto(this ReportTaskDto reportTask, Guid tenantId, Guid EmployeeId) |         public static TaskComment ToCommentFromReportTaskDto(this ReportTaskDto reportTask, int tenantId, int EmployeeId) | ||||||
|         { |         { | ||||||
|             return new TaskComment |             return new TaskComment | ||||||
|             { |             { | ||||||
|                 TaskAllocationId = reportTask.Id, |                 TaskAllocationId = reportTask.Id, | ||||||
|                 CommentDate = reportTask.ReportedDate, |                 CommentDate = reportTask.ReportedDate, | ||||||
|                 Comment = reportTask.Comment ?? string.Empty, |                 Comment = reportTask.Comment, | ||||||
|                 CommentedBy = EmployeeId, |                 CommentedBy = EmployeeId, | ||||||
|                 TenantId = tenantId |                 TenantId = tenantId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static TaskComment ToCommentFromCommentDto(this CreateCommentDto createComment, Guid tenantId, Guid EmployeeId) |         public static TaskComment ToCommentFromCommentDto(this CreateCommentDto createComment, int tenantId, int EmployeeId) { | ||||||
|         { |             return new TaskComment { | ||||||
|             return new TaskComment |  | ||||||
|             { |  | ||||||
|                 TaskAllocationId = createComment.TaskAllocationId, |                 TaskAllocationId = createComment.TaskAllocationId, | ||||||
|                 CommentDate = createComment.CommentDate, |                 CommentDate = createComment.CommentDate, | ||||||
|                 Comment = createComment.Comment ?? string.Empty, |                 Comment = createComment.Comment, | ||||||
|                 CommentedBy = EmployeeId, |                 CommentedBy = EmployeeId, | ||||||
|                 TenantId = tenantId |                 TenantId = tenantId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static TaskVM TaskAllocationToTaskVM(this TaskAllocation taskAllocation, string employeeName) |         public static TaskVM TaskAllocationToTaskVM(this TaskAllocation taskAllocation,string employeeName,string tenant ) | ||||||
|         { |         { | ||||||
|             return new TaskVM |             return new TaskVM | ||||||
|             { |             { | ||||||
| @ -54,6 +51,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 ReportedDate = taskAllocation.ReportedDate, |                 ReportedDate = taskAllocation.ReportedDate, | ||||||
|                 Description = taskAllocation.Description, |                 Description = taskAllocation.Description, | ||||||
|                 AssignBy = employeeName, |                 AssignBy = employeeName, | ||||||
|  |                 Tenant = tenant, | ||||||
|                 WorkItem = taskAllocation.WorkItem |                 WorkItem = taskAllocation.WorkItem | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| @ -65,10 +63,11 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 AssignmentDate = taskAllocation.AssignmentDate, |                 AssignmentDate = taskAllocation.AssignmentDate, | ||||||
|                 PlannedTask = taskAllocation.PlannedTask, |                 PlannedTask = taskAllocation.PlannedTask, | ||||||
|                 CompletedTask = taskAllocation.CompletedTask, |                 CompletedTask = taskAllocation.CompletedTask, | ||||||
|                 ReportedDate = taskAllocation.ReportedDate, |                 ReportedDate= taskAllocation.ReportedDate, | ||||||
|                 Description = taskAllocation.Description, |                 Description = taskAllocation.Description, | ||||||
|                 AssignedBy = taskAllocation.Employee != null ? taskAllocation.Employee.ToEmployeeVMFromEmployee() : new ViewModels.Employee.EmployeeVM(), |                 AssignedBy = taskAllocation.Employee.ToEmployeeVMFromEmployee(), | ||||||
|                 WorkItemId = taskAllocation.WorkItemId |                 WorkItemId = taskAllocation.WorkItemId, | ||||||
|  |                 TenantId = taskAllocation.TenantId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static ReportTaskVM ToReportTaskVMFromTaskAllocation(this TaskAllocation taskAllocation) |         public static ReportTaskVM ToReportTaskVMFromTaskAllocation(this TaskAllocation taskAllocation) | ||||||
| @ -82,10 +81,11 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 ReportedDate = taskAllocation.ReportedDate, |                 ReportedDate = taskAllocation.ReportedDate, | ||||||
|                 Description = taskAllocation.Description, |                 Description = taskAllocation.Description, | ||||||
|                 AssignedBy = taskAllocation.AssignedBy, |                 AssignedBy = taskAllocation.AssignedBy, | ||||||
|                 WorkItemId = taskAllocation.WorkItemId |                 WorkItemId = taskAllocation.WorkItemId, | ||||||
|  |                 TenantId = taskAllocation.TenantId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static ActivityMaster ToActivityMasterFromCreateActivityMasterDto(this CreateActivityMasterDto createActivity, Guid tenantId) |         public static ActivityMaster ToActivityMasterFromCreateActivityMasterDto(this CreateActivityMasterDto createActivity,int tenantId) | ||||||
|         { |         { | ||||||
|             return new ActivityMaster |             return new ActivityMaster | ||||||
|             { |             { | ||||||
| @ -102,11 +102,12 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 Id = taskAllocation.Id, |                 Id = taskAllocation.Id, | ||||||
|                 AssignmentDate = taskAllocation.AssignmentDate, |                 AssignmentDate = taskAllocation.AssignmentDate, | ||||||
|                 PlannedTask = taskAllocation.PlannedTask, |                 PlannedTask = taskAllocation.PlannedTask, | ||||||
|                 ReportedDate = taskAllocation.ReportedDate, |  | ||||||
|                 CompletedTask = taskAllocation.CompletedTask, |                 CompletedTask = taskAllocation.CompletedTask, | ||||||
|                 AssignedBy = taskAllocation.Employee != null ? taskAllocation.Employee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM(), |                 AssignedBy = taskAllocation.Employee.ToBasicEmployeeVMFromEmployee(), | ||||||
|                 WorkItemId = taskAllocation.WorkItemId, |                 WorkItemId = taskAllocation.WorkItemId, | ||||||
|                 WorkItem = taskAllocation.WorkItem |                 WorkItem = taskAllocation.WorkItem, | ||||||
|  |                 TenantId = taskAllocation.TenantId, | ||||||
|  |                 //CheckList =  | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static CommentVM ToCommentVMFromTaskComment(this TaskComment comment) |         public static CommentVM ToCommentVMFromTaskComment(this TaskComment comment) | ||||||
| @ -118,11 +119,11 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 CommentDate = comment.CommentDate, |                 CommentDate = comment.CommentDate, | ||||||
|                 Comment = comment.Comment, |                 Comment = comment.Comment, | ||||||
|                 CommentedBy = comment.CommentedBy, |                 CommentedBy = comment.CommentedBy, | ||||||
|                 Employee = comment.Employee != null ? comment.Employee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM() |                 Employee = comment.Employee.ToBasicEmployeeVMFromEmployee() | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static ActivityVM ToActivityVMFromActivityMaster(this ActivityMaster activity, List<CheckListVM> checkList) |         public static ActivityVM ToActivityVMFromActivityMaster(this ActivityMaster activity,List<CheckListVM> checkList) | ||||||
|         { |         { | ||||||
|             return new ActivityVM |             return new ActivityVM | ||||||
|             { |             { | ||||||
| @ -132,7 +133,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 CheckLists = checkList, |                 CheckLists = checkList, | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static CheckListVM ToCheckListVMFromActivityCheckList(this ActivityCheckList checkList, Guid activityId, bool IsChecked) |         public static CheckListVM ToCheckListVMFromActivityCheckList(this ActivityCheckList checkList,int activityId,bool IsChecked) | ||||||
|         { |         { | ||||||
|             return new CheckListVM |             return new CheckListVM | ||||||
|             { |             { | ||||||
| @ -143,18 +144,18 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 IsMandatory = checkList.IsMandatory, |                 IsMandatory = checkList.IsMandatory, | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static ActivityCheckList ToActivityCheckListFromCreateCheckListDto(this CreateCheckListDto checkListDto, Guid tenantId, Guid activityId) |         public static ActivityCheckList ToActivityCheckListFromCreateCheckListDto(this CreateCheckListDto checkListDto,int tenantId,int activityId) | ||||||
|         { |         { | ||||||
|             return new ActivityCheckList |             return new ActivityCheckList | ||||||
|             { |             { | ||||||
|                 Id = checkListDto.Id != null ? checkListDto.Id.Value : Guid.Empty, |                 Id = checkListDto.Id, | ||||||
|                 Description = checkListDto.Description, |                 Description = checkListDto.Description, | ||||||
|                 ActivityId = activityId, |                 ActivityId = activityId, | ||||||
|                 IsMandatory = checkListDto.IsMandatory, |                 IsMandatory = checkListDto.IsMandatory, | ||||||
|                 TenantId = tenantId |                 TenantId = tenantId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static CheckListVM ToCheckListVMFromReportCheckListDto(this ReportCheckListDto checkListDto, Guid activityId) |         public static CheckListVM ToCheckListVMFromReportCheckListDto(this ReportCheckListDto checkListDto, int activityId) | ||||||
|         { |         { | ||||||
|             return new CheckListVM |             return new CheckListVM | ||||||
|             { |             { | ||||||
|  | |||||||
| @ -1,7 +1,6 @@ | |||||||
| using Marco.Pms.Model.Dtos.Roles; | using Marco.Pms.Model.Dtos.Roles; | ||||||
| using Marco.Pms.Model.Roles; | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.ViewModels; | using Marco.Pms.Model.ViewModels; | ||||||
| using Marco.Pms.Model.ViewModels.Roles; |  | ||||||
| #nullable disable | #nullable disable | ||||||
| namespace Marco.Pms.Model.Mapper | namespace Marco.Pms.Model.Mapper | ||||||
| { | { | ||||||
| @ -13,12 +12,11 @@ namespace Marco.Pms.Model.Mapper | |||||||
|             { |             { | ||||||
|                 Id = model.Id, |                 Id = model.Id, | ||||||
|                 Role = model.Role, |                 Role = model.Role, | ||||||
|                 IsSystem = model.IsSystem, |  | ||||||
|                 Description = model.Description, |                 Description = model.Description, | ||||||
|                 //FeaturePermission = model.FeaturePermissions |                 //FeaturePermission = model.FeaturePermissions | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static ApplicationRole ToApplicationRoleFromCreateDto(this CreateApplicationRoleDto model, Guid TenantId) |         public static ApplicationRole ToApplicationRoleFromCreateDto(this CreateApplicationRoleDto model, int TenantId) | ||||||
|         { |         { | ||||||
|             return new ApplicationRole |             return new ApplicationRole | ||||||
|             { |             { | ||||||
| @ -29,7 +27,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static ApplicationRole ToApplicationRoleFromUpdateDto(this UpdateApplicationRoleDto model, Guid TenantId) |         public static ApplicationRole ToApplicationRoleFromUpdateDto(this UpdateApplicationRoleDto model, int TenantId) | ||||||
|         { |         { | ||||||
|             return new ApplicationRole |             return new ApplicationRole | ||||||
|             { |             { | ||||||
| @ -41,7 +39,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static JobRole ToJobRoleFromCreateJobRoleDot(this CreateJobRoleDto model, Guid TenantId) |         public static JobRole ToJobRoleFromCreateJobRoleDot(this CreateJobRoleDto model, int TenantId) | ||||||
|         { |         { | ||||||
|             return new JobRole |             return new JobRole | ||||||
|             { |             { | ||||||
| @ -52,7 +50,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static JobRole ToJobRoleFromUpdateJobRoleDot(this UpdateJobRoleDto model, Guid TenantId) |         public static JobRole ToJobRoleFromUpdateJobRoleDot(this UpdateJobRoleDto model, int TenantId) | ||||||
|         { |         { | ||||||
|             return new JobRole |             return new JobRole | ||||||
|             { |             { | ||||||
|  | |||||||
| @ -1,29 +0,0 @@ | |||||||
| using Marco.Pms.Model.AttendanceModule; |  | ||||||
| using Marco.Pms.Model.ViewModels.Activities; |  | ||||||
| using Marco.Pms.Model.ViewModels.AttendanceVM; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Mapper |  | ||||||
| { |  | ||||||
|     public static class AttendanceMapper |  | ||||||
|     { |  | ||||||
|         public static AttendanceLogVM ToAttendanceLogVMFromAttendanceLog(this AttendanceLog attendanceLog, string preSignedUrl, string thumbPreSignedUrl) |  | ||||||
|         { |  | ||||||
|             return new AttendanceLogVM |  | ||||||
|             { |  | ||||||
|                 Id = attendanceLog.Id, |  | ||||||
|                 Comment = attendanceLog.Comment, |  | ||||||
|                 Employee = attendanceLog.Employee != null ? attendanceLog.Employee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM(), |  | ||||||
|                 ActivityTime = attendanceLog.ActivityTime, |  | ||||||
|                 Activity = attendanceLog.Activity, |  | ||||||
|                 Photo = attendanceLog.Photo, |  | ||||||
|                 Latitude = attendanceLog.Latitude, |  | ||||||
|                 Longitude = attendanceLog.Longitude, |  | ||||||
|                 UpdatedOn = attendanceLog.UpdatedOn, |  | ||||||
|                 UpdatedByEmployee = attendanceLog.UpdatedByEmployee != null ? attendanceLog.UpdatedByEmployee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM(), |  | ||||||
|                 DocumentId = attendanceLog.Document != null ? attendanceLog.Document.Id : null, |  | ||||||
|                 PreSignedUrl = preSignedUrl, |  | ||||||
|                 ThumbPreSignedUrl = thumbPreSignedUrl, |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -29,11 +29,12 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 PhoneNumber = model.PhoneNumber, |                 PhoneNumber = model.PhoneNumber, | ||||||
|                 Photo = model.Photo, |                 Photo = model.Photo, | ||||||
|                 IsActive = model.IsActive, |                 IsActive = model.IsActive, | ||||||
|                 IsSystem = model.IsSystem, |  | ||||||
|                 JoiningDate = model.JoiningDate |                 JoiningDate = model.JoiningDate | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|         public static BasicEmployeeVM ToBasicEmployeeVMFromEmployee(this Employee employee) |         public static BasicEmployeeVM ToBasicEmployeeVMFromEmployee(this Employee employee) | ||||||
|  |         { | ||||||
|  |             if (employee.JobRole == null) | ||||||
|             { |             { | ||||||
|                 return new BasicEmployeeVM |                 return new BasicEmployeeVM | ||||||
|                 { |                 { | ||||||
| @ -42,7 +43,17 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                     LastName = employee.LastName, |                     LastName = employee.LastName, | ||||||
|                     Photo = employee.Photo, |                     Photo = employee.Photo, | ||||||
|                     JobRoleId = employee.JobRoleId, |                     JobRoleId = employee.JobRoleId, | ||||||
|                 JobRoleName = employee.JobRole != null ? employee.JobRole.Name : "" |                     JobRoleName = "" | ||||||
|  |                 }; | ||||||
|  |             } | ||||||
|  |             return new BasicEmployeeVM | ||||||
|  |             { | ||||||
|  |                 Id = employee.Id, | ||||||
|  |                 FirstName = employee.FirstName, | ||||||
|  |                 LastName = employee.LastName, | ||||||
|  |                 Photo = employee.Photo, | ||||||
|  |                 JobRoleId = employee.JobRoleId, | ||||||
|  |                 JobRoleName = employee.JobRole.Name | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| using Marco.Pms.Model.Dtos.Employees; | using Marco.Pms.Model.Dtos.Employees; | ||||||
| using Marco.Pms.Model.Employees; | using Marco.Pms.Model.Entitlements; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Mapper | namespace Marco.Pms.Model.Mapper | ||||||
| { | { | ||||||
| @ -15,9 +15,9 @@ namespace Marco.Pms.Model.Mapper | |||||||
|         //        Features = model.Features |         //        Features = model.Features | ||||||
|         //    }; |         //    }; | ||||||
|         //} |         //} | ||||||
|         public static EmployeeRoleMapping ToEmployeeRoleMappingFromEmployeeRoleDot(this EmployeeRoleDot model, Guid TenantId) |         public static EmployeeRoleMapping ToEmployeeRoleMappingFromEmployeeRoleDot(this EmployeeRoleDot model, int TenantId) | ||||||
|         { |         { | ||||||
|             Guid id = (string.IsNullOrEmpty(model.Id) ? Guid.NewGuid() : new Guid(model.Id)); |             Guid id = (string.IsNullOrEmpty(model.Id ) ?Guid.NewGuid() : new Guid(model.Id)); | ||||||
|             return new EmployeeRoleMapping |             return new EmployeeRoleMapping | ||||||
|             { |             { | ||||||
|                 Id =  id, |                 Id =  id, | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| using Marco.Pms.Model.Entitlements; | using Marco.Pms.Model.Entitlements; | ||||||
| using Marco.Pms.Model.ViewModels.Master; | using Marco.Pms.Model.ViewModels; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Mapper | namespace Marco.Pms.Model.Mapper | ||||||
| { | { | ||||||
|  | |||||||
| @ -1,252 +0,0 @@ | |||||||
| using Marco.Pms.Model.DocumentManager; |  | ||||||
| using Marco.Pms.Model.Dtos.Forum; |  | ||||||
| using Marco.Pms.Model.Dtos.Master; |  | ||||||
| using Marco.Pms.Model.Employees; |  | ||||||
| using Marco.Pms.Model.Forum; |  | ||||||
| using Marco.Pms.Model.Master; |  | ||||||
| using Marco.Pms.Model.ViewModels.Forum; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Mapper |  | ||||||
| { |  | ||||||
|     public static class ForumMapper |  | ||||||
|     { |  | ||||||
|         public static TicketForum ToTicketForumFromCreateTicketDto(this CreateTicketDto createTicketDto, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new TicketForum |  | ||||||
|             { |  | ||||||
|                 Subject = createTicketDto.Subject, |  | ||||||
|                 Description = createTicketDto.Description, |  | ||||||
|                 StatusId = createTicketDto.StatusId, |  | ||||||
|                 TypeId = createTicketDto.TypeId, |  | ||||||
|                 CreatedById = createTicketDto.CreatedById, |  | ||||||
|                 CreatedAt = createTicketDto.CreatedAt, |  | ||||||
|                 LinkedProjectId = createTicketDto.LinkedProjectId, |  | ||||||
|                 LinkedActivityId = createTicketDto.LinkedActivityId, |  | ||||||
|                 PriorityId = createTicketDto.PriorityId, |  | ||||||
|                 TenantId = tenantId, |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketForum ToTicketForumFromUpdateTicketDto(this UpdateTicketDto updateTicketDto, TicketForum ticket) |  | ||||||
|         { |  | ||||||
|             return new TicketForum |  | ||||||
|             { |  | ||||||
|                 Id = updateTicketDto.Id, |  | ||||||
|                 Subject = updateTicketDto.Subject, |  | ||||||
|                 Description = updateTicketDto.Description, |  | ||||||
|                 StatusId = updateTicketDto.StatusId, |  | ||||||
|                 TypeId = updateTicketDto.TypeId, |  | ||||||
|                 CreatedById = ticket.CreatedById, |  | ||||||
|                 CreatedAt = ticket.CreatedAt, |  | ||||||
|                 LinkedProjectId = ticket.LinkedProjectId, |  | ||||||
|                 LinkedActivityId = ticket.LinkedActivityId, |  | ||||||
|                 PriorityId = updateTicketDto.PriorityId, |  | ||||||
|                 TenantId = ticket.TenantId |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         public static TicketComment ToTicketCommentFromAddCommentDto(this AddCommentDto commentDto, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new TicketComment |  | ||||||
|             { |  | ||||||
|                 TicketId = commentDto.TicketId, |  | ||||||
|                 AuthorId = commentDto.AuthorId, |  | ||||||
|                 MessageText = commentDto.MessageText, |  | ||||||
|                 SentAt = commentDto.SentAt, |  | ||||||
|                 ParentMessageId = commentDto.ParentMessageId, |  | ||||||
|                 TenantId = tenantId, |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketComment ToTicketCommentFromUpdateCommentDto(this UpdateCommentDto updateComment, Guid tenantId, TicketComment comment) |  | ||||||
|         { |  | ||||||
|             return new TicketComment |  | ||||||
|             { |  | ||||||
|                 Id = updateComment.Id, |  | ||||||
|                 TicketId = updateComment.TicketId, |  | ||||||
|                 AuthorId = comment.AuthorId, |  | ||||||
|                 MessageText = updateComment.MessageText, |  | ||||||
|                 SentAt = comment.SentAt, |  | ||||||
|                 ParentMessageId = updateComment.ParentMessageId, |  | ||||||
|                 TenantId = tenantId, |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketAttachment ToTicketAttachmentFromForumAttachmentDto(this ForumAttachmentDto AttachmentDto, Guid ticketId, Guid fileId, Guid? commentId = null) |  | ||||||
|         { |  | ||||||
|             return new TicketAttachment |  | ||||||
|             { |  | ||||||
|                 TicketId = ticketId, |  | ||||||
|                 CommentId = commentId, |  | ||||||
|                 FileName = AttachmentDto.FileName, |  | ||||||
|                 FileId = fileId, |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketAttachment ToTicketAttachmentFromUpdateAttachmentDto(this UpdateAttachmentDto AttachmentDto, Guid ticketId, Guid fileId, Guid? commentId = null) |  | ||||||
|         { |  | ||||||
|             return new TicketAttachment |  | ||||||
|             { |  | ||||||
|                 TicketId = ticketId, |  | ||||||
|                 CommentId = commentId, |  | ||||||
|                 FileName = AttachmentDto.FileName, |  | ||||||
|                 FileId = fileId, |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         public static Document ToDocumentFromForumAttachmentDto(this ForumAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new Document |  | ||||||
|             { |  | ||||||
|                 FileName = AttachmentDto.FileName, |  | ||||||
|                 ContentType = AttachmentDto.ContentType, |  | ||||||
|                 S3Key = objectKey, |  | ||||||
|                 ThumbS3Key = thumbS3Key, |  | ||||||
|                 Base64Data = AttachmentDto.Base64Data, |  | ||||||
|                 FileSize = AttachmentDto.FileSize, |  | ||||||
|                 UploadedAt = uploadedAt, |  | ||||||
|                 TenantId = tenantId |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static Document ToDocumentFromUpdateAttachmentDto(this UpdateAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new Document |  | ||||||
|             { |  | ||||||
|                 FileName = AttachmentDto.FileName, |  | ||||||
|                 ContentType = AttachmentDto.ContentType, |  | ||||||
|                 S3Key = objectKey, |  | ||||||
|                 ThumbS3Key = thumbS3Key, |  | ||||||
|                 Base64Data = AttachmentDto.Base64Data, |  | ||||||
|                 FileSize = AttachmentDto.FileSize, |  | ||||||
|                 UploadedAt = uploadedAt, |  | ||||||
|                 TenantId = tenantId |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static ForumTicketVM ToForumTicketVMFromTicketForum(this TicketForum ticket, Employee employee) |  | ||||||
|         { |  | ||||||
|             return new ForumTicketVM |  | ||||||
|             { |  | ||||||
|                 Id = ticket.Id, |  | ||||||
|                 Subject = ticket.Subject, |  | ||||||
|                 Description = ticket.Description, |  | ||||||
|                 CreatedAt = ticket.CreatedAt, |  | ||||||
|                 LinkedProjectId = ticket.LinkedProjectId, |  | ||||||
|                 LinkedActivityId = ticket.LinkedActivityId, |  | ||||||
|                 Status = ticket.TicketStatusMaster != null ? ticket.TicketStatusMaster.ToTicketStatusVMFromTicketStatusMaster() : new TicketStatusVM(), |  | ||||||
|                 Priority = ticket.Priority != null ? ticket.Priority.ToTicketPriorityVMFromTicketPriorityMaster() : new TicketPriorityVM(), |  | ||||||
|                 Type = ticket.TicketTypeMaster != null ? ticket.TicketTypeMaster.ToTicketTypeVMFromTicketTypeMaster() : new TicketTypeVM(), |  | ||||||
|                 CreatedBy = employee.ToBasicEmployeeVMFromEmployee(), |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketAttachmentVM ToTicketAttachmentVMFromTicketAttachment(this TicketAttachment attachment, string preSignedUrl, string thumbPreSignedUrl) |  | ||||||
|         { |  | ||||||
|             return new TicketAttachmentVM |  | ||||||
|             { |  | ||||||
|                 Id = attachment.Id, |  | ||||||
|                 TicketId = attachment.TicketId, |  | ||||||
|                 CommentId = attachment.CommentId, |  | ||||||
|                 FileName = attachment.FileName, |  | ||||||
|                 PreSignedUrl = preSignedUrl, |  | ||||||
|                 ThumbPreSignedUrl = thumbPreSignedUrl |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketCommentVM ToTicketCommentVMFromTicketComment(this TicketComment comment, Employee employee) |  | ||||||
|         { |  | ||||||
|             return new TicketCommentVM |  | ||||||
|             { |  | ||||||
|                 Id = comment.Id, |  | ||||||
|                 TicketId = comment.TicketId, |  | ||||||
|                 Author = employee.ToBasicEmployeeVMFromEmployee(), |  | ||||||
|                 MessageText = comment.MessageText, |  | ||||||
|                 SentAt = comment.SentAt, |  | ||||||
|                 ParentMessageId = comment.ParentMessageId, |  | ||||||
|                 Attachments = new List<TicketAttachmentVM>() |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketStatusVM ToTicketStatusVMFromTicketStatusMaster(this TicketStatusMaster statusMaster) |  | ||||||
|         { |  | ||||||
|             return new TicketStatusVM |  | ||||||
|             { |  | ||||||
|                 Id = statusMaster.Id, |  | ||||||
|                 Name = statusMaster.Name, |  | ||||||
|                 Description = statusMaster.Description, |  | ||||||
|                 ColorCode = statusMaster.ColorCode, |  | ||||||
|                 IsDefault = statusMaster.IsDefault |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketStatusMaster ToTicketStatusMasterFromTicketStatusMasterDto(this TicketStatusMasterDto statusMasterDto, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new TicketStatusMaster |  | ||||||
|             { |  | ||||||
|                 Id = statusMasterDto.Id != null ? statusMasterDto.Id.Value : Guid.Empty, |  | ||||||
|                 Name = statusMasterDto.Name, |  | ||||||
|                 Description = statusMasterDto.Description, |  | ||||||
|                 ColorCode = statusMasterDto.ColorCode, |  | ||||||
|                 IsDefault = statusMasterDto.IsDefault, |  | ||||||
|                 TenantId = tenantId |  | ||||||
| 
 |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketPriorityVM ToTicketPriorityVMFromTicketPriorityMaster(this TicketPriorityMaster priorityMaster) |  | ||||||
|         { |  | ||||||
|             return new TicketPriorityVM |  | ||||||
|             { |  | ||||||
|                 Id = priorityMaster.Id, |  | ||||||
|                 Name = priorityMaster.Name, |  | ||||||
|                 Level = priorityMaster.Level, |  | ||||||
|                 ColorCode = priorityMaster.ColorCode, |  | ||||||
|                 IsDefault = priorityMaster.IsDefault |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketPriorityMaster ToTicketPriorityMasterFromTicketPriorityMasterDto(this TicketPriorityMasterDto priorityMasterDto, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new TicketPriorityMaster |  | ||||||
|             { |  | ||||||
|                 Id = priorityMasterDto.Id != null ? priorityMasterDto.Id.Value : Guid.Empty, |  | ||||||
|                 Name = priorityMasterDto.Name, |  | ||||||
|                 Level = priorityMasterDto.Level, |  | ||||||
|                 ColorCode = priorityMasterDto.ColorCode, |  | ||||||
|                 IsDefault = priorityMasterDto.IsDefault, |  | ||||||
|                 TenantId = tenantId |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketTypeVM ToTicketTypeVMFromTicketTypeMaster(this TicketTypeMaster typeMaster) |  | ||||||
|         { |  | ||||||
|             return new TicketTypeVM |  | ||||||
|             { |  | ||||||
|                 Id = typeMaster.Id, |  | ||||||
|                 Name = typeMaster.Name, |  | ||||||
|                 Description = typeMaster.Description, |  | ||||||
|                 IsDefault = typeMaster.IsDefault |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketTypeMaster ToTicketTypeMasterFromTicketTypeMasterDto(this TicketTypeMasterDto typeMasterDto, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new TicketTypeMaster |  | ||||||
|             { |  | ||||||
|                 Id = typeMasterDto.Id != null ? typeMasterDto.Id.Value : Guid.Empty, |  | ||||||
|                 Name = typeMasterDto.Name, |  | ||||||
|                 Description = typeMasterDto.Description, |  | ||||||
|                 IsDefault = typeMasterDto.IsDefault, |  | ||||||
|                 TenantId = tenantId |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketTagVM ToTicketTagVMFromTicketTagMaster(this TicketTagMaster tagMaster) |  | ||||||
|         { |  | ||||||
|             return new TicketTagVM |  | ||||||
|             { |  | ||||||
|                 Id = tagMaster.Id, |  | ||||||
|                 Name = tagMaster.Name, |  | ||||||
|                 ColorCode = tagMaster.ColorCode, |  | ||||||
|                 IsDefault = tagMaster.IsDefault |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static TicketTagMaster ToTicketTagMasterFromTicketTagMasterDto(this TicketTagMasterDto tagMasterDto, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new TicketTagMaster |  | ||||||
|             { |  | ||||||
|                 Id = tagMasterDto.Id != null ? tagMasterDto.Id.Value : Guid.Empty, |  | ||||||
|                 Name = tagMasterDto.Name, |  | ||||||
|                 ColorCode = tagMasterDto.ColorCode, |  | ||||||
|                 IsDefault = tagMasterDto.IsDefault, |  | ||||||
|                 TenantId = tenantId |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -5,60 +5,59 @@ namespace Marco.Pms.Model.Mapper | |||||||
| { | { | ||||||
|     public static class BuildingMapper |     public static class BuildingMapper | ||||||
|     { |     { | ||||||
|         public static Building ToBuildingFromBuildingDto(this BuildingDot model, Guid tenantId) |         public static Building ToBuildingFromBuildingDto(this BuildingDot model) | ||||||
|         { |         { | ||||||
|             return new Building |             return new Building | ||||||
|             { |             { | ||||||
|                 Id = model.Id != null ? model.Id.Value : Guid.Empty, |                 Id = model.Id, | ||||||
|                 Description = model.Description, |                 Description = model.Description, | ||||||
|                 Name = model.Name, |                 Name = model.Name, | ||||||
|                 ProjectId = model.ProjectId, |                 ProjectId = model.ProjectId, | ||||||
|                 TenantId = tenantId, |                 TenantId = model.TenantId, | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public static class FloorMapper |     public static class FloorMapper | ||||||
|     { |     { | ||||||
|         public static Floor ToFloorFromFloorDto(this FloorDot model, Guid tenantId) |         public static Floor ToFloorFromFloorDto(this FloorDot model) | ||||||
|         { |         { | ||||||
|             return new Floor |             return new Floor | ||||||
|             { |             { | ||||||
|                 Id = model.Id != null ? model.Id.Value : Guid.Empty, |                 Id = model.Id, | ||||||
|                 FloorName = model.FloorName, |                 FloorName = model.FloorName, | ||||||
|                 BuildingId = model.BuildingId, |                 BuildingId = model.BuildingId, | ||||||
|                 TenantId = tenantId |                 TenantId = model.TenantId                 | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public static class WorAreaMapper |     public static class WorAreaMapper | ||||||
|     { |     { | ||||||
|         public static WorkArea ToWorkAreaFromWorkAreaDto(this WorkAreaDot model, Guid tenantId) |         public static WorkArea ToWorkAreaFromWorkAreaDto(this WorkAreaDot model) | ||||||
|         { |         { | ||||||
|             return new WorkArea |             return new WorkArea | ||||||
|             { |             { | ||||||
|                 Id = model.Id != null ? model.Id.Value : Guid.Empty, |                 Id = model.Id, | ||||||
|                 AreaName = model.AreaName, |                 AreaName = model.AreaName, | ||||||
|                 FloorId = model.FloorId, |                 FloorId = model.FloorId, | ||||||
|                 TenantId = tenantId |                 TenantId = model.TenantId | ||||||
|                  |                  | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     public static class WorkItemMapper |     public static class WorkItemMapper | ||||||
|     { |     { | ||||||
|         public static WorkItem ToWorkItemFromWorkItemDto(this WorkItemDot model, Guid tenantId) |         public static WorkItem ToWorkItemFromWorkItemDto(this WorkItemDot model) | ||||||
|         { |         { | ||||||
|             return new WorkItem |             return new WorkItem | ||||||
|             { |             { | ||||||
|                 Id = model.Id != null ? model.Id.Value : Guid.Empty, |                 Id = model.Id, | ||||||
|                 ActivityId = model.ActivityID, |                 ActivityId = model.ActivityID, | ||||||
|                 CompletedWork = model.CompletedWork, |                 CompletedWork = model.CompletedWork, | ||||||
|                 PlannedWork = model.PlannedWork, |                 PlannedWork = model.PlannedWork, | ||||||
|                 WorkCategoryId = model.WorkCategoryId, |  | ||||||
|                 TaskDate = DateTime.Now, |                 TaskDate = DateTime.Now, | ||||||
|                 TenantId = tenantId, |                 TenantId = model.TenantId, | ||||||
|                 WorkAreaId =  model.WorkAreaID |                 WorkAreaId =  model.WorkAreaID | ||||||
| 
 | 
 | ||||||
|             }; |             }; | ||||||
|  | |||||||
| @ -5,11 +5,10 @@ namespace Marco.Pms.Model.Mapper | |||||||
| { | { | ||||||
|     public static class InquiryMapper |     public static class InquiryMapper | ||||||
|     { |     { | ||||||
|         public static Inquiries ToInquiriesFromInquiriesDto(this InquiryDto inquiryDto) |         public static Inquiries ToInquiriesFromInquiriesDto(this InquiryDto inquiryDto) { | ||||||
|         { |  | ||||||
|             return new Inquiries |             return new Inquiries | ||||||
|             { |             { | ||||||
|                 Id = Guid.Empty, |                 Id = 0, | ||||||
|                 OrganizatioinName = inquiryDto.OrganizatioinName, |                 OrganizatioinName = inquiryDto.OrganizatioinName, | ||||||
|                 OragnizationSize = inquiryDto.OragnizationSize, |                 OragnizationSize = inquiryDto.OragnizationSize, | ||||||
|                 IndustryId = inquiryDto.IndustryId, |                 IndustryId = inquiryDto.IndustryId, | ||||||
| @ -20,7 +19,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static InquiryEmailObject ToInquiryEmailObjectFromInquiriesDto(this InquiryDto inquiryDto, string industryName) |         public static InquiryEmailObject ToInquiryEmailObjectFromInquiriesDto(this InquiryDto inquiryDto,string industryName) | ||||||
|         { |         { | ||||||
|             return new InquiryEmailObject |             return new InquiryEmailObject | ||||||
|             { |             { | ||||||
|  | |||||||
| @ -1,31 +0,0 @@ | |||||||
| using Marco.Pms.Model.Dtos.Master; |  | ||||||
| using Marco.Pms.Model.Master; |  | ||||||
| using Marco.Pms.Model.ViewModels.Master; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Mapper |  | ||||||
| { |  | ||||||
|     public static class MasterMapper |  | ||||||
|     { |  | ||||||
|         // --------------------------------  Work Category  -------------------------------- |  | ||||||
|         public static WorkCategoryMaster ToWorkCategoryMasterFromWorkCategoryMasterDto(this WorkCategoryMasterDto categoryMasterDto, Guid tenantId) |  | ||||||
|         { |  | ||||||
|             return new WorkCategoryMaster |  | ||||||
|             { |  | ||||||
|                 Id = categoryMasterDto.Id ?? Guid.Empty, |  | ||||||
|                 Name = categoryMasterDto.Name, |  | ||||||
|                 Description = categoryMasterDto.Description ?? "", |  | ||||||
|                 TenantId = tenantId |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|         public static WorkCategoryMasterVM ToWorkCategoryMasterVMFromWorkCategoryMaster(this WorkCategoryMaster categoryMaster) |  | ||||||
|         { |  | ||||||
|             return new WorkCategoryMasterVM |  | ||||||
|             { |  | ||||||
|                 Id = categoryMaster.Id, |  | ||||||
|                 Name = categoryMaster.Name, |  | ||||||
|                 Description = categoryMaster.Description ?? "", |  | ||||||
|                 IsSystem = categoryMaster.IsSystem |  | ||||||
|             }; |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -1,6 +1,6 @@ | |||||||
| using Marco.Pms.Model.Dtos.Project; | using Marco.Pms.Model.Dtos.Project; | ||||||
| using Marco.Pms.Model.Projects; | using Marco.Pms.Model.Projects; | ||||||
| using Marco.Pms.Model.ViewModels.Projects; | using Marco.Pms.Model.ViewModels; | ||||||
| 
 | 
 | ||||||
| namespace Marco.Pms.Model.Mapper | namespace Marco.Pms.Model.Mapper | ||||||
| { | { | ||||||
| @ -16,11 +16,12 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 Name = projectModel.Name, |                 Name = projectModel.Name, | ||||||
|                 EndDate = projectModel.EndDate, |                 EndDate = projectModel.EndDate, | ||||||
|                 StartDate = projectModel.StartDate, |                 StartDate = projectModel.StartDate, | ||||||
|  |                 TenantId = projectModel.TenantId, | ||||||
|                 ProjectStatusId = projectModel.ProjectStatusId |                 ProjectStatusId = projectModel.ProjectStatusId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static Project ToProjectFromCreateProjectDto(this CreateProjectDto projectModel, Guid TenantId) |         public static Project ToProjectFromCreateProjectDto(this CreateProjectDto projectModel, int TenantId) | ||||||
|         { |         { | ||||||
|             return new Project |             return new Project | ||||||
|             { |             { | ||||||
| @ -34,7 +35,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static Project ToProjectFromUpdateProjectDto(this UpdateProjectDto projectModel, Guid TenantId, Guid id) |         public static Project ToProjectFromUpdateProjectDto(this UpdateProjectDto projectModel, int TenantId,int id) | ||||||
|         { |         { | ||||||
|             return new Project |             return new Project | ||||||
|             { |             { | ||||||
| @ -49,7 +50,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static ProjectAllocation ToProjectAllocationFromProjectAllocationDto(this ProjectAllocationDot model, Guid TenantId) |         public static ProjectAllocation ToProjectAllocationFromProjectAllocationDto(this ProjectAllocationDot model, int TenantId) | ||||||
|         { |         { | ||||||
|             return new ProjectAllocation |             return new ProjectAllocation | ||||||
|             { |             { | ||||||
| @ -72,6 +73,7 @@ namespace Marco.Pms.Model.Mapper | |||||||
|                 ContactPerson = project.ContactPerson, |                 ContactPerson = project.ContactPerson, | ||||||
|                 StartDate = project.StartDate, |                 StartDate = project.StartDate, | ||||||
|                 EndDate = project.EndDate, |                 EndDate = project.EndDate, | ||||||
|  |                 TenantId = project.TenantId | ||||||
|             }; |             }; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -1,14 +0,0 @@ | |||||||
| using Marco.Pms.Model.Utilities; |  | ||||||
| 
 |  | ||||||
| namespace Marco.Pms.Model.Master |  | ||||||
| { |  | ||||||
|     public class ActivityMaster : TenantRelation |  | ||||||
|     { |  | ||||||
|         public Guid Id { get; set; } |  | ||||||
|         public string? ActivityName { get; set; } |  | ||||||
| 
 |  | ||||||
|         public string? UnitOfMeasurement { get; set; } |  | ||||||
| 
 |  | ||||||
|         public bool IsActive { get; set; } = true; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user