823 lines
52 KiB
C#
823 lines
52 KiB
C#
using System.Globalization;
|
||
using Marco.Pms.Model.Activities;
|
||
using Marco.Pms.Model.AttendanceModule;
|
||
using Marco.Pms.Model.Authentication;
|
||
using Marco.Pms.Model.Directory;
|
||
using Marco.Pms.Model.DocumentManager;
|
||
using Marco.Pms.Model.Employees;
|
||
using Marco.Pms.Model.Entitlements;
|
||
using Marco.Pms.Model.Forum;
|
||
using Marco.Pms.Model.Mail;
|
||
using Marco.Pms.Model.Master;
|
||
using Marco.Pms.Model.Projects;
|
||
using Marco.Pms.Model.Roles;
|
||
using Marco.Pms.Model.Utilities;
|
||
using Microsoft.AspNetCore.Http;
|
||
using Microsoft.AspNetCore.Identity;
|
||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||
using Microsoft.EntityFrameworkCore;
|
||
|
||
namespace Marco.Pms.DataAccess.Data
|
||
{
|
||
public class ApplicationDbContext : IdentityDbContext<IdentityUser>
|
||
{
|
||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||
|
||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IHttpContextAccessor httpContextAccessor) : base(options)
|
||
{
|
||
_httpContextAccessor = httpContextAccessor;
|
||
|
||
}
|
||
|
||
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
||
public DbSet<Tenant> Tenants { get; set; }
|
||
public DbSet<ApplicationUser> ApplicationUsers { get; set; }
|
||
public DbSet<ServicesMaster> ServicesMasters { get; set; }
|
||
public DbSet<ActivityGroupMaster> ActivityGroupMasters { get; set; }
|
||
public DbSet<ActivityMaster> ActivityMasters { get; set; }
|
||
public DbSet<Project> Projects { get; set; }
|
||
public DbSet<ProjectAllocation> ProjectAllocations { get; set; }
|
||
public DbSet<StatusMaster> StatusMasters { get; set; }
|
||
public DbSet<Building> Buildings { get; set; }
|
||
public DbSet<Floor> Floor { get; set; }
|
||
public DbSet<WorkArea> WorkAreas { get; set; }
|
||
public DbSet<WorkItem> WorkItems { get; set; }
|
||
public DbSet<WorkShift> WorkShifts { get; set; }
|
||
public DbSet<TaskAllocation> TaskAllocations { get; set; }
|
||
public DbSet<TaskComment> TaskComments { get; set; }
|
||
public DbSet<TaskMembers> TaskMembers { get; set; }
|
||
public DbSet<TaskAttachment> TaskAttachments { get; set; }
|
||
public DbSet<Attendance> Attendes { get; set; }
|
||
public DbSet<AttendanceLog> AttendanceLogs { get; set; }
|
||
public DbSet<Employee> Employees { get; set; }
|
||
public DbSet<EmployeeRoleMapping> EmployeeRoleMappings { get; set; }
|
||
public DbSet<Module> Modules { get; set; }
|
||
public DbSet<Feature> Features { get; set; }
|
||
public DbSet<FeaturePermission> FeaturePermissions { get; set; }
|
||
public DbSet<ApplicationRole> ApplicationRoles { get; set; }
|
||
public DbSet<JobRole> JobRoles { get; set; }
|
||
public DbSet<RolePermissionMappings> RolePermissionMappings { get; set; }
|
||
public DbSet<Industry> Industries { get; set; }
|
||
public DbSet<ActivityCheckList> ActivityCheckLists { get; set; }
|
||
public DbSet<CheckListMappings> CheckListMappings { get; set; }
|
||
public DbSet<Inquiries> Inquiries { get; set; }
|
||
public DbSet<TicketForum> Tickets { get; set; }
|
||
public DbSet<TicketAttachment> TicketAttachments { get; set; }
|
||
public DbSet<TicketComment> TicketComments { get; set; }
|
||
public DbSet<TicketStatusMaster> TicketStatusMasters { get; set; }
|
||
public DbSet<TicketTypeMaster> TicketTypeMasters { get; set; }
|
||
public DbSet<TicketPriorityMaster> TicketPriorityMasters { get; set; }
|
||
public DbSet<TicketTagMaster> TicketTagMasters { get; set; }
|
||
public DbSet<Document> Documents { get; set; }
|
||
public DbSet<TicketTag> TicketTags { get; set; }
|
||
public DbSet<WorkCategoryMaster> WorkCategoryMasters { get; set; }
|
||
public DbSet<WorkStatusMaster> WorkStatusMasters { get; set; }
|
||
public DbSet<Contact> Contacts { get; set; }
|
||
public DbSet<ContactCategoryMaster> ContactCategoryMasters { get; set; }
|
||
public DbSet<ContactEmail> ContactsEmails { get; set; }
|
||
public DbSet<ContactPhone> ContactsPhones { get; set; }
|
||
public DbSet<ContactNote> ContactNotes { get; set; }
|
||
public DbSet<Bucket> Buckets { get; set; }
|
||
public DbSet<ContactTagMaster> ContactTagMasters { get; set; }
|
||
public DbSet<ContactTagMapping> ContactTagMappings { get; set; }
|
||
public DbSet<EmployeeBucketMapping> EmployeeBucketMappings { get; set; }
|
||
public DbSet<ContactBucketMapping> ContactBucketMappings { get; set; }
|
||
public DbSet<ContactProjectMapping> ContactProjectMappings { get; set; }
|
||
public DbSet<DirectoryUpdateLog> DirectoryUpdateLogs { get; set; }
|
||
|
||
public DbSet<MailingList> MailingList { get; set; }
|
||
public DbSet<MailDetails> MailDetails { get; set; }
|
||
public DbSet<MailLog> MailLogs { get; set; }
|
||
public DbSet<OTPDetails> OTPDetails { get; set; }
|
||
public DbSet<MPINDetails> MPINDetails { get; set; }
|
||
|
||
|
||
|
||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||
{
|
||
base.OnModelCreating(modelBuilder);
|
||
|
||
ManageApplicationStructure(modelBuilder);
|
||
|
||
//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 = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// },
|
||
// 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("6d3a7c72-c421-11ef-9b93-0242ac110002"),
|
||
// Role = "Site Engineer",
|
||
// Description = "",
|
||
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }
|
||
// ,
|
||
// new ApplicationRole
|
||
// {
|
||
// Id = new Guid("6d3aad72-c421-11ef-9b93-0242ac110002"),
|
||
// Role = "Project Manager",
|
||
// Description = "",
|
||
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }
|
||
// );
|
||
|
||
modelBuilder.Entity<RefreshToken>(entity =>
|
||
{
|
||
entity.HasKey(e => e.Id);
|
||
entity.HasOne(e => e.User)
|
||
.WithMany()
|
||
.HasForeignKey(e => e.UserId)
|
||
.OnDelete(DeleteBehavior.Cascade);
|
||
});
|
||
|
||
modelBuilder.Entity<Tenant>().HasData(
|
||
new Tenant { Id = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26"), OragnizationSize = "100-200", Name = "MarcoBMS", ContactName = "Admin", ContactNumber = "123456789", Description = "", DomainName = "www.marcobms.org", IndustryId = Guid.Parse("15436ee3-a650-469e-bfc2-59993f7514bb"), OnBoardingDate = DateTime.MinValue }
|
||
);
|
||
|
||
modelBuilder.Entity<StatusMaster>().HasData(
|
||
new StatusMaster
|
||
{
|
||
Id = new Guid("b74da4c2-d07e-46f2-9919-e75e49b12731"),
|
||
Status = "Active",
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new StatusMaster
|
||
{
|
||
Id = new Guid("cdad86aa-8a56-4ff4-b633-9c629057dfef"),
|
||
Status = "In Progress",
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}, new StatusMaster
|
||
{
|
||
Id = new Guid("603e994b-a27f-4e5d-a251-f3d69b0498ba"),
|
||
Status = "On Hold",
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new StatusMaster
|
||
{
|
||
Id = new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"),
|
||
Status = "In Active",
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new StatusMaster
|
||
{
|
||
Id = new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"),
|
||
Status = "Completed",
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<Project>().HasData(
|
||
new Project
|
||
{
|
||
Id = new Guid("85bf587b-7ca9-4685-b77c-d817f5847e85"),
|
||
Name = "Project 1",
|
||
ProjectAddress = "Project 1 Address",
|
||
ContactPerson = "Project 1 Contact Person",
|
||
StartDate = DateTime.ParseExact("2025-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture),
|
||
EndDate = DateTime.ParseExact("2026-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture),
|
||
ProjectStatusId = new Guid("b74da4c2-d07e-46f2-9919-e75e49b12731"),
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
//, new Project
|
||
//{
|
||
// Id = new Guid("3ef56a12-f5e5-4193-87d6-9e110ed10b86"),
|
||
// Name = "Project 2",
|
||
// ProjectAddress = "Project 2 Address",
|
||
// ContactPerson = "Project 2 Contact Person",
|
||
// StartDate = DateTime.ParseExact("2025-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture),
|
||
// EndDate = DateTime.ParseExact("2026-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture),
|
||
// ProjectStatusId = new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
//}, new Project
|
||
//{
|
||
// Id = new Guid("54d013e3-0a2b-48be-85c7-5ef03492a18c"),
|
||
// Name = "Project 3",
|
||
// ProjectAddress = "Project 3 Address",
|
||
// ContactPerson = "Project 3 Contact Person",
|
||
// StartDate = DateTime.ParseExact("2025-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture),
|
||
// EndDate = DateTime.ParseExact("2026-04-20 10:11:17.588000", "yyyy-MM-dd HH:mm:ss.ffffff", CultureInfo.InvariantCulture),
|
||
// ProjectStatusId = new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
//}
|
||
);
|
||
|
||
|
||
var tenantId = _httpContextAccessor.HttpContext?.Items["TenantId"]?.ToString();
|
||
|
||
//modelBuilder.Entity<ActivityMaster>()
|
||
// .HasData(
|
||
// new ActivityMaster
|
||
// {
|
||
// Id = new Guid("4117b7de-ef6c-461f-a2c2-64eaac5f9a11"),
|
||
// ActivityName = "Core Cutting",
|
||
// UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }, new ActivityMaster
|
||
// {
|
||
// Id = new Guid("1714f64d-7591-4419-bee5-118d21bb2855"),
|
||
// ActivityName = "Fabrication",
|
||
// UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }, new ActivityMaster
|
||
// {
|
||
// Id = new Guid("b3f51a93-dde6-45f9-8b22-f1bf017a640b"),
|
||
// ActivityName = "Welding",
|
||
// UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }, new ActivityMaster
|
||
// {
|
||
// Id = new Guid("53eedf44-4076-445f-be93-fedef17117e7"),
|
||
// ActivityName = "MS Support Fabrication",
|
||
// UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }, new ActivityMaster
|
||
// {
|
||
// Id = new Guid("715b9ddb-d9e2-4afa-8987-d9918905cea4"),
|
||
// ActivityName = "MS Support Hanging",
|
||
// UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }, new ActivityMaster
|
||
// {
|
||
// Id = new Guid("a3d191a7-a5aa-4dd8-a525-12c99263bbd6"),
|
||
// ActivityName = "Hydrant Volve",
|
||
// UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }, new ActivityMaster
|
||
// {
|
||
// Id = new Guid("c138a7de-713a-4bd4-8292-b0b265be77a3"),
|
||
// ActivityName = "Sprinkler Installation",
|
||
// UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
|
||
// TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
// }
|
||
// );
|
||
|
||
modelBuilder.Entity<Industry>().HasData(
|
||
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(
|
||
new TicketStatusMaster
|
||
{
|
||
Id = new Guid("6b0c409b-3e80-4165-8b39-f3fcacb4c797"),
|
||
Name = "New",
|
||
Description = "This is a newly created issue.",
|
||
ColorCode = "#FFCC99",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = new Guid("6c5ac37d-5b7d-40f3-adec-2dabaa5cca86"),
|
||
Name = "Assigned",
|
||
Description = "Assigned to employee or team of employees",
|
||
ColorCode = "#E6FF99",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = new Guid("7f96bcd5-0c66-411b-8a1d-9d1a4785194e"),
|
||
Name = "In Progress",
|
||
Description = "These issues are currently in progress",
|
||
ColorCode = "#99E6FF",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = new Guid("5c72b630-6923-4215-bf2c-b1622afd76e7"),
|
||
Name = "In Review",
|
||
Description = "These issues are currently under review",
|
||
ColorCode = "#6c757d",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = new Guid("8ff85685-a875-4f21-aa95-d99551315fcc"),
|
||
Name = "Done",
|
||
Description = "The following issues are resolved and closed",
|
||
ColorCode = "#B399FF",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<TicketTypeMaster>().HasData(
|
||
new TicketTypeMaster
|
||
{
|
||
Id = new Guid("c74e5480-2b71-483c-8f4a-1a9c69c32603"),
|
||
Name = "Quality Issue",
|
||
Description = "An identified problem that affects the performance, reliability, or standards of a product or service",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketTypeMaster
|
||
{
|
||
Id = new Guid("d1f55eab-9898-4e46-9f03-b263e33e5d38"),
|
||
Name = "Help Desk",
|
||
Description = "A support service that assists users with technical issues, requests, or inquiries.",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<TicketPriorityMaster>().HasData(
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = new Guid("188d29b3-10f3-42d0-9587-1a46ae7a0320"),
|
||
Name = "Low",
|
||
ColorCode = "008000",
|
||
Level = 1,
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = new Guid("0919bc84-9f82-4ecf-98c7-962755dd9a97"),
|
||
Name = "Medium",
|
||
ColorCode = "FFFF00",
|
||
Level = 2,
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}, new TicketPriorityMaster
|
||
{
|
||
Id = new Guid("a13b7e59-16fd-4665-b5cf-a97399e8445a"),
|
||
Name = "High",
|
||
ColorCode = "#FFA500",
|
||
Level = 3,
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}, new TicketPriorityMaster
|
||
{
|
||
Id = new Guid("f340fbc3-c9fd-46aa-b063-0093418830e4"),
|
||
Name = "Critical",
|
||
ColorCode = "#FFA500",
|
||
Level = 4,
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = new Guid("44a7b91d-a0dd-45d1-8616-4d2f71e16401"),
|
||
Name = "Urgent",
|
||
ColorCode = "#FF0000",
|
||
Level = 5,
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<TicketTagMaster>().HasData(
|
||
new TicketTagMaster
|
||
{
|
||
Id = new Guid("ef6c2a65-f61d-4537-9650-a7ab7f8d98db"),
|
||
Name = "Quality Issue",
|
||
ColorCode = "#e59866",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new TicketTagMaster
|
||
{
|
||
Id = new Guid("5a168569-8ad7-4422-8db6-51ef25caddeb"),
|
||
Name = "Help Desk",
|
||
ColorCode = "#85c1e9",
|
||
IsDefault = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<WorkCategoryMaster>().HasData(
|
||
new WorkCategoryMaster
|
||
{
|
||
Id = new Guid("86bb2cc8-f6b5-4fdd-bbee-c389c713a44b"),
|
||
Name = "Fresh Work",
|
||
Description = "Created new task in a professional or creative context",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new WorkCategoryMaster
|
||
{
|
||
Id = new Guid("9ebfa19c-53b9-481b-b863-c25d2f843201"),
|
||
Name = "Rework",
|
||
Description = "Revising, modifying, or correcting a task to improve its quality or fix issues",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new WorkCategoryMaster
|
||
{
|
||
Id = new Guid("11a79929-1d07-42dc-9e98-82d0d2f4a240"),
|
||
Name = "Quality Issue",
|
||
Description = "Any defect, deviation, or non-conformance in a task that fails to meet established standards or customer expectations.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<WorkStatusMaster>().HasData(
|
||
new WorkStatusMaster
|
||
{
|
||
Id = new Guid("030bb085-e230-4370-aec7-9a74d652864e"),
|
||
Name = "Approve",
|
||
Description = "Confirm the tasks are actually finished as reported",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new WorkStatusMaster
|
||
{
|
||
Id = new Guid("2a1a5b96-cf93-4111-b4b1-76c19d6333b4"),
|
||
Name = "Partially Approve",
|
||
Description = "Not all tasks are actually finished as reported",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new WorkStatusMaster
|
||
{
|
||
Id = new Guid("00a062e6-62e6-42c5-b6b1-024328651b72"),
|
||
Name = "NCR",
|
||
Description = "Tasks are not finished as reported or have any issues in al the tasks",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<ServicesMaster>().HasData(
|
||
new ServicesMaster
|
||
{
|
||
Id = new Guid("0aa3e986-d6a4-49b4-818b-564d2d7799a2"),
|
||
Name = "Civil",
|
||
Description = "Construction Civil service involves planning, designing, and overseeing infrastructure and building projects",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ServicesMaster
|
||
{
|
||
Id = new Guid("fa208600-b761-480d-95ad-98cad2e61c9b"),
|
||
Name = "Plumbing",
|
||
Description = "Plumbing service involves installing, maintaining, and repairing systems for water supply, drainage, and sewage in residential, commercial, and industrial buildings",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ServicesMaster
|
||
{
|
||
Id = new Guid("e3c1d91d-7e86-4257-9c2d-04a4352d8283"),
|
||
Name = "Electric",
|
||
Description = "Electric service involves the installation, maintenance, and repair of electrical systems, including wiring, lighting, and power distribution in buildings and infrastructure",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ServicesMaster
|
||
{
|
||
Id = new Guid("da465f54-0f58-48c8-ab1d-8e31d59b3607"),
|
||
Name = "Fire fighting",
|
||
Description = "Fire fighting service involves installing and maintaining systems like sprinklers, hydrants, and alarms to detect, control, and extinguish fires in buildings and facilities.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ServicesMaster
|
||
{
|
||
Id = new Guid("df3805d6-8d02-45cb-9c53-5c42b527ebb6"),
|
||
Name = "HVAC",
|
||
Description = "HVAC (Heating, Ventilation, and Air Conditioning) service involves the installation, maintenance, and repair of systems that control indoor climate, air quality, and thermal comfort in buildings.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ServicesMaster
|
||
{
|
||
Id = new Guid("8d196e15-4099-4c9a-9a84-86650d79d4b4"),
|
||
Name = "Interior infrastructure",
|
||
Description = "Interior infrastructure (Interior Infra) service involves the construction and installation of essential internal structural elements like partitions, ceilings, flooring, and utility layouts to prepare spaces for interior design and functional use.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
modelBuilder.Entity<ActivityGroupMaster>().HasData(
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("6f048b41-f909-41dd-af5f-02369ca80639"),
|
||
ServiceId = Guid.Parse("0aa3e986-d6a4-49b4-818b-564d2d7799a2"),
|
||
Name = "Site Preparation",
|
||
Description = "Site Preparation involves clearing, leveling, and preparing the land for construction by removing obstacles, performing excavation, and conducting soil tests.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("1d29b7d1-ffdc-486d-ac7b-ee2661ae9979"),
|
||
ServiceId = Guid.Parse("0aa3e986-d6a4-49b4-818b-564d2d7799a2"),
|
||
Name = "Foundation Work",
|
||
Description = "Foundation Work involves excavating, reinforcing, and casting the base structure that supports the entire building load, including footings and plinth beams.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("3a712ddb-8927-4d58-8b24-83290e6ba8d1"),
|
||
ServiceId = Guid.Parse("0aa3e986-d6a4-49b4-818b-564d2d7799a2"),
|
||
Name = "Sub-Structure Work",
|
||
Description = "Sub-Structure Work involves constructing the portion of the building below ground level, including plinth beams, basement walls, and backfilling, to support the superstructure.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("47fa23fb-0e1c-459e-9cc9-9136c61effbd"),
|
||
ServiceId = Guid.Parse("0aa3e986-d6a4-49b4-818b-564d2d7799a2"),
|
||
Name = "Super-Structure Work",
|
||
Description = "Super-Structure Work involves constructing the part of the building above ground level, including columns, beams, slabs, and walls, forming the main structural framework.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("7613959e-5718-4e46-926b-efa45722c844"),
|
||
ServiceId = Guid.Parse("fa208600-b761-480d-95ad-98cad2e61c9b"),
|
||
Name = "Water Supply System",
|
||
Description = "Water Supply System involves installing pipelines, pumps, tanks, and fittings to ensure the reliable distribution of clean water throughout a building or facility.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("ba4ada9c-ed35-4d5e-bc9f-216f32612c85"),
|
||
ServiceId = Guid.Parse("fa208600-b761-480d-95ad-98cad2e61c9b"),
|
||
Name = "Drainage & Wastewater System",
|
||
Description = "Drainage & Wastewater System involves installing pipes, traps, and chambers to safely collect and dispose of wastewater and sewage from a building to the municipal or septic system.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("44326c01-f69e-430c-a403-d5bf3dcc35d5"),
|
||
ServiceId = Guid.Parse("fa208600-b761-480d-95ad-98cad2e61c9b"),
|
||
Name = "Rainwater Harvesting",
|
||
Description = "Rainwater Harvesting involves collecting, channeling, and storing rainwater from rooftops or surfaces for reuse or groundwater recharge.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("3ef85f9f-e23e-4e6f-9cb7-40ec70a184dd"),
|
||
ServiceId = Guid.Parse("e3c1d91d-7e86-4257-9c2d-04a4352d8283"),
|
||
Name = "Conduiting & Cabling",
|
||
Description = "Conduiting & Cabling involves laying electrical conduits and pulling cables to safely route and protect electrical wiring throughout a building.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("a71182a5-0579-4624-b252-4cae2ea11948"),
|
||
ServiceId = Guid.Parse("e3c1d91d-7e86-4257-9c2d-04a4352d8283"),
|
||
Name = "Wiring Installation",
|
||
Description = "Wiring Installation involves connecting electrical wires from distribution boards to switches, sockets, and fixtures to provide power and lighting within a building.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("b5e2291f-3569-45e5-9c30-ef33ad0abbf1"),
|
||
ServiceId = Guid.Parse("e3c1d91d-7e86-4257-9c2d-04a4352d8283"),
|
||
Name = "Lighting System",
|
||
Description = "Lighting System involves installing and connecting various lighting fixtures, controls, and fittings to ensure proper illumination for indoor and outdoor areas.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("56584b0f-b2a5-4a5e-afea-590516473bcd"),
|
||
ServiceId = Guid.Parse("da465f54-0f58-48c8-ab1d-8e31d59b3607"),
|
||
Name = "Sprinkler System",
|
||
Description = "Sprinkler System involves installing a network of pipes and sprinkler heads designed to automatically discharge water to suppress or extinguish fires.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("78a12040-4ab6-493a-b199-ee636f45f77f"),
|
||
ServiceId = Guid.Parse("da465f54-0f58-48c8-ab1d-8e31d59b3607"),
|
||
Name = "Fire Hydrant System",
|
||
Description = "Fire Hydrant System involves installing external and internal hydrants, piping, and valves to provide high-pressure water access for manual firefighting during emergencies.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("fbb04bec-53a7-4f86-8536-34c4b5c691a2"),
|
||
ServiceId = Guid.Parse("da465f54-0f58-48c8-ab1d-8e31d59b3607"),
|
||
Name = "Liaisoning",
|
||
Description = "Liaisoning – Fire Fighting involves coordinating with fire authorities to obtain necessary approvals and no-objection certificates (NOCs) for fire safety systems, ensuring compliance with local fire safety regulations.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("6eedb9f1-22e9-4d93-b770-593125085465"),
|
||
ServiceId = Guid.Parse("da465f54-0f58-48c8-ab1d-8e31d59b3607"),
|
||
Name = "Public Address (PA) System",
|
||
Description = "Public Address (PA) System involves installing speakers, microphones, amplifiers, and control units to broadcast announcements, alerts, and emergency messages throughout a building or facility.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("97c6f9f5-cd4d-4830-ba14-a81f6ee0d1e2"),
|
||
ServiceId = Guid.Parse("da465f54-0f58-48c8-ab1d-8e31d59b3607"),
|
||
Name = "Detection and Alarm System",
|
||
Description = "Detection and Alarm System involves installing smoke detectors, heat sensors, and fire alarm panels to automatically detect fire or smoke and alert occupants through audible and visual alarms.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("cdea8e5f-8b78-4f7e-ab65-bd6b38d81af2"),
|
||
ServiceId = Guid.Parse("df3805d6-8d02-45cb-9c53-5c42b527ebb6"),
|
||
Name = "HVAC System Design & Planning",
|
||
Description = "HVAC System Design & Planning involves calculating heating and cooling loads, selecting appropriate equipment, and designing duct and piping layouts to ensure efficient climate control and air quality.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("1805e22d-4220-45cc-8f39-35194c2499a5"),
|
||
ServiceId = Guid.Parse("df3805d6-8d02-45cb-9c53-5c42b527ebb6"),
|
||
Name = "Ducting Work",
|
||
Description = "Ducting Work involves fabricating, installing, and insulating ducts to distribute conditioned air throughout the building as part of the HVAC system.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("69819ea6-5550-4325-9097-c52d95db0822"),
|
||
ServiceId = Guid.Parse("df3805d6-8d02-45cb-9c53-5c42b527ebb6"),
|
||
Name = "Equipment Installation",
|
||
Description = "Equipment Installation involves setting up HVAC units such as AHUs, FCUs, chillers, and compressors to enable heating, cooling, and ventilation operations in the building.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("fe613446-c399-4a5c-8205-fd3652231f57"),
|
||
ServiceId = Guid.Parse("df3805d6-8d02-45cb-9c53-5c42b527ebb6"),
|
||
Name = "Ventilation System",
|
||
Description = "Ventilation System involves installing exhausts, fresh air units, and ductwork to ensure proper air circulation, removal of stale air, and maintenance of indoor air quality.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("0398ba10-f814-404a-a7a2-3bac0f61a9a5"),
|
||
ServiceId = Guid.Parse("8d196e15-4099-4c9a-9a84-86650d79d4b4"),
|
||
Name = "Partition Work",
|
||
Description = "Partition Work involves constructing internal dividing walls using materials like gypsum, glass, or wood to create separate rooms or functional spaces within a building.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("9efaa80a-f115-4e78-866a-5e192faa1024"),
|
||
ServiceId = Guid.Parse("8d196e15-4099-4c9a-9a84-86650d79d4b4"),
|
||
Name = "False Ceiling Work",
|
||
Description = "False Ceiling Work involves installing suspended ceilings made of materials like gypsum, metal, or POP to conceal services, improve aesthetics, and enhance acoustic and thermal performance.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("c0a9e90c-4c74-417d-b36e-6e63eca16463"),
|
||
ServiceId = Guid.Parse("8d196e15-4099-4c9a-9a84-86650d79d4b4"),
|
||
Name = "Door & Window Installation",
|
||
Description = "Door & Window Installation involves fitting and fixing doors and windows made of wood, aluminum, uPVC, or glass to provide access, ventilation, and natural light within the building.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
},
|
||
new ActivityGroupMaster
|
||
{
|
||
Id = new Guid("a27d502b-20ea-4926-b294-3db7110f94e5"),
|
||
ServiceId = Guid.Parse("8d196e15-4099-4c9a-9a84-86650d79d4b4"),
|
||
Name = "Data & Communication Cabling",
|
||
Description = "Data & Communication Cabling involves laying structured cables for internet, telephone, and networking systems to ensure reliable communication and connectivity throughout the building.",
|
||
IsSystem = true,
|
||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||
}
|
||
);
|
||
}
|
||
|
||
private static void ManageApplicationStructure(ModelBuilder modelBuilder)
|
||
{
|
||
// Configure ApplicationRole to Tenant relationship (if Tenant exists)
|
||
modelBuilder.Entity<ApplicationRole>()
|
||
.HasOne<Tenant>() // No navigation property in ApplicationRole
|
||
.WithMany()
|
||
.HasForeignKey(ar => ar.TenantId);
|
||
// Configure the relationship between ApplicationRole and FeaturePermission via a join table
|
||
modelBuilder.Entity<RolePermissionMappings>(entity =>
|
||
{
|
||
entity.HasKey(rfp => new { rfp.ApplicationRoleId, rfp.FeaturePermissionId });
|
||
|
||
entity.HasOne<ApplicationRole>()
|
||
.WithMany()
|
||
.HasForeignKey(rfp => rfp.ApplicationRoleId);
|
||
|
||
entity.HasOne<FeaturePermission>()
|
||
.WithMany()
|
||
.HasForeignKey(rfp => rfp.FeaturePermissionId);
|
||
});
|
||
|
||
|
||
|
||
|
||
modelBuilder.Entity<Module>().HasData(new Module
|
||
{
|
||
Id = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"),
|
||
Name = "Project",
|
||
Description = "Project Module",
|
||
Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02"
|
||
}, new Module
|
||
{
|
||
Id = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"),
|
||
Name = "Employee",
|
||
Description = "Employee Module",
|
||
Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637"
|
||
}, new Module
|
||
{
|
||
Id = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
|
||
Name = "Masters",
|
||
Description = "Masters Module",
|
||
Key = "504ec132-e6a9-422f-8f85-050602cfce05"
|
||
});
|
||
|
||
|
||
|
||
modelBuilder.Entity<Feature>().HasData(
|
||
new Feature { Id = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), Description = "Manage Project", Name = "Project Management", 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 = "Task Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
||
|
||
new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Employee Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
||
new Feature { Id = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
||
|
||
new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
||
new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Managing all directory related rights", Name = "Directory Management", 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(
|
||
new FeaturePermission { Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project", Description = "Access all information related to the project." },
|
||
new FeaturePermission { Id = new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Project", Description = "Potentially edit the project name, description, start/end dates, or status." },
|
||
new FeaturePermission { Id = new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Team", Description = "The \"Manage Team\" feature allows authorized users to organize project personnel by adding, removing, and assigning employee to projects." },
|
||
new FeaturePermission { Id = new Guid("8d7cc6e3-9147-41f7-aaa7-fa507e450bd4"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project Infra", Description = "Grants a user comprehensive read-only access to all details concerning the project's underlying systems, technologies, resources, and configurations" },
|
||
new FeaturePermission { Id = new Guid("cf2825ad-453b-46aa-91d9-27c124d63373"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Project Infra", Description = "This allows them to create, modify, and manage all aspects of the supporting infrastructure." },
|
||
|
||
|
||
new FeaturePermission { Id = new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "View Task", Description = "Grants a user comprehensive read-only access to all details associated with tasks within a project. This includes task descriptions, statuses, assignees, due dates, dependencies, progress, history, and any related attachments or discussions." },
|
||
new FeaturePermission { Id = new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "Add/Edit Task", Description = "This allows them to create new tasks, modify existing task attributes (description, status, assignee, due date, etc.)," },
|
||
new FeaturePermission { Id = new Guid("6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "Assign/Report Progress", Description = "Grants a user the ability to designate team members responsible for specific tasks and to update the completion status or provide progress updates for those tasks" },
|
||
new FeaturePermission { Id = new Guid("db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "Approve Task", Description = "Grants a user the authority to officially confirm the completion or acceptance of a task, often signifying that it meets the required standards or criteria" },
|
||
|
||
|
||
new FeaturePermission { Id = new Guid("60611762-7f8a-4fb5-b53f-b1139918796b"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "View All Employees", Description = "Grants a user read-only access to details about the all individuals within the system. This typically includes names, contact information, roles, departments, and potentially other relevant employee data" },
|
||
new FeaturePermission { Id = new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "View Team Members", Description = "Grants a user read-only access to details about the individuals within the system which are is assigned to same projects as user. This typically includes names, contact information, roles, departments, and potentially other relevant employee data" },
|
||
new FeaturePermission { Id = new Guid("a97d366a-c2bb-448d-be93-402bd2324566"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "Add/Edit Employee", Description = "Grants a user the authority to create new employee profiles and modify existing employee details within the system. This typically includes adding or updating information such as names, contact details, roles, departments, skills, and potentially other personal or professional data" },
|
||
new FeaturePermission { Id = new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "Assign Roles", Description = "Grants a user the authority to manage employee application roles, enabling them to assign or revoke access privileges within the system." },
|
||
|
||
|
||
new FeaturePermission { Id = new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Team Attendance ", Description = "Team Attendance refers to tracking and managing the attendance of all team members collectively, often monitored by a team lead or manager." },
|
||
new FeaturePermission { Id = new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Regularize Attendance", Description = "Grants a user the authority to approve requests from employees to adjust or correct their recorded attendance. This typically involves reviewing the reason for the regularization, verifying any supporting documentation, and then officially accepting the changes to the employee's attendance records" },
|
||
new FeaturePermission { Id = new Guid("ccb0589f-712b-43de-92ed-5b6088e7dc4e"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Self Attendance", Description = "Team Attendance refers to tracking and managing the attendance of all team members collectively, often monitored by a team lead or manager." },
|
||
|
||
new FeaturePermission { Id = new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "View Masters", Description = "Grants a user read-only access to foundational or reference data within the system. \"Masters\" typically refer to predefined lists, categories, or templates that are used throughout the application to standardize information and maintain consistency" },
|
||
new FeaturePermission { Id = new Guid("588a8824-f924-4955-82d8-fc51956cf323"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "Manage Masters", Description = "Grants a user the authority to create, modify, and delete foundational or reference data within the system. These \"masters\" are typically the core lists, categories, and configurations that other data and functionalities rely upon, such as departments, job titles, product categories" },
|
||
|
||
new FeaturePermission { Id = new Guid("4286a13b-bb40-4879-8c6d-18e9e393beda"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Directory Admin", Description = "Full control over all directories, including the ability to manage permissions for all directories in the system." },
|
||
new FeaturePermission { Id = new Guid("62668630-13ce-4f52-a0f0-db38af2230c5"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Directory Manager", Description = "Full control over directories they created or have been assigned. Can also manage permissions for those directories." },
|
||
new FeaturePermission { Id = new Guid("0f919170-92d4-4337-abd3-49b66fc871bb"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Directory User", Description = "Full control over directories they created. Can view contacts in directories they either created or were assigned to. Can manage permissions only for directories they created." }
|
||
//new FeaturePermission { Id = new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"), FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), IsEnabled = true, Name = "Manage Masters", Description = "" }
|
||
|
||
);
|
||
}
|
||
}
|
||
}
|