Converte all Ids from Integer to Guid #33
@ -1,4 +1,5 @@
|
||||
using Marco.Pms.Model.Activities;
|
||||
using System.Globalization;
|
||||
using Marco.Pms.Model.Activities;
|
||||
using Marco.Pms.Model.AttendanceModule;
|
||||
using Marco.Pms.Model.Authentication;
|
||||
using Marco.Pms.Model.DocumentManager;
|
||||
@ -95,48 +96,48 @@ namespace Marco.Pms.DataAccess.Data
|
||||
|
||||
ManageApplicationStructure(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<ApplicationRole>().HasData(
|
||||
new ApplicationRole
|
||||
{
|
||||
Id = new Guid("2c8d0808-c421-11ef-9b93-0242ac110002"),
|
||||
Role = "Admin",
|
||||
Description = "",
|
||||
TenantId = 1
|
||||
},
|
||||
new ApplicationRole
|
||||
{
|
||||
Id = new Guid("62e0918d-c421-11ef-9b93-0242ac110002"),
|
||||
Role = "Welder",
|
||||
Description = "",
|
||||
//modelBuilder.Entity<ApplicationRole>().HasData(
|
||||
// new ApplicationRole
|
||||
// {
|
||||
// Id = new Guid("2c8d0808-c421-11ef-9b93-0242ac110002"),
|
||||
// Role = "Super User",
|
||||
// Description = "Super User",
|
||||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
// },
|
||||
// new ApplicationRole
|
||||
// {
|
||||
// Id = new Guid("62e0918d-c421-11ef-9b93-0242ac110002"),
|
||||
// Role = "Welder",
|
||||
// Description = "",
|
||||
|
||||
TenantId = 1
|
||||
},
|
||||
new ApplicationRole
|
||||
{
|
||||
Id = new Guid("68823f1f-c421-11ef-9b93-0242ac110002"),
|
||||
Role = "Helper",
|
||||
Description = "",
|
||||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
// },
|
||||
// new ApplicationRole
|
||||
// {
|
||||
// Id = new Guid("68823f1f-c421-11ef-9b93-0242ac110002"),
|
||||
// Role = "Helper",
|
||||
// Description = "",
|
||||
|
||||
TenantId = 1
|
||||
},
|
||||
new ApplicationRole
|
||||
{
|
||||
Id = new Guid("6d3a7c72-c421-11ef-9b93-0242ac110002"),
|
||||
Role = "Site Engineer",
|
||||
Description = "",
|
||||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
// },
|
||||
// new ApplicationRole
|
||||
// {
|
||||
// Id = new Guid("6d3a7c72-c421-11ef-9b93-0242ac110002"),
|
||||
// Role = "Site Engineer",
|
||||
// Description = "",
|
||||
|
||||
TenantId = 1
|
||||
}
|
||||
,
|
||||
new ApplicationRole
|
||||
{
|
||||
Id = new Guid("6d3aad72-c421-11ef-9b93-0242ac110002"),
|
||||
Role = "Project Manager",
|
||||
Description = "",
|
||||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
// }
|
||||
// ,
|
||||
// new ApplicationRole
|
||||
// {
|
||||
// Id = new Guid("6d3aad72-c421-11ef-9b93-0242ac110002"),
|
||||
// Role = "Project Manager",
|
||||
// Description = "",
|
||||
|
||||
TenantId = 1
|
||||
}
|
||||
);
|
||||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
// }
|
||||
// );
|
||||
|
||||
modelBuilder.Entity<RefreshToken>(entity =>
|
||||
{
|
||||
@ -148,60 +149,66 @@ namespace Marco.Pms.DataAccess.Data
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Tenant>().HasData(
|
||||
new Tenant { Id = 1, Name = "MarcoBMS", ContactName = "Admin", ContactNumber = "123456789", Description = "", DomainName = "www.marcobms.org", IndustryId = 1, OnBoardingDate = DateTime.MinValue }
|
||||
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 }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<StatusMaster>().HasData(
|
||||
new StatusMaster
|
||||
{
|
||||
Id = 1,
|
||||
Id = new Guid("b74da4c2-d07e-46f2-9919-e75e49b12731"),
|
||||
Status = "Active",
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new StatusMaster
|
||||
{
|
||||
Id = 2,
|
||||
Id = new Guid("603e994b-a27f-4e5d-a251-f3d69b0498ba"),
|
||||
Status = "In Progress",
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new StatusMaster
|
||||
{
|
||||
Id = 3,
|
||||
Id = new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"),
|
||||
Status = "On Hold",
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new StatusMaster
|
||||
{
|
||||
Id = 4,
|
||||
Id = new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"),
|
||||
Status = "Completed",
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
modelBuilder.Entity<Project>().HasData(
|
||||
new Project
|
||||
{
|
||||
Id = 1,
|
||||
Id = new Guid("85bf587b-7ca9-4685-b77c-d817f5847e85"),
|
||||
Name = "Project 1",
|
||||
ProjectAddress = "Project 1 Address",
|
||||
ContactPerson = "Project 1 Contact Person",
|
||||
ProjectStatusId = 1,
|
||||
TenantId = 1
|
||||
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("b74da4c2-d07e-46f2-9919-e75e49b12731"),
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new Project
|
||||
{
|
||||
Id = 2,
|
||||
Id = new Guid("3ef56a12-f5e5-4193-87d6-9e110ed10b86"),
|
||||
Name = "Project 2",
|
||||
ProjectAddress = "Project 2 Address",
|
||||
ContactPerson = "Project 2 Contact Person",
|
||||
ProjectStatusId = 2,
|
||||
TenantId = 1
|
||||
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("ef1c356e-0fe0-42df-a5d3-8daee355492d"),
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new Project
|
||||
{
|
||||
Id = 3,
|
||||
Id = new Guid("54d013e3-0a2b-48be-85c7-5ef03492a18c"),
|
||||
Name = "Project 3",
|
||||
ProjectAddress = "Project 3 Address",
|
||||
ContactPerson = "Project 3 Contact Person",
|
||||
ProjectStatusId = 3,
|
||||
TenantId = 1
|
||||
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")
|
||||
});
|
||||
|
||||
|
||||
@ -211,100 +218,58 @@ namespace Marco.Pms.DataAccess.Data
|
||||
.HasData(
|
||||
new ActivityMaster
|
||||
{
|
||||
Id = 1,
|
||||
Id = new Guid("4117b7de-ef6c-461f-a2c2-64eaac5f9a11"),
|
||||
ActivityName = "Core Cutting",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 2,
|
||||
Id = new Guid("1714f64d-7591-4419-bee5-118d21bb2855"),
|
||||
ActivityName = "Fabrication",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 3,
|
||||
ActivityName = "Lifting",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
|
||||
TenantId = 1
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 4,
|
||||
ActivityName = "Hanging",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
|
||||
TenantId = 1
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 5,
|
||||
ActivityName = "Tapping",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
|
||||
TenantId = 1
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 6,
|
||||
Id = new Guid("b3f51a93-dde6-45f9-8b22-f1bf017a640b"),
|
||||
ActivityName = "Welding",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 7,
|
||||
ActivityName = "Testing",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Area.ToString(),
|
||||
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,
|
||||
Id = new Guid("53eedf44-4076-445f-be93-fedef17117e7"),
|
||||
ActivityName = "MS Support Fabrication",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 12,
|
||||
Id = new Guid("715b9ddb-d9e2-4afa-8987-d9918905cea4"),
|
||||
ActivityName = "MS Support Hanging",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 13,
|
||||
Id = new Guid("a3d191a7-a5aa-4dd8-a525-12c99263bbd6"),
|
||||
ActivityName = "Hydrant Volve",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new ActivityMaster
|
||||
{
|
||||
Id = 14,
|
||||
Id = new Guid("c138a7de-713a-4bd4-8292-b0b265be77a3"),
|
||||
ActivityName = "Sprinkler Installation",
|
||||
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
modelBuilder.Entity<Industry>().HasData(
|
||||
new Industry { Id = 1, Name = "Information Technology (IT) Services" },
|
||||
new Industry { Id = 2, Name = "Manufacturing & Production" },
|
||||
new Industry { Id = 3, Name = "Energy & Resources" },
|
||||
new Industry { Id = 4, Name = "Finance & Professional Services" },
|
||||
new Industry { Id = 5, Name = "Hospitals and Healthcare Services" },
|
||||
new Industry { Id = 6, Name = "Social Services" },
|
||||
new Industry { Id = 7, Name = "Retail & Consumer Services" },
|
||||
new Industry { Id = 8, Name = "Transportation & Logistics" },
|
||||
new Industry { Id = 9, Name = "Education & Training" }
|
||||
new Industry { Id = Guid.Parse("15436ee3-a650-469e-bfc2-59993f7514bb"), Name = "Information Technology (IT) Services" },
|
||||
new Industry { Id = Guid.Parse("0a63e657-2c5f-49b5-854b-42c978293154"), Name = "Manufacturing & Production" },
|
||||
new Industry { Id = Guid.Parse("bdc61e3b-69ea-4394-bab6-079ec135b5bd"), Name = "Energy & Resources" },
|
||||
new Industry { Id = Guid.Parse("5ca200ac-00d7-415e-a410-b948e27ac9d2"), Name = "Finance & Professional Services" },
|
||||
new Industry { Id = Guid.Parse("d5621700-cd87-441f-8cdb-6051ddfc83b4"), Name = "Hospitals and Healthcare Services" },
|
||||
new Industry { Id = Guid.Parse("23608891-657e-40f0-bbd4-2b0a2ec1a76f"), Name = "Social Services" },
|
||||
new Industry { Id = Guid.Parse("a493f4e3-16b1-4411-be3c-6bf2987a3168"), Name = "Retail & Consumer Services" },
|
||||
new Industry { Id = Guid.Parse("e9d8ce92-9371-4ed9-9831-83c07f78edec"), Name = "Transportation & Logistics" },
|
||||
new Industry { Id = Guid.Parse("8a0d6134-2dbe-4e0a-b250-ff34cb7b9df0"), Name = "Education & Training" }
|
||||
|
||||
);
|
||||
modelBuilder.Entity<TicketStatusMaster>().HasData(
|
||||
@ -315,7 +280,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Description = "This is a newly created issue.",
|
||||
ColorCode = "#FFCC99",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketStatusMaster
|
||||
{
|
||||
@ -324,7 +289,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Description = "Assigned to employee or team of employees",
|
||||
ColorCode = "#E6FF99",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketStatusMaster
|
||||
{
|
||||
@ -333,7 +298,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Description = "These issues are currently in progress",
|
||||
ColorCode = "#99E6FF",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketStatusMaster
|
||||
{
|
||||
@ -342,7 +307,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Description = "These issues are currently under review",
|
||||
ColorCode = "#6c757d",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketStatusMaster
|
||||
{
|
||||
@ -351,7 +316,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Description = "The following issues are resolved and closed",
|
||||
ColorCode = "#B399FF",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
modelBuilder.Entity<TicketTypeMaster>().HasData(
|
||||
@ -361,7 +326,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Name = "Quality Issue",
|
||||
Description = "An identified problem that affects the performance, reliability, or standards of a product or service",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketTypeMaster
|
||||
{
|
||||
@ -369,7 +334,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Name = "Help Desk",
|
||||
Description = "A support service that assists users with technical issues, requests, or inquiries.",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
modelBuilder.Entity<TicketPriorityMaster>().HasData(
|
||||
@ -380,7 +345,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
ColorCode = "008000",
|
||||
Level = 1,
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketPriorityMaster
|
||||
{
|
||||
@ -389,7 +354,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
ColorCode = "FFFF00",
|
||||
Level = 2,
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new TicketPriorityMaster
|
||||
{
|
||||
Id = new Guid("a13b7e59-16fd-4665-b5cf-a97399e8445a"),
|
||||
@ -397,7 +362,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
ColorCode = "#FFA500",
|
||||
Level = 3,
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}, new TicketPriorityMaster
|
||||
{
|
||||
Id = new Guid("f340fbc3-c9fd-46aa-b063-0093418830e4"),
|
||||
@ -405,7 +370,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
ColorCode = "#FFA500",
|
||||
Level = 4,
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketPriorityMaster
|
||||
{
|
||||
@ -414,7 +379,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
ColorCode = "#FF0000",
|
||||
Level = 5,
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
modelBuilder.Entity<TicketTagMaster>().HasData(
|
||||
@ -424,7 +389,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Name = "Quality Issue",
|
||||
ColorCode = "#e59866",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new TicketTagMaster
|
||||
{
|
||||
@ -432,7 +397,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Name = "Help Desk",
|
||||
ColorCode = "#85c1e9",
|
||||
IsDefault = true,
|
||||
TenantId = 1
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -463,19 +428,19 @@ namespace Marco.Pms.DataAccess.Data
|
||||
|
||||
modelBuilder.Entity<Module>().HasData(new Module
|
||||
{
|
||||
Id = 1,
|
||||
Id = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"),
|
||||
Name = "Project",
|
||||
Description = "Project Module",
|
||||
Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02"
|
||||
}, new Module
|
||||
{
|
||||
Id = 2,
|
||||
Id = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"),
|
||||
Name = "Employee",
|
||||
Description = "Employee Module",
|
||||
Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637"
|
||||
}, new Module
|
||||
{
|
||||
Id = 3,
|
||||
Id = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
|
||||
Name = "Masters",
|
||||
Description = "Masters Module",
|
||||
Key = "504ec132-e6a9-422f-8f85-050602cfce05"
|
||||
@ -484,19 +449,19 @@ namespace Marco.Pms.DataAccess.Data
|
||||
|
||||
|
||||
modelBuilder.Entity<Feature>().HasData(
|
||||
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 = 1, IsActive = true },
|
||||
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("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("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Manage Tasks", 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("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("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("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 = 2, 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("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), 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 = 3, 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("660131a4-788c-4739-a082-cbbf7879cbf2"), Description = "Tenant Masters", Name = "Tenant Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<FeaturePermission>().HasData(
|
||||
|
@ -62,7 +62,7 @@ namespace Marco.Pms.DataAccess.Initializer
|
||||
// State = "State",
|
||||
// Postalcode = "1234567890",
|
||||
// City = "City",
|
||||
TenantId = 1,
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26"),
|
||||
IsRootUser = true,
|
||||
|
||||
}, "User@123").GetAwaiter().GetResult();
|
||||
|
@ -12,13 +12,6 @@
|
||||
<None Remove="Repository\**" />
|
||||
</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>
|
||||
<ProjectReference Include="..\Marco.Pms.Model\Marco.Pms.Model.csproj" />
|
||||
<ProjectReference Include="..\Marco.Pms.Utility\Marco.Pms.Utility.csproj" />
|
||||
@ -32,8 +25,4 @@
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,135 +0,0 @@
|
||||
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
@ -1,543 +0,0 @@
|
||||
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
@ -1,37 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,131 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,984 +0,0 @@
|
||||
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
@ -1,37 +0,0 @@
|
||||
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
@ -1,48 +0,0 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,376 +0,0 @@
|
||||
using System;
|
||||
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 Added_Forum_Tables : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Documents",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
BatchId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
FileName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
S3Key = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ThumbS3Key = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Base64Data = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
FileSize = table.Column<long>(type: "bigint", nullable: false),
|
||||
ContentType = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
UploadedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Documents", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Documents_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TicketComments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
AuthorId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
MessageText = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
SentAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
ParentMessageId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TicketComments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_TicketComments_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TicketPriorityMasters",
|
||||
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"),
|
||||
Level = table.Column<int>(type: "int", nullable: false),
|
||||
ColorCode = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsDefault = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TicketPriorityMasters", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TicketStatusMasters",
|
||||
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: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ColorCode = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsDefault = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TicketStatusMasters", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TicketTagMasters",
|
||||
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"),
|
||||
ColorCode = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false),
|
||||
IsDefault = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TicketTagMasters", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TicketTypeMasters",
|
||||
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: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsDefault = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TicketTypeMasters", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Tickets",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Subject = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
CreatedById = table.Column<int>(type: "int", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
LinkedActivityId = table.Column<int>(type: "int", nullable: false),
|
||||
PriorityId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Tickets", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Tickets_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Tickets_TicketPriorityMasters_PriorityId",
|
||||
column: x => x.PriorityId,
|
||||
principalTable: "TicketPriorityMasters",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Tickets_TicketStatusMasters_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "TicketStatusMasters",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Tickets_TicketTypeMasters_TypeId",
|
||||
column: x => x.TypeId,
|
||||
principalTable: "TicketTypeMasters",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TicketAttachments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
CommentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
FileName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
FileId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TicketAttachments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_TicketAttachments_TicketComments_CommentId",
|
||||
column: x => x.CommentId,
|
||||
principalTable: "TicketComments",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_TicketAttachments_Tickets_TicketId",
|
||||
column: x => x.TicketId,
|
||||
principalTable: "Tickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TicketTags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
TicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TicketTags", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_TicketTags_TicketTagMasters_TagId",
|
||||
column: x => x.TagId,
|
||||
principalTable: "TicketTagMasters",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_TicketTags_Tickets_TicketId",
|
||||
column: x => x.TicketId,
|
||||
principalTable: "Tickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "TicketPriorityMasters",
|
||||
columns: new[] { "Id", "ColorCode", "IsDefault", "Level", "Name", "TenantId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("0919bc84-9f82-4ecf-98c7-962755dd9a97"), "FFFF00", true, 2, "Medium", 1 },
|
||||
{ new Guid("188d29b3-10f3-42d0-9587-1a46ae7a0320"), "008000", true, 1, "Low", 1 },
|
||||
{ new Guid("44a7b91d-a0dd-45d1-8616-4d2f71e16401"), "#FF0000", true, 5, "Urgent", 1 },
|
||||
{ new Guid("a13b7e59-16fd-4665-b5cf-a97399e8445a"), "#FFA500", true, 3, "High", 1 },
|
||||
{ new Guid("f340fbc3-c9fd-46aa-b063-0093418830e4"), "#FFA500", true, 4, "Critical", 1 }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "TicketStatusMasters",
|
||||
columns: new[] { "Id", "ColorCode", "Description", "IsDefault", "Name", "TenantId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("5c72b630-6923-4215-bf2c-b1622afd76e7"), "#6c757d", "These issues are currently under review", true, "In Review", 1 },
|
||||
{ new Guid("6b0c409b-3e80-4165-8b39-f3fcacb4c797"), "#FFCC99", "This is a newly created issue.", true, "New", 1 },
|
||||
{ new Guid("6c5ac37d-5b7d-40f3-adec-2dabaa5cca86"), "#E6FF99", "Assigned to employee or team of employees", true, "Assigned", 1 },
|
||||
{ new Guid("7f96bcd5-0c66-411b-8a1d-9d1a4785194e"), "#99E6FF", "These issues are currently in progress", true, "In Progress", 1 },
|
||||
{ new Guid("8ff85685-a875-4f21-aa95-d99551315fcc"), "#B399FF", "The following issues are resolved and closed", true, "Done", 1 }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "TicketTagMasters",
|
||||
columns: new[] { "Id", "ColorCode", "IsDefault", "Name", "TenantId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("5a168569-8ad7-4422-8db6-51ef25caddeb"), "#85c1e9", true, "Help Desk", 1 },
|
||||
{ new Guid("ef6c2a65-f61d-4537-9650-a7ab7f8d98db"), "#e59866", true, "Quality Issue", 1 }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "TicketTypeMasters",
|
||||
columns: new[] { "Id", "Description", "IsDefault", "Name", "TenantId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("c74e5480-2b71-483c-8f4a-1a9c69c32603"), "An identified problem that affects the performance, reliability, or standards of a product or service", true, "Quality Issue", 1 },
|
||||
{ new Guid("d1f55eab-9898-4e46-9f03-b263e33e5d38"), "A support service that assists users with technical issues, requests, or inquiries.", true, "Help Desk", 1 }
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Documents_TenantId",
|
||||
table: "Documents",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TicketAttachments_CommentId",
|
||||
table: "TicketAttachments",
|
||||
column: "CommentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TicketAttachments_TicketId",
|
||||
table: "TicketAttachments",
|
||||
column: "TicketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TicketComments_TenantId",
|
||||
table: "TicketComments",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Tickets_PriorityId",
|
||||
table: "Tickets",
|
||||
column: "PriorityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Tickets_StatusId",
|
||||
table: "Tickets",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Tickets_TenantId",
|
||||
table: "Tickets",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Tickets_TypeId",
|
||||
table: "Tickets",
|
||||
column: "TypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TicketTags_TagId",
|
||||
table: "TicketTags",
|
||||
column: "TagId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TicketTags_TicketId",
|
||||
table: "TicketTags",
|
||||
column: "TicketId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Documents");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TicketAttachments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TicketTags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TicketComments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TicketTagMasters");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Tickets");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TicketPriorityMasters");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TicketStatusMasters");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TicketTypeMasters");
|
||||
}
|
||||
}
|
||||
}
|
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_In_Attendance_Log : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DocumentId",
|
||||
table: "AttendanceLogs",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AttendanceLogs_DocumentId",
|
||||
table: "AttendanceLogs",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AttendanceLogs_Documents_DocumentId",
|
||||
table: "AttendanceLogs",
|
||||
column: "DocumentId",
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AttendanceLogs_Documents_DocumentId",
|
||||
table: "AttendanceLogs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AttendanceLogs_DocumentId",
|
||||
table: "AttendanceLogs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DocumentId",
|
||||
table: "AttendanceLogs");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Made_BatchId_Nullable_In_Document : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "BatchId",
|
||||
table: "Documents",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "BatchId",
|
||||
table: "Documents",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Made_ComentId_Nullable_In_TicketAttachment : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TicketAttachments_TicketComments_CommentId",
|
||||
table: "TicketAttachments");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CommentId",
|
||||
table: "TicketAttachments",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TicketAttachments_TicketComments_CommentId",
|
||||
table: "TicketAttachments",
|
||||
column: "CommentId",
|
||||
principalTable: "TicketComments",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TicketAttachments_TicketComments_CommentId",
|
||||
table: "TicketAttachments");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CommentId",
|
||||
table: "TicketAttachments",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TicketAttachments_TicketComments_CommentId",
|
||||
table: "TicketAttachments",
|
||||
column: "CommentId",
|
||||
principalTable: "TicketComments",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_ProjectId_Column_In_TicketForum_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "LinkedActivityId",
|
||||
table: "Tickets",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "LinkedProjectId",
|
||||
table: "Tickets",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LinkedProjectId",
|
||||
table: "Tickets");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "LinkedActivityId",
|
||||
table: "Tickets",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
{
|
||||
public class TaskAllocation
|
||||
public class TaskAllocation : TenantRelation
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
public DateTime AssignmentDate { get; set; }
|
||||
@ -24,20 +24,15 @@ namespace Marco.Pms.Model.Activities
|
||||
//[ValidateNever]
|
||||
//public WorkItemMapping? WorkItemMapping { get; set; }
|
||||
|
||||
public int AssignedBy { get; set; } //Employee Id
|
||||
public Guid AssignedBy { get; set; } //Employee Id
|
||||
[ForeignKey("AssignedBy")]
|
||||
[ValidateNever]
|
||||
public Employee? Employee { get; set; }
|
||||
|
||||
public int WorkItemId { get; set; }
|
||||
public Guid WorkItemId { get; set; }
|
||||
[ForeignKey("WorkItemId")]
|
||||
[ValidateNever]
|
||||
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
|
||||
{
|
||||
public class TaskComment : TenantTest
|
||||
public class TaskComment : TenantRelation
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public long TaskAllocationId { get; set; }
|
||||
public Guid TaskAllocationId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TaskAllocationId))]
|
||||
public TaskAllocation? TaskAllocation { get; set; }
|
||||
|
||||
public DateTime CommentDate { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public int CommentedBy { get; set; }
|
||||
public Guid CommentedBy { get; set; }
|
||||
[ForeignKey("CommentedBy")]
|
||||
[ValidateNever]
|
||||
public Employee? Employee { get; set; }
|
||||
|
@ -1,13 +1,13 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
{
|
||||
public class TaskImages
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public long TaskAllocationId { get; set; }
|
||||
public Guid TaskAllocationId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TaskAllocationId))]
|
||||
public TaskAllocation? TaskAllocation { get; set; }
|
||||
|
@ -1,27 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
{
|
||||
public class TaskMembers
|
||||
public class TaskMembers : TenantRelation
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public long TaskAllocationId { get; set; }
|
||||
public Guid TaskAllocationId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TaskAllocationId))]
|
||||
public TaskAllocation? TaskAllocation { get; set; }
|
||||
|
||||
public int EmployeeId { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
[ForeignKey("EmployeeId")]
|
||||
[ValidateNever]
|
||||
public Employee? Employee { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +1,20 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Dtos.Attendance;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.AttendanceModule
|
||||
{
|
||||
public class Attendance
|
||||
public class Attendance : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public int EmployeeID { get; set; }
|
||||
public Guid EmployeeID { get; set; }
|
||||
|
||||
|
||||
public DateTime Date { get; set; }
|
||||
public int ProjectID { get; set; }
|
||||
public Guid ProjectID { get; set; }
|
||||
|
||||
public DateTime AttendanceDate { get; set; }
|
||||
public DateTime? InTime { get; set; }
|
||||
@ -27,13 +26,5 @@ namespace Marco.Pms.Model.AttendanceModule
|
||||
[ForeignKey("EmployeeID")]
|
||||
[ValidateNever]
|
||||
public Employee? Approver { get; set; }
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.DocumentManager;
|
||||
using Marco.Pms.Model.Dtos.Attendance;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
|
||||
namespace Marco.Pms.Model.AttendanceModule
|
||||
{
|
||||
public class AttendanceLog
|
||||
public class AttendanceLog : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public int AttendanceId { get; set; }
|
||||
public Guid AttendanceId { get; set; }
|
||||
[ForeignKey("AttendanceId")]
|
||||
[ValidateNever]
|
||||
public Attendance? Attendance { get; set; }
|
||||
|
||||
public int EmployeeID { get; set; }
|
||||
public Guid EmployeeID { get; set; }
|
||||
[ForeignKey("EmployeeID")]
|
||||
[ValidateNever]
|
||||
public Employee? Employee { get; set; }
|
||||
@ -37,7 +36,7 @@ namespace Marco.Pms.Model.AttendanceModule
|
||||
|
||||
public DateTime UpdatedOn { get; set; }
|
||||
|
||||
public int? UpdatedBy { get; set; }
|
||||
public Guid? UpdatedBy { get; set; }
|
||||
[ForeignKey("UpdatedBy")]
|
||||
[ValidateNever]
|
||||
public Employee? UpdatedByEmployee { get; set; }
|
||||
@ -47,10 +46,5 @@ namespace Marco.Pms.Model.AttendanceModule
|
||||
[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 int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? Token { get; set; }
|
||||
public string? UserId { get; set; }
|
||||
public DateTime ExpiryDate { get; set; }
|
||||
|
@ -1,10 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.DocumentManager
|
||||
{
|
||||
public class Document
|
||||
public class Document : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid? BatchId { get; set; }
|
||||
@ -23,11 +21,5 @@ namespace Marco.Pms.Model.DocumentManager
|
||||
public long FileSize { get; set; }
|
||||
public string ContentType { get; set; } = string.Empty;
|
||||
public DateTime UploadedAt { get; set; }
|
||||
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
public DateTime AssignmentDate { get; set; }
|
||||
public double PlannedTask { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public List<int>? TaskTeam { get; set; } //Employee Ids
|
||||
public int WorkItemId { get; set; }
|
||||
public List<Guid>? TaskTeam { get; set; } //Employee Ids
|
||||
public Guid WorkItemId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class CreateCheckListDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public bool IsMandatory { get; set; }
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class CreateCommentDto
|
||||
{
|
||||
public long TaskAllocationId { get; set; }
|
||||
public Guid TaskAllocationId { get; set; }
|
||||
|
||||
public DateTime CommentDate { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class ReportCheckListDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public bool IsMandatory { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class ReportTaskDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public double CompletedTask { get; set; }
|
||||
public DateTime ReportedDate { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
|
@ -4,10 +4,10 @@ namespace Marco.Pms.Model.Dtos.Attendance
|
||||
{
|
||||
public class RecordAttendanceDot
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public int EmployeeID { get; set; }
|
||||
public int ProjectID { get; set; }
|
||||
public Guid EmployeeID { get; set; }
|
||||
public Guid ProjectID { get; set; }
|
||||
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Employees
|
||||
{
|
||||
@ -32,7 +31,7 @@ namespace Marco.Pms.Model.Dtos.Employees
|
||||
|
||||
public Guid RoleId { get; set; }
|
||||
|
||||
public int TenantId { get; set; }
|
||||
public Guid TenantId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class CreateUserDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public string? MiddleName { get; set; }
|
||||
@ -26,13 +26,13 @@
|
||||
//public IFormFile? Photo { get; set; } // To store the captured photo
|
||||
//public List<IFormFile>? Documents { get; set; }
|
||||
|
||||
public string? JobRoleId { get; set; }
|
||||
public Guid? JobRoleId { get; set; }
|
||||
|
||||
// public int TenantId { get; set; }
|
||||
}
|
||||
public class CreateQuickUserDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
public string? EmergencyPhoneNumber { get; set; }
|
||||
public string? EmergencyContactPerson { get; set; }
|
||||
|
||||
public string? JobRoleId { get; set; }
|
||||
public Guid? JobRoleId { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
{
|
||||
|
||||
public string Id { get; set; } = string.Empty;
|
||||
public int EmployeeId { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
public Guid RoleId { get; set; }
|
||||
public bool IsEnabled { get; set; }
|
||||
}
|
||||
|
@ -6,10 +6,10 @@
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid StatusId { get; set; }
|
||||
public Guid TypeId { get; set; } // QualityIssue, HelpDesk, Feedback
|
||||
public int CreatedById { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public int LinkedProjectId { get; set; }
|
||||
public int? LinkedActivityId { get; set; } // task or project ID
|
||||
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; }
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class ForumAttachmentDto
|
||||
{
|
||||
public Guid TicketId { get; set; } = Guid.Empty;
|
||||
public Guid? TicketId { get; set; }
|
||||
public Guid? CommentId { get; set; }
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public string? Base64Data { get; set; }
|
||||
|
@ -2,11 +2,10 @@
|
||||
{
|
||||
public class TicketPriorityMasterDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
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; }
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,10 @@
|
||||
{
|
||||
public class TicketStatusMasterDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
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
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,9 @@
|
||||
{
|
||||
public class TicketTagMasterDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty; // e.g., "Bug", "UI", "Urgent"
|
||||
public string? ColorCode { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public bool IsDefault { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,9 @@
|
||||
{
|
||||
public class TicketTypeMasterDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
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
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -7,13 +7,12 @@
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid StatusId { get; set; }
|
||||
public Guid TypeId { get; set; } // QualityIssue, HelpDesk, Feedback
|
||||
public int CreatedById { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public int LinkedProjectId { get; set; }
|
||||
public int? LinkedActivityId { get; set; } // task or project ID
|
||||
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; }
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -6,14 +6,11 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public class BuildingDot
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
[Required]
|
||||
[DisplayName("Building Name")]
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public int ProjectId { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class BuildingVM
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
@ -5,7 +5,6 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class CreateProjectDto
|
||||
{
|
||||
//public int Id { get; set; }
|
||||
[Required(ErrorMessage = "Project Name is required!")]
|
||||
[DisplayName("Project Name")]
|
||||
public string? Name { get; set; }
|
||||
@ -24,8 +23,6 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
|
||||
[DisplayName("Project Status")]
|
||||
[Required(ErrorMessage = "Project Status is required!")]
|
||||
public int ProjectStatusId { get; set; }
|
||||
|
||||
public int TenantId { get; set; }
|
||||
public Guid ProjectStatusId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -5,17 +5,14 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class FloorDot
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[DisplayName("Floor Name")]
|
||||
public string? FloorName { get; set; }
|
||||
|
||||
|
||||
public int BuildingId { get; set; }
|
||||
public Guid BuildingId { get; set; }
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class FloorsVM
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[DisplayName("Floor Name")]
|
||||
|
@ -2,9 +2,9 @@
|
||||
{
|
||||
public class ProjectAllocationDot
|
||||
{
|
||||
public int EmpID { get; set; }
|
||||
public int JobRoleId { get; set; }
|
||||
public int ProjectId { get; set; }
|
||||
public Guid EmpID { get; set; }
|
||||
public Guid JobRoleId { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
public bool Status { get; set; }
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class ProjectDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
[Required(ErrorMessage = "Project Name is required!")]
|
||||
[DisplayName("Project Name")]
|
||||
public string? Name { get; set; }
|
||||
@ -24,8 +24,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
|
||||
[DisplayName("Project Status")]
|
||||
[Required(ErrorMessage = "Project Status is required!")]
|
||||
public int ProjectStatusId { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public Guid ProjectStatusId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class UpdateProjectDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
[Required(ErrorMessage = "Project Name is required!")]
|
||||
[DisplayName("Project Name")]
|
||||
public string? Name { get; set; }
|
||||
@ -24,8 +24,6 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
|
||||
[DisplayName("Project Status")]
|
||||
[Required(ErrorMessage = "Project Status is required!")]
|
||||
public int ProjectStatusId { get; set; }
|
||||
|
||||
public int TenantId { get; set; }
|
||||
public Guid ProjectStatusId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -6,16 +6,13 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public class WorkAreaDot
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[DisplayName("Area Name")]
|
||||
public string? AreaName { get; set; }
|
||||
|
||||
public int FloorId { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
public Guid FloorId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class WorkAreaVM
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[DisplayName("Area Name")]
|
||||
|
@ -5,12 +5,11 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public class WorkItemDot
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public int WorkAreaID { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public Guid WorkAreaID { get; set; }
|
||||
|
||||
public int ActivityID { get; set; }
|
||||
public Guid ActivityID { get; set; }
|
||||
public int PlannedWork { get; set; }
|
||||
public int CompletedWork { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class WorkItemVM
|
||||
{
|
||||
public int WorkItemId { get; set; }
|
||||
public Guid WorkItemId { get; set; }
|
||||
public WorkItem? WorkItem { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class UpdateJobRoleDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
public string? Email { get; set; }
|
||||
public string? About { get; set; }
|
||||
public string? OragnizationSize { get; set; }
|
||||
public int IndustryId { get; set; }
|
||||
public Guid IndustryId { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? ContactNumber { get; set; }
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
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
|
||||
{
|
||||
public class Employee
|
||||
public class Employee : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public string? MiddleName { get; set; }
|
||||
@ -35,19 +35,15 @@ namespace Marco.Pms.Model.Employees
|
||||
[ForeignKey("ApplicationUserId")]
|
||||
[ValidateNever]
|
||||
public ApplicationUser? ApplicationUser { get; set; }
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
public Guid RoleId { get; set; }
|
||||
//[ForeignKey(nameof(RoleId))]
|
||||
//public EmployeeRole EmployeeRole { get; set; }
|
||||
|
||||
public int? JobRoleId { get; set; }
|
||||
public Guid? JobRoleId { get; set; }
|
||||
[ForeignKey("JobRoleId")]
|
||||
[ValidateNever]
|
||||
public JobRole? JobRole { get; set; }
|
||||
|
@ -1,24 +1,16 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Employees
|
||||
{
|
||||
public class WorkShift
|
||||
public class WorkShift : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
[DisplayName("Shift Name")]
|
||||
public string? Name { get; set; }
|
||||
public TimeOnly StartTime { 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 int Id { get; set; }
|
||||
public int ActivityId { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public Guid ActivityId { get; set; }
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
public bool IsChecked { get; set; } = false;
|
||||
public bool IsMandatory { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public Guid TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +1,14 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class ActivityMaster
|
||||
public class ActivityMaster : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid 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;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
public string? Role { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public int TenantId { get; set; }
|
||||
public Guid TenantId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
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;
|
||||
using System.ComponentModel;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
@ -14,7 +10,7 @@ namespace Marco.Pms.Model.Entitlements
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
public Guid TenantId { get; set; }
|
||||
|
||||
public bool? IsRootUser { get; set; } = false;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
{
|
||||
public class CheckListMappings
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public long TaskAllocationId { get; set; }
|
||||
public int CheckListId { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public Guid TaskAllocationId { get; set; }
|
||||
public Guid CheckListId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class Tenant
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? DomainName { get; set; }
|
||||
@ -14,7 +14,7 @@ namespace Marco.Pms.Model.Entitlements
|
||||
public string? ContactNumber { get; set; }
|
||||
public DateTime OnBoardingDate { get; set; }
|
||||
public string? OragnizationSize { get; set; }
|
||||
public int? IndustryId { get;set; }
|
||||
public Guid? IndustryId { get; set; }
|
||||
|
||||
[ForeignKey("IndustryId")]
|
||||
[ValidateNever]
|
||||
|
@ -1,13 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class EmployeeRoleMapping
|
||||
public class EmployeeRoleMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(EmployeeId))]
|
||||
public Employee? Employee { get; set; } // Navigation property to Employee
|
||||
@ -19,11 +20,6 @@ namespace Marco.Pms.Model.Entitlements
|
||||
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class Feature
|
||||
{
|
||||
public Guid Id { get; set; } // Unique identifier for the feature
|
||||
public int ModuleId { get; set; }
|
||||
public Guid ModuleId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(ModuleId))]
|
||||
public Module? Module { get; set; }
|
||||
|
@ -1,17 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class JobRole
|
||||
public class JobRole : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid 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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace Marco.Pms.Model.Entitlements
|
||||
Key = Guid.NewGuid().ToString();
|
||||
}
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public string? Name { get; set; }
|
||||
|
@ -1,19 +1,11 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class StatusMaster
|
||||
public class StatusMaster : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid 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,11 +1,8 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Forum
|
||||
{
|
||||
public class TicketComment
|
||||
public class TicketComment : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid TicketId { get; set; }
|
||||
@ -16,12 +13,5 @@ namespace Marco.Pms.Model.Forum
|
||||
|
||||
public ICollection<TicketAttachment>? Attachments { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Forum
|
||||
{
|
||||
public class TicketForum
|
||||
public class TicketForum : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
@ -18,11 +17,11 @@ namespace Marco.Pms.Model.Forum
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TypeId))]
|
||||
public TicketTypeMaster? TicketTypeMaster { get; set; }
|
||||
public int CreatedById { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
public int LinkedProjectId { get; set; }
|
||||
public int? LinkedActivityId { get; set; } // task or project ID
|
||||
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
|
||||
@ -33,14 +32,6 @@ namespace Marco.Pms.Model.Forum
|
||||
public TicketPriorityMaster? Priority { get; set; }
|
||||
|
||||
//public ICollection<TicketTag>? Tags { get; set; } // view model
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
public int Level { get; set; } // 1 = Low, 2 = Medium...
|
||||
public string? ColorCode { get; set; }
|
||||
public bool IsDefault { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public Guid TenantId { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
public string? Description { get; set; }
|
||||
public string? ColorCode { get; set; } // e.g., "#FF0000"
|
||||
public bool IsDefault { get; set; } // true for system defaults
|
||||
public int TenantId { get; set; } // or nullable if global
|
||||
public Guid TenantId { get; set; } // or nullable if global
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class TicketTag
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public Guid TicketId { get; set; }
|
||||
public TicketForum? Ticket { get; set; }
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty; // e.g., "Bug", "UI", "Urgent"
|
||||
public string? ColorCode { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public Guid TenantId { get; set; }
|
||||
public bool IsDefault { get; set; }
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
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
|
||||
public int TenantId { get; set; }
|
||||
public Guid TenantId { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class Industry
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
using Marco.Pms.Model.Dtos.Activities;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.ViewModels.Activities;
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
public static class ActivitiesMapper
|
||||
{
|
||||
public static TaskAllocation ToTaskAllocationFromAssignTaskDto(this AssignTaskDto assignTask, int EmployeeId,int tenantId)
|
||||
public static TaskAllocation ToTaskAllocationFromAssignTaskDto(this AssignTaskDto assignTask, Guid EmployeeId, Guid tenantId)
|
||||
{
|
||||
return new TaskAllocation
|
||||
{
|
||||
@ -20,27 +20,29 @@ namespace Marco.Pms.Model.Mapper
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TaskComment ToCommentFromReportTaskDto(this ReportTaskDto reportTask, int tenantId, int EmployeeId)
|
||||
public static TaskComment ToCommentFromReportTaskDto(this ReportTaskDto reportTask, Guid tenantId, Guid EmployeeId)
|
||||
{
|
||||
return new TaskComment
|
||||
{
|
||||
TaskAllocationId = reportTask.Id,
|
||||
CommentDate = reportTask.ReportedDate,
|
||||
Comment = reportTask.Comment,
|
||||
Comment = reportTask.Comment ?? string.Empty,
|
||||
CommentedBy = EmployeeId,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TaskComment ToCommentFromCommentDto(this CreateCommentDto createComment, int tenantId, int EmployeeId) {
|
||||
return new TaskComment {
|
||||
public static TaskComment ToCommentFromCommentDto(this CreateCommentDto createComment, Guid tenantId, Guid EmployeeId)
|
||||
{
|
||||
return new TaskComment
|
||||
{
|
||||
TaskAllocationId = createComment.TaskAllocationId,
|
||||
CommentDate = createComment.CommentDate,
|
||||
Comment = createComment.Comment,
|
||||
Comment = createComment.Comment ?? string.Empty,
|
||||
CommentedBy = EmployeeId,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TaskVM TaskAllocationToTaskVM(this TaskAllocation taskAllocation,string employeeName,string tenant )
|
||||
public static TaskVM TaskAllocationToTaskVM(this TaskAllocation taskAllocation, string employeeName)
|
||||
{
|
||||
return new TaskVM
|
||||
{
|
||||
@ -51,7 +53,6 @@ namespace Marco.Pms.Model.Mapper
|
||||
ReportedDate = taskAllocation.ReportedDate,
|
||||
Description = taskAllocation.Description,
|
||||
AssignBy = employeeName,
|
||||
Tenant = tenant,
|
||||
WorkItem = taskAllocation.WorkItem
|
||||
};
|
||||
}
|
||||
@ -65,9 +66,8 @@ namespace Marco.Pms.Model.Mapper
|
||||
CompletedTask = taskAllocation.CompletedTask,
|
||||
ReportedDate = taskAllocation.ReportedDate,
|
||||
Description = taskAllocation.Description,
|
||||
AssignedBy = taskAllocation.Employee.ToEmployeeVMFromEmployee(),
|
||||
WorkItemId = taskAllocation.WorkItemId,
|
||||
TenantId = taskAllocation.TenantId
|
||||
AssignedBy = taskAllocation.Employee != null ? taskAllocation.Employee.ToEmployeeVMFromEmployee() : new ViewModels.Employee.EmployeeVM(),
|
||||
WorkItemId = taskAllocation.WorkItemId
|
||||
};
|
||||
}
|
||||
public static ReportTaskVM ToReportTaskVMFromTaskAllocation(this TaskAllocation taskAllocation)
|
||||
@ -81,11 +81,10 @@ namespace Marco.Pms.Model.Mapper
|
||||
ReportedDate = taskAllocation.ReportedDate,
|
||||
Description = taskAllocation.Description,
|
||||
AssignedBy = taskAllocation.AssignedBy,
|
||||
WorkItemId = taskAllocation.WorkItemId,
|
||||
TenantId = taskAllocation.TenantId
|
||||
WorkItemId = taskAllocation.WorkItemId
|
||||
};
|
||||
}
|
||||
public static ActivityMaster ToActivityMasterFromCreateActivityMasterDto(this CreateActivityMasterDto createActivity,int tenantId)
|
||||
public static ActivityMaster ToActivityMasterFromCreateActivityMasterDto(this CreateActivityMasterDto createActivity, Guid tenantId)
|
||||
{
|
||||
return new ActivityMaster
|
||||
{
|
||||
@ -103,11 +102,9 @@ namespace Marco.Pms.Model.Mapper
|
||||
AssignmentDate = taskAllocation.AssignmentDate,
|
||||
PlannedTask = taskAllocation.PlannedTask,
|
||||
CompletedTask = taskAllocation.CompletedTask,
|
||||
AssignedBy = taskAllocation.Employee.ToBasicEmployeeVMFromEmployee(),
|
||||
AssignedBy = taskAllocation.Employee != null ? taskAllocation.Employee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM(),
|
||||
WorkItemId = taskAllocation.WorkItemId,
|
||||
WorkItem = taskAllocation.WorkItem,
|
||||
TenantId = taskAllocation.TenantId,
|
||||
//CheckList =
|
||||
WorkItem = taskAllocation.WorkItem
|
||||
};
|
||||
}
|
||||
public static CommentVM ToCommentVMFromTaskComment(this TaskComment comment)
|
||||
@ -119,7 +116,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
CommentDate = comment.CommentDate,
|
||||
Comment = comment.Comment,
|
||||
CommentedBy = comment.CommentedBy,
|
||||
Employee = comment.Employee.ToBasicEmployeeVMFromEmployee()
|
||||
Employee = comment.Employee != null ? comment.Employee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM()
|
||||
};
|
||||
}
|
||||
|
||||
@ -133,7 +130,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
CheckLists = checkList,
|
||||
};
|
||||
}
|
||||
public static CheckListVM ToCheckListVMFromActivityCheckList(this ActivityCheckList checkList,int activityId,bool IsChecked)
|
||||
public static CheckListVM ToCheckListVMFromActivityCheckList(this ActivityCheckList checkList, Guid activityId, bool IsChecked)
|
||||
{
|
||||
return new CheckListVM
|
||||
{
|
||||
@ -144,18 +141,18 @@ namespace Marco.Pms.Model.Mapper
|
||||
IsMandatory = checkList.IsMandatory,
|
||||
};
|
||||
}
|
||||
public static ActivityCheckList ToActivityCheckListFromCreateCheckListDto(this CreateCheckListDto checkListDto,int tenantId,int activityId)
|
||||
public static ActivityCheckList ToActivityCheckListFromCreateCheckListDto(this CreateCheckListDto checkListDto, Guid tenantId, Guid activityId)
|
||||
{
|
||||
return new ActivityCheckList
|
||||
{
|
||||
Id = checkListDto.Id,
|
||||
Id = checkListDto.Id != null ? checkListDto.Id.Value : Guid.Empty,
|
||||
Description = checkListDto.Description,
|
||||
ActivityId = activityId,
|
||||
IsMandatory = checkListDto.IsMandatory,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static CheckListVM ToCheckListVMFromReportCheckListDto(this ReportCheckListDto checkListDto, int activityId)
|
||||
public static CheckListVM ToCheckListVMFromReportCheckListDto(this ReportCheckListDto checkListDto, Guid activityId)
|
||||
{
|
||||
return new CheckListVM
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
//FeaturePermission = model.FeaturePermissions
|
||||
};
|
||||
}
|
||||
public static ApplicationRole ToApplicationRoleFromCreateDto(this CreateApplicationRoleDto model, int TenantId)
|
||||
public static ApplicationRole ToApplicationRoleFromCreateDto(this CreateApplicationRoleDto model, Guid TenantId)
|
||||
{
|
||||
return new ApplicationRole
|
||||
{
|
||||
@ -27,7 +27,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
public static ApplicationRole ToApplicationRoleFromUpdateDto(this UpdateApplicationRoleDto model, int TenantId)
|
||||
public static ApplicationRole ToApplicationRoleFromUpdateDto(this UpdateApplicationRoleDto model, Guid TenantId)
|
||||
{
|
||||
return new ApplicationRole
|
||||
{
|
||||
@ -39,7 +39,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
public static JobRole ToJobRoleFromCreateJobRoleDot(this CreateJobRoleDto model, int TenantId)
|
||||
public static JobRole ToJobRoleFromCreateJobRoleDot(this CreateJobRoleDto model, Guid TenantId)
|
||||
{
|
||||
return new JobRole
|
||||
{
|
||||
@ -50,7 +50,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
public static JobRole ToJobRoleFromUpdateJobRoleDot(this UpdateJobRoleDto model, int TenantId)
|
||||
public static JobRole ToJobRoleFromUpdateJobRoleDot(this UpdateJobRoleDto model, Guid TenantId)
|
||||
{
|
||||
return new JobRole
|
||||
{
|
||||
|
@ -33,8 +33,6 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
public static BasicEmployeeVM ToBasicEmployeeVMFromEmployee(this Employee employee)
|
||||
{
|
||||
if (employee.JobRole == null)
|
||||
{
|
||||
return new BasicEmployeeVM
|
||||
{
|
||||
@ -43,17 +41,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
LastName = employee.LastName,
|
||||
Photo = employee.Photo,
|
||||
JobRoleId = employee.JobRoleId,
|
||||
JobRoleName = ""
|
||||
};
|
||||
}
|
||||
return new BasicEmployeeVM
|
||||
{
|
||||
Id = employee.Id,
|
||||
FirstName = employee.FirstName,
|
||||
LastName = employee.LastName,
|
||||
Photo = employee.Photo,
|
||||
JobRoleId = employee.JobRoleId,
|
||||
JobRoleName = employee.JobRole.Name
|
||||
JobRoleName = employee.JobRole != null ? employee.JobRole.Name : ""
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
// Features = model.Features
|
||||
// };
|
||||
//}
|
||||
public static EmployeeRoleMapping ToEmployeeRoleMappingFromEmployeeRoleDot(this EmployeeRoleDot model, int TenantId)
|
||||
public static EmployeeRoleMapping ToEmployeeRoleMappingFromEmployeeRoleDot(this EmployeeRoleDot model, Guid TenantId)
|
||||
{
|
||||
Guid id = (string.IsNullOrEmpty(model.Id) ? Guid.NewGuid() : new Guid(model.Id));
|
||||
return new EmployeeRoleMapping
|
||||
|
@ -8,7 +8,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
public static class ForumMapper
|
||||
{
|
||||
public static TicketForum ToTicketForumFromCreateTicketDto(this CreateTicketDto createTicketDto, int tenantId)
|
||||
public static TicketForum ToTicketForumFromCreateTicketDto(this CreateTicketDto createTicketDto, Guid tenantId)
|
||||
{
|
||||
return new TicketForum
|
||||
{
|
||||
@ -42,7 +42,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
public static TicketComment ToTicketCommentFromAddCommentDto(this AddCommentDto commentDto, int tenantId)
|
||||
public static TicketComment ToTicketCommentFromAddCommentDto(this AddCommentDto commentDto, Guid tenantId)
|
||||
{
|
||||
return new TicketComment
|
||||
{
|
||||
@ -54,7 +54,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
TenantId = tenantId,
|
||||
};
|
||||
}
|
||||
public static TicketComment ToTicketCommentFromUpdateCommentDto(this UpdateCommentDto updateComment, int tenantId, TicketComment comment)
|
||||
public static TicketComment ToTicketCommentFromUpdateCommentDto(this UpdateCommentDto updateComment, Guid tenantId, TicketComment comment)
|
||||
{
|
||||
return new TicketComment
|
||||
{
|
||||
@ -88,7 +88,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
public static Document ToDocumentFromForumAttachmentDto(this ForumAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, int tenantId)
|
||||
public static Document ToDocumentFromForumAttachmentDto(this ForumAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, Guid tenantId)
|
||||
{
|
||||
return new Document
|
||||
{
|
||||
@ -102,7 +102,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static Document ToDocumentFromUpdateAttachmentDto(this UpdateAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, int tenantId)
|
||||
public static Document ToDocumentFromUpdateAttachmentDto(this UpdateAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, Guid tenantId)
|
||||
{
|
||||
return new Document
|
||||
{
|
||||
@ -168,16 +168,16 @@ namespace Marco.Pms.Model.Mapper
|
||||
IsDefault = statusMaster.IsDefault
|
||||
};
|
||||
}
|
||||
public static TicketStatusMaster ToTicketStatusMasterFromTicketStatusMasterDto(this TicketStatusMasterDto statusMasterDto)
|
||||
public static TicketStatusMaster ToTicketStatusMasterFromTicketStatusMasterDto(this TicketStatusMasterDto statusMasterDto, Guid tenantId)
|
||||
{
|
||||
return new TicketStatusMaster
|
||||
{
|
||||
Id = statusMasterDto.Id,
|
||||
Id = statusMasterDto.Id != null ? statusMasterDto.Id.Value : Guid.Empty,
|
||||
Name = statusMasterDto.Name,
|
||||
Description = statusMasterDto.Description,
|
||||
ColorCode = statusMasterDto.ColorCode,
|
||||
IsDefault = statusMasterDto.IsDefault,
|
||||
TenantId = statusMasterDto.TenantId
|
||||
TenantId = tenantId
|
||||
|
||||
};
|
||||
}
|
||||
@ -192,16 +192,16 @@ namespace Marco.Pms.Model.Mapper
|
||||
IsDefault = priorityMaster.IsDefault
|
||||
};
|
||||
}
|
||||
public static TicketPriorityMaster ToTicketPriorityMasterFromTicketPriorityMasterDto(this TicketPriorityMasterDto priorityMasterDto)
|
||||
public static TicketPriorityMaster ToTicketPriorityMasterFromTicketPriorityMasterDto(this TicketPriorityMasterDto priorityMasterDto, Guid tenantId)
|
||||
{
|
||||
return new TicketPriorityMaster
|
||||
{
|
||||
Id = priorityMasterDto.Id,
|
||||
Id = priorityMasterDto.Id != null ? priorityMasterDto.Id.Value : Guid.Empty,
|
||||
Name = priorityMasterDto.Name,
|
||||
Level = priorityMasterDto.Level,
|
||||
ColorCode = priorityMasterDto.ColorCode,
|
||||
IsDefault = priorityMasterDto.IsDefault,
|
||||
TenantId = priorityMasterDto.TenantId
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TicketTypeVM ToTicketTypeVMFromTicketTypeMaster(this TicketTypeMaster typeMaster)
|
||||
@ -214,15 +214,15 @@ namespace Marco.Pms.Model.Mapper
|
||||
IsDefault = typeMaster.IsDefault
|
||||
};
|
||||
}
|
||||
public static TicketTypeMaster ToTicketTypeMasterFromTicketTypeMasterDto(this TicketTypeMasterDto typeMasterDto)
|
||||
public static TicketTypeMaster ToTicketTypeMasterFromTicketTypeMasterDto(this TicketTypeMasterDto typeMasterDto, Guid tenantId)
|
||||
{
|
||||
return new TicketTypeMaster
|
||||
{
|
||||
Id = typeMasterDto.Id,
|
||||
Id = typeMasterDto.Id != null ? typeMasterDto.Id.Value : Guid.Empty,
|
||||
Name = typeMasterDto.Name,
|
||||
Description = typeMasterDto.Description,
|
||||
IsDefault = typeMasterDto.IsDefault,
|
||||
TenantId = typeMasterDto.TenantId
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TicketTagVM ToTicketTagVMFromTicketTagMaster(this TicketTagMaster tagMaster)
|
||||
@ -235,15 +235,15 @@ namespace Marco.Pms.Model.Mapper
|
||||
IsDefault = tagMaster.IsDefault
|
||||
};
|
||||
}
|
||||
public static TicketTagMaster ToTicketTagMasterFromTicketTagMasterDto(this TicketTagMasterDto tagMasterDto)
|
||||
public static TicketTagMaster ToTicketTagMasterFromTicketTagMasterDto(this TicketTagMasterDto tagMasterDto, Guid tenantId)
|
||||
{
|
||||
return new TicketTagMaster
|
||||
{
|
||||
Id = tagMasterDto.Id,
|
||||
Id = tagMasterDto.Id != null ? tagMasterDto.Id.Value : Guid.Empty,
|
||||
Name = tagMasterDto.Name,
|
||||
ColorCode = tagMasterDto.ColorCode,
|
||||
IsDefault = tagMasterDto.IsDefault,
|
||||
TenantId = tagMasterDto.TenantId
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -5,59 +5,59 @@ namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
public static class BuildingMapper
|
||||
{
|
||||
public static Building ToBuildingFromBuildingDto(this BuildingDot model)
|
||||
public static Building ToBuildingFromBuildingDto(this BuildingDot model, Guid tenantId)
|
||||
{
|
||||
return new Building
|
||||
{
|
||||
Id = model.Id,
|
||||
Id = model.Id != null ? model.Id.Value : Guid.Empty,
|
||||
Description = model.Description,
|
||||
Name = model.Name,
|
||||
ProjectId = model.ProjectId,
|
||||
TenantId = model.TenantId,
|
||||
TenantId = tenantId,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static class FloorMapper
|
||||
{
|
||||
public static Floor ToFloorFromFloorDto(this FloorDot model)
|
||||
public static Floor ToFloorFromFloorDto(this FloorDot model, Guid tenantId)
|
||||
{
|
||||
return new Floor
|
||||
{
|
||||
Id = model.Id,
|
||||
Id = model.Id != null ? model.Id.Value : Guid.Empty,
|
||||
FloorName = model.FloorName,
|
||||
BuildingId = model.BuildingId,
|
||||
TenantId = model.TenantId
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static class WorAreaMapper
|
||||
{
|
||||
public static WorkArea ToWorkAreaFromWorkAreaDto(this WorkAreaDot model)
|
||||
public static WorkArea ToWorkAreaFromWorkAreaDto(this WorkAreaDot model, Guid tenantId)
|
||||
{
|
||||
return new WorkArea
|
||||
{
|
||||
Id = model.Id,
|
||||
Id = model.Id != null ? model.Id.Value : Guid.Empty,
|
||||
AreaName = model.AreaName,
|
||||
FloorId = model.FloorId,
|
||||
TenantId = model.TenantId
|
||||
TenantId = tenantId
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
public static class WorkItemMapper
|
||||
{
|
||||
public static WorkItem ToWorkItemFromWorkItemDto(this WorkItemDot model)
|
||||
public static WorkItem ToWorkItemFromWorkItemDto(this WorkItemDot model, Guid tenantId)
|
||||
{
|
||||
return new WorkItem
|
||||
{
|
||||
Id = model.Id,
|
||||
Id = model.Id != null ? model.Id.Value : Guid.Empty,
|
||||
ActivityId = model.ActivityID,
|
||||
CompletedWork = model.CompletedWork,
|
||||
PlannedWork = model.PlannedWork,
|
||||
TaskDate = DateTime.Now,
|
||||
TenantId = model.TenantId,
|
||||
TenantId = tenantId,
|
||||
WorkAreaId = model.WorkAreaID
|
||||
|
||||
};
|
||||
|
@ -5,10 +5,11 @@ namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
public static class InquiryMapper
|
||||
{
|
||||
public static Inquiries ToInquiriesFromInquiriesDto(this InquiryDto inquiryDto) {
|
||||
public static Inquiries ToInquiriesFromInquiriesDto(this InquiryDto inquiryDto)
|
||||
{
|
||||
return new Inquiries
|
||||
{
|
||||
Id = 0,
|
||||
Id = Guid.Empty,
|
||||
OrganizatioinName = inquiryDto.OrganizatioinName,
|
||||
OragnizationSize = inquiryDto.OragnizationSize,
|
||||
IndustryId = inquiryDto.IndustryId,
|
||||
|
@ -16,12 +16,11 @@ namespace Marco.Pms.Model.Mapper
|
||||
Name = projectModel.Name,
|
||||
EndDate = projectModel.EndDate,
|
||||
StartDate = projectModel.StartDate,
|
||||
TenantId = projectModel.TenantId,
|
||||
ProjectStatusId = projectModel.ProjectStatusId
|
||||
};
|
||||
}
|
||||
|
||||
public static Project ToProjectFromCreateProjectDto(this CreateProjectDto projectModel, int TenantId)
|
||||
public static Project ToProjectFromCreateProjectDto(this CreateProjectDto projectModel, Guid TenantId)
|
||||
{
|
||||
return new Project
|
||||
{
|
||||
@ -35,7 +34,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
public static Project ToProjectFromUpdateProjectDto(this UpdateProjectDto projectModel, int TenantId,int id)
|
||||
public static Project ToProjectFromUpdateProjectDto(this UpdateProjectDto projectModel, Guid TenantId, Guid id)
|
||||
{
|
||||
return new Project
|
||||
{
|
||||
@ -50,7 +49,7 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
public static ProjectAllocation ToProjectAllocationFromProjectAllocationDto(this ProjectAllocationDot model, int TenantId)
|
||||
public static ProjectAllocation ToProjectAllocationFromProjectAllocationDto(this ProjectAllocationDot model, Guid TenantId)
|
||||
{
|
||||
return new ProjectAllocation
|
||||
{
|
||||
@ -73,7 +72,6 @@ namespace Marco.Pms.Model.Mapper
|
||||
ContactPerson = project.ContactPerson,
|
||||
StartDate = project.StartDate,
|
||||
EndDate = project.EndDate,
|
||||
TenantId = project.TenantId
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +1,18 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
public class Building
|
||||
public class Building : TenantRelation
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
[Required]
|
||||
[DisplayName("Building Name")]
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public int ProjectId { get; set; }
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,32 +1,24 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
public class Floor
|
||||
public class Floor : TenantRelation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[DisplayName("Floor Name")]
|
||||
public string? FloorName { get; set; }
|
||||
|
||||
|
||||
public int BuildingId { get; set; }
|
||||
public Guid BuildingId { get; set; }
|
||||
|
||||
[ForeignKey("BuildingId")]
|
||||
[ValidateNever]
|
||||
public Building? Building { get; set; }
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
public class PhotoGallary
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public int ProjectId { get; set; }
|
||||
[ValidateNever]
|
||||
|
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