Compare commits

...

78 Commits

Author SHA1 Message Date
d4ba3d5341 Merge pull request 'Add a foreign key for WorkCategory table to the WorkItem model' (#45) from Ashutosh_Enhancement#206_Added_WorkCategory_In_WorkItem into Issues_May_2W
Reviewed-on: #45
2025-05-12 09:02:14 +00:00
7c9cd4697f Add a foreign key for WorkCategory table to the WorkItem model 2025-05-12 13:18:19 +05:30
4287bf7b2e Merge pull request 'Included the reported date when sending the list of allocated tasks to provide more detailed tracking information.' (#44) from Ashutosh_Enhancement_#214_Report_Task_At_Zero into Issues_May_2W
Reviewed-on: #44
2025-05-10 13:37:45 +00:00
8c5164d83a Included the reported date when sending the list of allocated tasks to provide more detailed tracking information. 2025-05-10 13:37:45 +00:00
27e02c10aa Merge pull request 'Ashutosh_Feature#208_WorkCategory_Master_Table' (#43) from Ashutosh_Feature#208_WorkCategory_Master_Table into Issues_May_2W
Reviewed-on: #43
2025-05-10 13:37:10 +00:00
8fae161095 Added "id" in updating endpiont url 2025-05-10 18:14:25 +05:30
ec7e754f59 Added an API endpoint to delete a Work Category, allowing deletion only if IsSystem = false. 2025-05-10 15:23:29 +05:30
5953f37e57 Added an API endpoint to update an existing Work Category, with update allowed only if IsSystem = false. 2025-05-10 15:22:10 +05:30
6f378fe0bd Added an API endpoint to create a new Work Category entry. 2025-05-10 15:17:02 +05:30
20ea1389dd Added an API endpoint to retrieve the Work Category by ID 2025-05-10 15:15:30 +05:30
648d8e691a Added an API endpoint to retrieve the list of all Work Categories. 2025-05-10 15:13:57 +05:30
7a3d0c8c60 created model, DTO,(Data Transfer Object) VM(View Model) for Work Category master table and added migration for adding table to database and seeding system-defined categoryies in table for first tenant 2025-05-10 15:04:39 +05:30
d95f61cba9 Fixed error happeds when Changing file strucutre in model project 2025-05-10 13:39:33 +05:30
0c49d8d05c Changed file structure in model project 2025-05-10 13:16:20 +05:30
2b7a7190c7 Merge pull request 'deleted duplicate manage employee api' (#42) from Ashutosh_Enhancement#199_Manage_Employee_FromBody into Issues_May_2W
Reviewed-on: #42
2025-05-09 06:36:36 +00:00
551ab5ffef deleted duplicate manage employee api 2025-05-09 06:36:36 +00:00
76b4bc88d5 Merge pull request 'Added proper success messages upon creation and update of building, floor, and work area for improved user feedback.' (#41) from Ashtuosh_Bug#191_Incorrect_Success_Message into Issues_May_2W
Reviewed-on: #41
2025-05-09 06:35:43 +00:00
041d32d8ea Added proper success messages upon creation and update of building, floor, and work area for improved user feedback. 2025-05-09 09:41:30 +05:30
ece25ecd9d Merge pull request 'Employee data is received as JSON, instead of multipart/form-data, during creation and update operations' (#40) from Ashutosh_Enhancement#199_Manage_Employee_FromBody into Issues_May_2W
Reviewed-on: #40
2025-05-08 11:03:43 +00:00
87bcdf223a Employee data is received as JSON, instead of multipart/form-data, during creation and update operations 2025-05-08 16:30:26 +05:30
141d001673 Merge pull request 'Ashutosh_Enhancement#198_Added_IsSystem' (#39) from Ashutosh_Enhancement#198_Added_IsSystem into Issues_May_2W
Reviewed-on: #39
2025-05-08 10:22:14 +00:00
8bdf4b75a4 Added an API to delete job role if that job role is not asigned to any employee 2025-05-08 15:23:35 +05:30
3da4a09a6d Added an API to delete application role if isSystem=false and application role is not asigned to any employee 2025-05-08 15:04:08 +05:30
261938fbad Added isSystem flage in Employee and ApplicationRole table and added functionality not to suspend employee if isSystem=true and not to update or delete application role if isSystem=true 2025-05-08 15:02:24 +05:30
d807ac1998 Merge pull request 'Added a flag in the Employee List API to retrieve active and inactive employees separately.' (#38) from Ashutosh_Enhancement#172_Show_InactiveEmployees into Issues_May_2W
Reviewed-on: #38
2025-05-08 05:38:16 +00:00
c5a9777898 Added a flag in the Employee List API to retrieve active and inactive employees separately. 2025-05-08 05:38:16 +00:00
4ff1168566 Merge branch 'Issues_May_2W' of https://git.marcoaiot.com/admin/marco.pms.api into Issues_May_2W 2025-05-07 16:07:28 +05:30
167da8146c In the Attendance Log table, the UpdatedBy field was incorrectly recording the employee whose attendance was marked, rather than the actual user who performed the update, fixed this issue in this commit 2025-05-07 16:07:18 +05:30
bbddc236b1 In the Attendance Log table, the UpdatedBy field was incorrectly recording the employee whose attendance was marked, rather than the actual user who performed the update, fixed this issue in this commit 2025-05-07 12:23:44 +05:30
0dc39e36d9 Merge pull request 'Implemented an API endpoint that allows the system to record attendance entries (e.g., check-in and check-out) for a specific employee. This helps track employee working hours, presence, and status.' (#37) from Ashutosh_Feature#183_Get_AttendanceLogs_By_EmployeeId into main
Reviewed-on: #37
2025-05-06 12:12:25 +00:00
68c5021085 Added condition to only fetch attendance record between dateFrom and dateTo 2025-05-06 17:38:51 +05:30
b059a733bb Send "role name" property in project/log api 2025-05-06 12:42:29 +05:30
6d6a2b6015 Implemented an API endpoint that allows the system to record attendance entries (e.g., check-in and check-out) for a specific employee. This helps track employee working hours, presence, and status. 2025-05-06 10:08:57 +05:30
7e3f0815a0 Fixed issue of returing email already existed even if entered new email 2025-05-05 19:05:16 +05:30
e22db781a1 Merge pull request 'Changed the data-type of ApprovedBy in attendes table' (#36) from Ashutosh_ApprovedBy_In_Attendes into main
Reviewed-on: #36
2025-05-05 12:51:31 +00:00
70a8fc0089 Changed the data-type of ApprovedBy in attendes table 2025-05-05 12:51:31 +00:00
b46d7bd2c4 Merge pull request 'Implement an API endpoint to delete a task' (#34) from Ashutosh_Feature#170_Task_Deletion into main
Reviewed-on: #34
2025-05-05 12:05:05 +00:00
523b1eb9d0 Implement an API endpoint to delete a task 2025-05-05 12:05:05 +00:00
64a178931c Merge pull request 'Implement an API endpoint that allows for to suspension of an employee.' (#35) from Ashutosh_Feature#174_Suspend_Employee into main
Reviewed-on: #35
2025-05-05 12:03:30 +00:00
c1228e9a22 Implement an API endpoint that allows for to suspension of an employee. 2025-05-05 17:22:35 +05:30
a318f69883 Do not populate activity master during migration 2025-05-04 13:33:56 +05:30
c60bc8a9e5 Improved the DataSeeder logic in the startup process to ensure consistent and accurate seeding of initial data. 2025-05-03 21:55:47 +05:30
7c3b777c77 Merge pull request 'Converte all Ids from Integer to Guid' (#33) from Ashutosh_Enhancement#132_Int_To_Guid into Feature_Forum
Reviewed-on: #33
2025-05-03 09:44:35 +00:00
4c478d28f8 Fixed remaining int to Guid conversions 2025-05-03 09:44:35 +00:00
3ec1ff1b5f Converte all Ids from Integer to Guid 2025-05-03 09:44:35 +00:00
f6c135180f fixed bug of not sending the presignedUrl even if document exists 2025-05-03 10:13:49 +05:30
89a3b1e414 Merge pull request 'When requesting regularization, ensure that the check-out time is later than the check-in time.' (#32) from Ashutosh_Bug#127_Regularization_Time_Validation into Feature_Forum
Reviewed-on: #32
2025-04-30 11:24:52 +00:00
0bfac5ca4f When requesting regularization, ensure that the check-out time is later than the check-in time. 2025-04-30 11:24:52 +00:00
e369ccffbb Merge pull request 'Fixed a bug where unable to cheklist item while updating activity' (#31) from Ashutosh_Bug#125_Unable_To_Add_Checklist_Item into Feature_Forum
Reviewed-on: #31
2025-04-29 11:16:14 +00:00
40bb028edc Fixed a bug where unable to cheklist item while updating activity 2025-04-29 13:20:29 +05:30
24b9c8a450 Merge pull request 'Implement null validation in attendance log API' (#29) from Ashutosh_Bug#117_Null_Validation_In_Attendance_Log into Feature_Forum
Reviewed-on: #29
2025-04-29 05:45:15 +00:00
d0c80a18d6 Added proper check-in time for second time check-in 2025-04-29 05:45:15 +00:00
885e370668 Implement null validation in attendance log API 2025-04-29 05:45:15 +00:00
4256dca197 Merge pull request 'Removed Possible null refreance warnings' (#30) from Ashutosh_Enhancement_#123_Possible_Null_Reference into Feature_Forum
Reviewed-on: #30
2025-04-29 05:44:32 +00:00
e6d0dbcdca Removed Possible null refreance warnings 2025-04-29 05:44:32 +00:00
a7553d8461 Merge pull request 'If a checklist item is removed while updating an activity, it must also be deleted from the database.' (#28) from Ashutosh_Bug#119_Remove_CheckList_Item into Feature_Forum
Reviewed-on: #28
2025-04-29 05:44:15 +00:00
8634af5f45 If a checklist item is removed while updating an activity, it must also be deleted from the database. 2025-04-28 12:20:16 +05:30
54b43b742a revert 37534e9b31afa317865665c805b83a4fa8edd3ab
revert If a checklist item is removed while updating an activity, it must also be deleted from the database.
2025-04-28 06:47:49 +00:00
37534e9b31 If a checklist item is removed while updating an activity, it must also be deleted from the database. 2025-04-28 12:15:00 +05:30
32ad77cace Merge pull request 'Fixed the bug of email template not found in production environment' (#27) from Ashutosh_Bug#114_Email_Template_Not_Found into Feature_Forum
Reviewed-on: #27
2025-04-28 05:12:56 +00:00
e6ecbc2f78 Fixed the bug of email template not found in production environment 2025-04-27 11:48:56 +05:30
512a899310 Added functionality to remove entries from the employee-role mapping when IsEnabled is set to false. 2025-04-26 19:06:45 +05:30
4ec27709c9 Merge pull request 'Implemented functionality to whitelist file extensions during upload to S3' (#26) from Ashutosh_Task#106_Upload_Whitelist_Only into Feature_Forum
Reviewed-on: #26
2025-04-26 10:52:30 +00:00
882dc50671 Change the to first letter of file name lowercase 2025-04-26 16:07:17 +05:30
fc050631e7 Implemented functionality to whitelist file extensions during upload to S3 2025-04-26 16:01:35 +05:30
eee07fa409 Created CRUD operation APIs for Forum Master Tables. 2025-04-26 12:19:28 +05:30
c1a55fa17b Removed tenantid filed from Dtos 2025-04-26 12:05:44 +05:30
c338140210 Added an additional column to the ticket forum table to store the linked project ID, and updated both the view models and data transfer models accordingly. 2025-04-25 21:47:06 +05:30
ace2fe7d54 Implemented core forum features including ticket creation, ticket updates, adding and updating comments, managing attachments, retrieving ticket details by ID, and fetching the ticket list 2025-04-25 17:41:44 +05:30
fce124ac8b Merge pull request 'Ashutosh_Bug#108_Attendance_log' (#25) from Ashutosh_Bug#108_Attendance_log into Feature_Forum
Reviewed-on: #25
2025-04-25 11:03:29 +00:00
5ca7d721fc The attendance logs are displaying inaccurate data during retrieval 2025-04-24 18:31:21 +05:30
9976c365eb Set connection string based on environment 2025-04-24 18:26:17 +05:30
8955bf1e6a Merge pull request 'Implemented functionality to upload captured attendance images to Amazon S3 and record associated data in the database.' (#24) from Ashutosh_Enhancement_#104_Store_Images_In_AmazonS3 into Feature_Forum
Reviewed-on: #24
2025-04-23 10:37:09 +00:00
1141971aa1 Added authorization to Attendance Controller 2025-04-23 15:50:28 +05:30
cd1f06a99d Deleted the unwanted images 2025-04-23 15:46:26 +05:30
1eab6669e1 Modified BatchId column in Document table to accept null values. 2025-04-23 15:36:56 +05:30
4d0901b4dd Implemented functionality to upload captured attendance images to Amazon S3 and record associated data in the database. 2025-04-23 15:00:38 +05:30
6c99a625b5 Add Models and Controller methods for Forum feature 2025-04-22 09:56:59 +05:30
185 changed files with 12429 additions and 14178 deletions

View File

@ -1,12 +1,15 @@
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;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.Industries;
using Marco.Pms.Model.Forum;
using Marco.Pms.Model.Master;
using Marco.Pms.Model.Projects;
using Marco.Pms.Model.Roles;
using Marco.Pms.Model.Utilities;
using Marco.Pms.Utility;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
@ -57,7 +60,7 @@ namespace Marco.Pms.DataAccess.Data
public DbSet<Attendance> Attendes { get; set; }
public DbSet<AttendanceLog> AttendanceLogs { get; set; }
// public DbSet<AttendLog> AttendLogs { get; set; }
// public DbSet<AttendLog> AttendLogs { get; set; }
@ -72,10 +75,21 @@ namespace Marco.Pms.DataAccess.Data
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<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; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@ -83,48 +97,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 =>
{
@ -136,165 +150,287 @@ 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
}, new Project
{
Id = 2,
Name = "Project 2",
ProjectAddress = "Project 2 Address",
ContactPerson = "Project 2 Contact Person",
ProjectStatusId = 2,
TenantId = 1
}, new Project
{
Id = 3,
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("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 = 1,
ActivityName = "Core Cutting",
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
TenantId = 1
}, new ActivityMaster
{
Id = 2,
ActivityName = "Fabrication",
UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
TenantId = 1
}, 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,
ActivityName = "Welding",
UnitOfMeasurement = UnitOfMeasurement.Meter.ToString(),
TenantId = 1
}, 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,
ActivityName = "MS Support Fabrication",
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
TenantId = 1
}, new ActivityMaster
{
Id = 12,
ActivityName = "MS Support Hanging",
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
TenantId = 1
}, new ActivityMaster
{
Id = 13,
ActivityName = "Hydrant Volve",
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
TenantId = 1
}, new ActivityMaster
{
Id = 14,
ActivityName = "Sprinkler Installation",
UnitOfMeasurement = UnitOfMeasurement.Number.ToString(),
TenantId = 1
}
);
//modelBuilder.Entity<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 = 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(
new TicketStatusMaster
{
Id = new Guid("6b0c409b-3e80-4165-8b39-f3fcacb4c797"),
Name = "New",
Description = "This is a newly created issue.",
ColorCode = "#FFCC99",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketStatusMaster
{
Id = new Guid("6c5ac37d-5b7d-40f3-adec-2dabaa5cca86"),
Name = "Assigned",
Description = "Assigned to employee or team of employees",
ColorCode = "#E6FF99",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketStatusMaster
{
Id = new Guid("7f96bcd5-0c66-411b-8a1d-9d1a4785194e"),
Name = "In Progress",
Description = "These issues are currently in progress",
ColorCode = "#99E6FF",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketStatusMaster
{
Id = new Guid("5c72b630-6923-4215-bf2c-b1622afd76e7"),
Name = "In Review",
Description = "These issues are currently under review",
ColorCode = "#6c757d",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketStatusMaster
{
Id = new Guid("8ff85685-a875-4f21-aa95-d99551315fcc"),
Name = "Done",
Description = "The following issues are resolved and closed",
ColorCode = "#B399FF",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
}
);
modelBuilder.Entity<TicketTypeMaster>().HasData(
new TicketTypeMaster
{
Id = new Guid("c74e5480-2b71-483c-8f4a-1a9c69c32603"),
Name = "Quality Issue",
Description = "An identified problem that affects the performance, reliability, or standards of a product or service",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketTypeMaster
{
Id = new Guid("d1f55eab-9898-4e46-9f03-b263e33e5d38"),
Name = "Help Desk",
Description = "A support service that assists users with technical issues, requests, or inquiries.",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
}
);
modelBuilder.Entity<TicketPriorityMaster>().HasData(
new TicketPriorityMaster
{
Id = new Guid("188d29b3-10f3-42d0-9587-1a46ae7a0320"),
Name = "Low",
ColorCode = "008000",
Level = 1,
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketPriorityMaster
{
Id = new Guid("0919bc84-9f82-4ecf-98c7-962755dd9a97"),
Name = "Medium",
ColorCode = "FFFF00",
Level = 2,
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
}, new TicketPriorityMaster
{
Id = new Guid("a13b7e59-16fd-4665-b5cf-a97399e8445a"),
Name = "High",
ColorCode = "#FFA500",
Level = 3,
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
}, new TicketPriorityMaster
{
Id = new Guid("f340fbc3-c9fd-46aa-b063-0093418830e4"),
Name = "Critical",
ColorCode = "#FFA500",
Level = 4,
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketPriorityMaster
{
Id = new Guid("44a7b91d-a0dd-45d1-8616-4d2f71e16401"),
Name = "Urgent",
ColorCode = "#FF0000",
Level = 5,
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
}
);
modelBuilder.Entity<TicketTagMaster>().HasData(
new TicketTagMaster
{
Id = new Guid("ef6c2a65-f61d-4537-9650-a7ab7f8d98db"),
Name = "Quality Issue",
ColorCode = "#e59866",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new TicketTagMaster
{
Id = new Guid("5a168569-8ad7-4422-8db6-51ef25caddeb"),
Name = "Help Desk",
ColorCode = "#85c1e9",
IsDefault = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
}
);
modelBuilder.Entity<WorkCategoryMaster>().HasData(
new WorkCategoryMaster
{
Id = new Guid("86bb2cc8-f6b5-4fdd-bbee-c389c713a44b"),
Name = "Fresh Work",
Description = "Created new task in a professional or creative context",
IsSystem = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new WorkCategoryMaster
{
Id = new Guid("9ebfa19c-53b9-481b-b863-c25d2f843201"),
Name = "Rework",
Description = "Revising, modifying, or correcting a task to improve its quality or fix issues",
IsSystem = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
},
new WorkCategoryMaster
{
Id = new Guid("11a79929-1d07-42dc-9e98-82d0d2f4a240"),
Name = "Quality Issue",
Description = "Any defect, deviation, or non-conformance in a task that fails to meet established standards or customer expectations.",
IsSystem = true,
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
}
);
}
private static void ManageApplicationStructure(ModelBuilder modelBuilder)
@ -323,19 +459,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"
@ -344,23 +480,23 @@ 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(
new FeaturePermission { Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project" , Description=""},
new FeaturePermission { Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project", Description = "" },
new FeaturePermission { Id = new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Project", Description = "" },
new FeaturePermission { Id = new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Team", Description = "" },

View File

@ -1,7 +1,7 @@
using Marco.Pms.DataAccess.Data;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.ViewModels;
using Marco.Pms.Model.ViewModels.Projects;
using Marco.Pms.Utility;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
@ -34,7 +34,10 @@ namespace Marco.Pms.DataAccess.Initializer
_db.Database.Migrate();
}
}
catch (Exception ex) { }
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
// Create roes if not created
@ -59,12 +62,12 @@ 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();
ApplicationUser user = _db.ApplicationUsers.FirstOrDefault(u => u.Email == "admin@marcobms.com");
ApplicationUser user = _db.ApplicationUsers.FirstOrDefault(u => u.Email == "admin@marcobms.com") ?? new ApplicationUser();
_userManager.AddToRoleAsync(user, APP_ROLES.Admin.ToString()).GetAwaiter().GetResult();
Employee emp = new Employee()

View File

@ -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

View File

@ -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");
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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");
}
}
}

View File

@ -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");
}
}
}

View File

@ -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");
}
}
}

View File

@ -0,0 +1,109 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Changed_DataType_ApproverdBY : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "ActivityMasters",
keyColumn: "Id",
keyValue: new Guid("1714f64d-7591-4419-bee5-118d21bb2855"));
migrationBuilder.DeleteData(
table: "ActivityMasters",
keyColumn: "Id",
keyValue: new Guid("4117b7de-ef6c-461f-a2c2-64eaac5f9a11"));
migrationBuilder.DeleteData(
table: "ActivityMasters",
keyColumn: "Id",
keyValue: new Guid("53eedf44-4076-445f-be93-fedef17117e7"));
migrationBuilder.DeleteData(
table: "ActivityMasters",
keyColumn: "Id",
keyValue: new Guid("715b9ddb-d9e2-4afa-8987-d9918905cea4"));
migrationBuilder.DeleteData(
table: "ActivityMasters",
keyColumn: "Id",
keyValue: new Guid("a3d191a7-a5aa-4dd8-a525-12c99263bbd6"));
migrationBuilder.DeleteData(
table: "ActivityMasters",
keyColumn: "Id",
keyValue: new Guid("b3f51a93-dde6-45f9-8b22-f1bf017a640b"));
migrationBuilder.DeleteData(
table: "ActivityMasters",
keyColumn: "Id",
keyValue: new Guid("c138a7de-713a-4bd4-8292-b0b265be77a3"));
migrationBuilder.DeleteData(
table: "Projects",
keyColumn: "Id",
keyValue: new Guid("3ef56a12-f5e5-4193-87d6-9e110ed10b86"));
migrationBuilder.DeleteData(
table: "Projects",
keyColumn: "Id",
keyValue: new Guid("54d013e3-0a2b-48be-85c7-5ef03492a18c"));
migrationBuilder.AlterColumn<Guid>(
name: "ApprovedBy",
table: "Attendes",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci",
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "ApprovedBy",
table: "Attendes",
type: "int",
nullable: true,
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true)
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.InsertData(
table: "ActivityMasters",
columns: new[] { "Id", "ActivityName", "IsActive", "TenantId", "UnitOfMeasurement" },
values: new object[,]
{
{ new Guid("1714f64d-7591-4419-bee5-118d21bb2855"), "Fabrication", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Meter" },
{ new Guid("4117b7de-ef6c-461f-a2c2-64eaac5f9a11"), "Core Cutting", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" },
{ new Guid("53eedf44-4076-445f-be93-fedef17117e7"), "MS Support Fabrication", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" },
{ new Guid("715b9ddb-d9e2-4afa-8987-d9918905cea4"), "MS Support Hanging", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" },
{ new Guid("a3d191a7-a5aa-4dd8-a525-12c99263bbd6"), "Hydrant Volve", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" },
{ new Guid("b3f51a93-dde6-45f9-8b22-f1bf017a640b"), "Welding", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Meter" },
{ new Guid("c138a7de-713a-4bd4-8292-b0b265be77a3"), "Sprinkler Installation", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26"), "Number" }
});
migrationBuilder.InsertData(
table: "Projects",
columns: new[] { "Id", "ContactPerson", "EndDate", "Name", "ProjectAddress", "ProjectStatusId", "StartDate", "TenantId" },
values: new object[,]
{
{ new Guid("3ef56a12-f5e5-4193-87d6-9e110ed10b86"), "Project 2 Contact Person", new DateTime(2026, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), "Project 2", "Project 2 Address", new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"), new DateTime(2025, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
{ new Guid("54d013e3-0a2b-48be-85c7-5ef03492a18c"), "Project 3 Contact Person", new DateTime(2026, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), "Project 3", "Project 3 Address", new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"), new DateTime(2025, 4, 20, 10, 11, 17, 588, DateTimeKind.Unspecified), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
});
}
}
}

View File

@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Added_IsSystem_Flag : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsSystem",
table: "Employees",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsSystem",
table: "ApplicationRoles",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsSystem",
table: "Employees");
migrationBuilder.DropColumn(
name: "IsSystem",
table: "ApplicationRoles");
}
}
}

View File

@ -0,0 +1,63 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Added_WorkCategory_Master_Table : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "WorkCategoryMasters",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_WorkCategoryMasters", x => x.Id);
table.ForeignKey(
name: "FK_WorkCategoryMasters_Tenants_TenantId",
column: x => x.TenantId,
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.InsertData(
table: "WorkCategoryMasters",
columns: new[] { "Id", "Description", "IsSystem", "Name", "TenantId" },
values: new object[,]
{
{ new Guid("11a79929-1d07-42dc-9e98-82d0d2f4a240"), "Any defect, deviation, or non-conformance in a task that fails to meet established standards or customer expectations.", true, "Quality Issue", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
{ new Guid("86bb2cc8-f6b5-4fdd-bbee-c389c713a44b"), "Created new task in a professional or creative context", true, "Fresh Work", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
{ new Guid("9ebfa19c-53b9-481b-b863-c25d2f843201"), "Revising, modifying, or correcting a task to improve its quality or fix issues", true, "Rework", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
});
migrationBuilder.CreateIndex(
name: "IX_WorkCategoryMasters_TenantId",
table: "WorkCategoryMasters",
column: "TenantId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "WorkCategoryMasters");
}
}
}

View File

@ -0,0 +1,50 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Added_Foreign_key_For_WorkCategery_To_WorkItem : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "WorkCategoryId",
table: "WorkItems",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.CreateIndex(
name: "IX_WorkItems_WorkCategoryId",
table: "WorkItems",
column: "WorkCategoryId");
migrationBuilder.AddForeignKey(
name: "FK_WorkItems_WorkCategoryMasters_WorkCategoryId",
table: "WorkItems",
column: "WorkCategoryId",
principalTable: "WorkCategoryMasters",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_WorkItems_WorkCategoryMasters_WorkCategoryId",
table: "WorkItems");
migrationBuilder.DropIndex(
name: "IX_WorkItems_WorkCategoryId",
table: "WorkItems");
migrationBuilder.DropColumn(
name: "WorkCategoryId",
table: "WorkItems");
}
}
}

View File

@ -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; }
}
}

View File

@ -5,22 +5,22 @@ 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; }
}
}

View File

@ -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; }

View File

@ -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; }
}
}

View File

@ -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; }
@ -23,17 +22,9 @@ namespace Marco.Pms.Model.AttendanceModule
public bool IsApproved { get; set; }
public ATTENDANCE_MARK_TYPE Activity { get; set; }
public int? ApprovedBy { get; set; }
public Guid? ApprovedBy { get; set; }
[ForeignKey("EmployeeID")]
[ValidateNever]
public Employee? Approver { get; set; }
[DisplayName("TenantId")]
public int TenantId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant? Tenant { get; set; }
}
}

View File

@ -1,23 +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; }
@ -36,16 +36,15 @@ 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; }
[DisplayName("TenantId")]
public int TenantId { get; set; }
public Guid? DocumentId { get; set; }
[ForeignKey("DocumentId")]
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant? Tenant { get; set; }
public Document? Document { get; set; }
}
}

View File

@ -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; }

View File

@ -0,0 +1,25 @@
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.DocumentManager
{
public class Document : TenantRelation
{
public Guid Id { get; set; }
public Guid? BatchId { get; set; }
public string FileName { get; set; } = string.Empty;
/// <summary>
/// Full S3 object key
/// </summary>
public string S3Key { get; set; } = string.Empty;
/// <summary>
/// S3 key for thumbnail image
/// </summary>
public string? ThumbS3Key { get; set; }
public string? Base64Data { get; set; }
public long FileSize { get; set; }
public string ContentType { get; set; } = string.Empty;
public DateTime UploadedAt { get; set; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}

View File

@ -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; }

View File

@ -2,8 +2,8 @@
{
public class ReportCheckListDto
{
public int Id { get; set; }
public string Description { get; set; }= string.Empty;
public Guid Id { get; set; }
public string Description { get; set; } = string.Empty;
public bool IsMandatory { get; set; }
public bool IsChecked { get; set; }
}

View File

@ -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; }

View File

@ -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; }
@ -18,7 +18,7 @@ namespace Marco.Pms.Model.Dtos.Attendance
public ATTENDANCE_MARK_TYPE Action { get; set; }
public List<FileUploadModel>? Image { get; set; }
public FileUploadModel? Image { get; set; }
}
public enum ATTENDANCE_MARK_TYPE

View File

@ -1,9 +1,8 @@
using Marco.Pms.Model.Employees;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
namespace Marco.Pms.Model.Dtos.Employees
{
public class ApplicationUserDto
public class ApplicationUserDto
{
public ApplicationUserDto() { }
public int? Id { get; set; }
@ -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; }
}
}

View File

@ -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; }
@ -13,7 +13,7 @@
public string? JoiningDate { get; set; }
public string? PermanentAddress { get; set; }
public string? CurrentAddress { get; set; }
public string? CurrentAddress { get; set; }
public string? PhoneNumber { get; set; }
public string? EmergencyPhoneNumber { get; set; }
@ -26,17 +26,17 @@
//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 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; }
public string? LastName { get; set; }
public string? Gender { get; set; }
public string? Gender { get; set; }
public string? CurrentAddress { get; set; }
public string? PhoneNumber { 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; }
}
}

View File

@ -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; }
}

View File

@ -0,0 +1,12 @@
namespace Marco.Pms.Model.Dtos.Forum
{
public class AddCommentDto
{
public Guid TicketId { get; set; } = Guid.Empty;
public Guid AuthorId { get; set; }
public string MessageText { get; set; } = string.Empty;
public DateTime SentAt { get; set; }
public Guid? ParentMessageId { get; set; } // For threaded replies
public ICollection<ForumAttachmentDto>? Attachments { get; set; }
}
}

View File

@ -0,0 +1,17 @@
namespace Marco.Pms.Model.Dtos.Forum
{
public class CreateTicketDto
{
public string Subject { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public Guid StatusId { get; set; }
public Guid TypeId { get; set; } // QualityIssue, HelpDesk, Feedback
public Guid CreatedById { get; set; }
public DateTime CreatedAt { get; set; }
public Guid? LinkedProjectId { get; set; }
public Guid? LinkedActivityId { get; set; } // task or project ID
public ICollection<ForumAttachmentDto>? Attachments { get; set; }
public Guid PriorityId { get; set; }
public ICollection<Guid>? TagIds { get; set; }
}
}

View File

@ -0,0 +1,13 @@
namespace Marco.Pms.Model.Dtos.Forum
{
public class ForumAttachmentDto
{
public Guid? TicketId { get; set; }
public Guid? CommentId { get; set; }
public string FileName { get; set; } = string.Empty;
public string? Base64Data { get; set; }
public int FileSize { get; set; }
public string ContentType { get; set; } = string.Empty;
public DateTime SentAt { get; set; }
}
}

View File

@ -0,0 +1,14 @@
namespace Marco.Pms.Model.Dtos.Forum
{
public class UpdateAttachmentDto
{
public Guid Id { get; set; }
public Guid TicketId { get; set; } = Guid.Empty;
public Guid? CommentId { get; set; }
public string FileName { get; set; } = string.Empty;
public string? Base64Data { get; set; }
public int FileSize { get; set; }
public string ContentType { get; set; } = string.Empty;
public DateTime SentAt { get; set; }
}
}

View File

@ -0,0 +1,13 @@
namespace Marco.Pms.Model.Dtos.Forum
{
public class UpdateCommentDto
{
public Guid Id { get; set; }
public Guid TicketId { get; set; }
public Guid AuthorId { get; set; }
public string MessageText { get; set; } = string.Empty;
public DateTime SentAt { get; set; }
public Guid? ParentMessageId { get; set; } // For threaded replies
public ICollection<UpdateAttachmentDto>? Attachments { get; set; }
}
}

View File

@ -0,0 +1,18 @@
namespace Marco.Pms.Model.Dtos.Forum
{
public class UpdateTicketDto
{
public Guid Id { get; set; }
public string Subject { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public Guid StatusId { get; set; }
public Guid TypeId { get; set; } // QualityIssue, HelpDesk, Feedback
public Guid CreatedById { get; set; }
public DateTime CreatedAt { get; set; }
public Guid? LinkedProjectId { get; set; }
public Guid? LinkedActivityId { get; set; } // task or project ID
public ICollection<UpdateAttachmentDto>? Attachments { get; set; }
public Guid PriorityId { get; set; }
public ICollection<Guid>? TagIds { get; set; }
}
}

View File

@ -0,0 +1,11 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class TicketPriorityMasterDto
{
public Guid? Id { get; set; }
public string Name { get; set; } = string.Empty; // e.g., Low, Medium, High, Critical
public int Level { get; set; } // 1 = Low, 2 = Medium...
public string? ColorCode { get; set; }
public bool IsDefault { get; set; }
}
}

View File

@ -0,0 +1,11 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class TicketStatusMasterDto
{
public Guid? Id { get; set; }
public string Name { get; set; } = string.Empty; // e.g., "Open", "In Progress"
public string? Description { get; set; }
public string? ColorCode { get; set; } // e.g., "#FF0000"
public bool IsDefault { get; set; } // true for system defaults
}
}

View File

@ -0,0 +1,10 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class TicketTagMasterDto
{
public Guid? Id { get; set; }
public string Name { get; set; } = string.Empty; // e.g., "Bug", "UI", "Urgent"
public string? ColorCode { get; set; }
public bool IsDefault { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class TicketTypeMasterDto
{
public Guid? Id { get; set; }
public string Name { get; set; } = string.Empty; // e.g., "Quality Issue"
public string? Description { get; set; }
public bool IsDefault { get; set; } // true for system defaults
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class WorkCategoryMasterDto
{
public Guid? Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}

View File

@ -4,8 +4,8 @@ using System.ComponentModel.DataAnnotations;
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; }
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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 int ActivityID { get; set; }
public Guid? Id { get; set; }
public Guid WorkAreaID { get; set; }
public Guid WorkCategoryId { get; set; }
public Guid ActivityID { get; set; }
public int PlannedWork { get; set; }
public int CompletedWork { get; set; }
public int TenantId { get; set; }
}
}

View File

@ -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; }
}

View File

@ -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; }
}

View File

@ -1,13 +1,14 @@
using Marco.Pms.Model.Entitlements;
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.Roles;
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 +36,17 @@ 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 bool IsSystem { get; set; } = false;
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; }

View File

@ -1,13 +1,14 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Roles;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Entitlements
namespace Marco.Pms.Model.Employees
{
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,12 +20,7 @@ namespace Marco.Pms.Model.Entitlements
public bool IsEnabled { get; set; }
public int TenantId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant? Tenant { get; set; }
}
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -1,22 +0,0 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Entitlements
{
public class ActivityMaster
{
public int Id { get; set; }
public string? ActivityName { get; set; }
public string? UnitOfMeasurement { get; set; }
[DisplayName("TenantId")]
public int TenantId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant? Tenant { get; set; }
public bool IsActive { get; set; } = true;
}
}

View File

@ -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;

View File

@ -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; }
}
}

View File

@ -1,12 +1,12 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Industries;
using Marco.Pms.Model.Master;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
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,11 +14,11 @@ 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]
public Industry? Industry{ get; set; }
public Industry? Industry { get; set; }
public bool IsActive { get; set; } = true;
}

View File

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Master;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Entitlements

View File

@ -1,17 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Entitlements
{
public class JobRole
{
public int Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
public int TenantId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant? Tenant { get; set; }
}
}

View File

@ -1,19 +0,0 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Entitlements
{
public class StatusMaster
{
public int Id { get; set; }
public string? Status { get; set; }
[DisplayName("TenantId")]
public int TenantId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant? Tenant { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Forum
{
public class TicketAttachment
{
public Guid Id { get; set; }
public Guid TicketId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TicketId))]
public TicketForum? Ticket { get; set; }
public Guid? CommentId { get; set; }
[ValidateNever]
[ForeignKey(nameof(CommentId))]
public TicketComment? TicketComment { get; set; }
public string FileName { get; set; } = string.Empty;
public Guid FileId { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.Forum
{
public class TicketComment : TenantRelation
{
public Guid Id { get; set; }
public Guid TicketId { get; set; }
public Guid AuthorId { get; set; }
public string MessageText { get; set; } = string.Empty;
public DateTime SentAt { get; set; }
public Guid? ParentMessageId { get; set; } // For threaded replies
public ICollection<TicketAttachment>? Attachments { get; set; }
}
}

View File

@ -0,0 +1,38 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Master;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Forum
{
public class TicketForum : TenantRelation
{
public Guid Id { get; set; }
public string Subject { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public Guid StatusId { get; set; }
[ValidateNever]
[ForeignKey(nameof(StatusId))]
public TicketStatusMaster? TicketStatusMaster { get; set; }
public Guid TypeId { get; set; } // QualityIssue, HelpDesk, Feedback
[ValidateNever]
[ForeignKey(nameof(TypeId))]
public TicketTypeMaster? TicketTypeMaster { get; set; }
public Guid CreatedById { get; set; }
public DateTime CreatedAt { get; set; }
public Guid? LinkedProjectId { get; set; }
public Guid? LinkedActivityId { get; set; } // task or project ID
//public ICollection<TicketComment>? Comments { get; set; } // view model
//public ICollection<TicketAttachment>? Attachments { get; set; } // view model
public Guid PriorityId { get; set; }
[ValidateNever]
[ForeignKey(nameof(PriorityId))]
public TicketPriorityMaster? Priority { get; set; }
//public ICollection<TicketTag>? Tags { get; set; } // view model
}
}

View File

@ -0,0 +1,15 @@
using Marco.Pms.Model.Master;
namespace Marco.Pms.Model.Forum
{
public class TicketTag
{
public Guid Id { get; set; }
public Guid TicketId { get; set; }
public TicketForum? Ticket { get; set; }
public Guid TagId { get; set; }
public TicketTagMaster? Tag { get; set; }
}
}

View File

@ -1,13 +1,14 @@
using Marco.Pms.Model.Activities;
using Marco.Pms.Model.Dtos.Activities;
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.Master;
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 +21,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 +54,6 @@ namespace Marco.Pms.Model.Mapper
ReportedDate = taskAllocation.ReportedDate,
Description = taskAllocation.Description,
AssignBy = employeeName,
Tenant = tenant,
WorkItem = taskAllocation.WorkItem
};
}
@ -63,11 +65,10 @@ namespace Marco.Pms.Model.Mapper
AssignmentDate = taskAllocation.AssignmentDate,
PlannedTask = taskAllocation.PlannedTask,
CompletedTask = taskAllocation.CompletedTask,
ReportedDate= taskAllocation.ReportedDate,
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 +82,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
{
@ -102,12 +102,11 @@ namespace Marco.Pms.Model.Mapper
Id = taskAllocation.Id,
AssignmentDate = taskAllocation.AssignmentDate,
PlannedTask = taskAllocation.PlannedTask,
ReportedDate = taskAllocation.ReportedDate,
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,11 +118,11 @@ 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()
};
}
public static ActivityVM ToActivityVMFromActivityMaster(this ActivityMaster activity,List<CheckListVM> checkList)
public static ActivityVM ToActivityVMFromActivityMaster(this ActivityMaster activity, List<CheckListVM> checkList)
{
return new ActivityVM
{
@ -133,7 +132,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 +143,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
{

View File

@ -1,6 +1,7 @@
using Marco.Pms.Model.Dtos.Roles;
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.Roles;
using Marco.Pms.Model.ViewModels;
using Marco.Pms.Model.ViewModels.Roles;
#nullable disable
namespace Marco.Pms.Model.Mapper
{
@ -12,11 +13,12 @@ namespace Marco.Pms.Model.Mapper
{
Id = model.Id,
Role = model.Role,
IsSystem = model.IsSystem,
Description = model.Description,
//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 +29,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 +41,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 +52,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
{
@ -72,4 +74,4 @@ namespace Marco.Pms.Model.Mapper
}
}
}
}

View File

@ -0,0 +1,29 @@
using Marco.Pms.Model.AttendanceModule;
using Marco.Pms.Model.ViewModels.Activities;
using Marco.Pms.Model.ViewModels.AttendanceVM;
namespace Marco.Pms.Model.Mapper
{
public static class AttendanceMapper
{
public static AttendanceLogVM ToAttendanceLogVMFromAttendanceLog(this AttendanceLog attendanceLog, string preSignedUrl, string thumbPreSignedUrl)
{
return new AttendanceLogVM
{
Id = attendanceLog.Id,
Comment = attendanceLog.Comment,
Employee = attendanceLog.Employee != null ? attendanceLog.Employee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM(),
ActivityTime = attendanceLog.ActivityTime,
Activity = attendanceLog.Activity,
Photo = attendanceLog.Photo,
Latitude = attendanceLog.Latitude,
Longitude = attendanceLog.Longitude,
UpdatedOn = attendanceLog.UpdatedOn,
UpdatedByEmployee = attendanceLog.UpdatedByEmployee != null ? attendanceLog.UpdatedByEmployee.ToBasicEmployeeVMFromEmployee() : new BasicEmployeeVM(),
DocumentId = attendanceLog.Document != null ? attendanceLog.Document.Id : null,
PreSignedUrl = preSignedUrl,
ThumbPreSignedUrl = thumbPreSignedUrl,
};
}
}
}

View File

@ -29,23 +29,12 @@ namespace Marco.Pms.Model.Mapper
PhoneNumber = model.PhoneNumber,
Photo = model.Photo,
IsActive = model.IsActive,
IsSystem = model.IsSystem,
JoiningDate = model.JoiningDate
};
}
public static BasicEmployeeVM ToBasicEmployeeVMFromEmployee(this Employee employee)
{
if (employee.JobRole == null)
{
return new BasicEmployeeVM
{
Id = employee.Id,
FirstName = employee.FirstName,
LastName = employee.LastName,
Photo = employee.Photo,
JobRoleId = employee.JobRoleId,
JobRoleName = ""
};
}
return new BasicEmployeeVM
{
Id = employee.Id,
@ -53,7 +42,7 @@ namespace Marco.Pms.Model.Mapper
LastName = employee.LastName,
Photo = employee.Photo,
JobRoleId = employee.JobRoleId,
JobRoleName = employee.JobRole.Name
JobRoleName = employee.JobRole != null ? employee.JobRole.Name : ""
};
}
}

View File

@ -1,5 +1,5 @@
using Marco.Pms.Model.Dtos.Employees;
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.Employees;
namespace Marco.Pms.Model.Mapper
{
@ -15,12 +15,12 @@ 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));
Guid id = (string.IsNullOrEmpty(model.Id) ? Guid.NewGuid() : new Guid(model.Id));
return new EmployeeRoleMapping
{
Id = id,
Id = id,
RoleId = model.RoleId,
EmployeeId = model.EmployeeId,
IsEnabled = model.IsEnabled,
@ -28,7 +28,7 @@ namespace Marco.Pms.Model.Mapper
};
}
//public static EmployeeRole ToEmployeeRoleFromUpdateDto(this UpdateApplicationRoleDto model, int TenantId)
//{
// return new EmployeeRole

View File

@ -1,5 +1,5 @@
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.ViewModels;
using Marco.Pms.Model.ViewModels.Master;
namespace Marco.Pms.Model.Mapper
{

View File

@ -0,0 +1,252 @@
using Marco.Pms.Model.DocumentManager;
using Marco.Pms.Model.Dtos.Forum;
using Marco.Pms.Model.Dtos.Master;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Forum;
using Marco.Pms.Model.Master;
using Marco.Pms.Model.ViewModels.Forum;
namespace Marco.Pms.Model.Mapper
{
public static class ForumMapper
{
public static TicketForum ToTicketForumFromCreateTicketDto(this CreateTicketDto createTicketDto, Guid tenantId)
{
return new TicketForum
{
Subject = createTicketDto.Subject,
Description = createTicketDto.Description,
StatusId = createTicketDto.StatusId,
TypeId = createTicketDto.TypeId,
CreatedById = createTicketDto.CreatedById,
CreatedAt = createTicketDto.CreatedAt,
LinkedProjectId = createTicketDto.LinkedProjectId,
LinkedActivityId = createTicketDto.LinkedActivityId,
PriorityId = createTicketDto.PriorityId,
TenantId = tenantId,
};
}
public static TicketForum ToTicketForumFromUpdateTicketDto(this UpdateTicketDto updateTicketDto, TicketForum ticket)
{
return new TicketForum
{
Id = updateTicketDto.Id,
Subject = updateTicketDto.Subject,
Description = updateTicketDto.Description,
StatusId = updateTicketDto.StatusId,
TypeId = updateTicketDto.TypeId,
CreatedById = ticket.CreatedById,
CreatedAt = ticket.CreatedAt,
LinkedProjectId = ticket.LinkedProjectId,
LinkedActivityId = ticket.LinkedActivityId,
PriorityId = updateTicketDto.PriorityId,
TenantId = ticket.TenantId
};
}
public static TicketComment ToTicketCommentFromAddCommentDto(this AddCommentDto commentDto, Guid tenantId)
{
return new TicketComment
{
TicketId = commentDto.TicketId,
AuthorId = commentDto.AuthorId,
MessageText = commentDto.MessageText,
SentAt = commentDto.SentAt,
ParentMessageId = commentDto.ParentMessageId,
TenantId = tenantId,
};
}
public static TicketComment ToTicketCommentFromUpdateCommentDto(this UpdateCommentDto updateComment, Guid tenantId, TicketComment comment)
{
return new TicketComment
{
Id = updateComment.Id,
TicketId = updateComment.TicketId,
AuthorId = comment.AuthorId,
MessageText = updateComment.MessageText,
SentAt = comment.SentAt,
ParentMessageId = updateComment.ParentMessageId,
TenantId = tenantId,
};
}
public static TicketAttachment ToTicketAttachmentFromForumAttachmentDto(this ForumAttachmentDto AttachmentDto, Guid ticketId, Guid fileId, Guid? commentId = null)
{
return new TicketAttachment
{
TicketId = ticketId,
CommentId = commentId,
FileName = AttachmentDto.FileName,
FileId = fileId,
};
}
public static TicketAttachment ToTicketAttachmentFromUpdateAttachmentDto(this UpdateAttachmentDto AttachmentDto, Guid ticketId, Guid fileId, Guid? commentId = null)
{
return new TicketAttachment
{
TicketId = ticketId,
CommentId = commentId,
FileName = AttachmentDto.FileName,
FileId = fileId,
};
}
public static Document ToDocumentFromForumAttachmentDto(this ForumAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, Guid tenantId)
{
return new Document
{
FileName = AttachmentDto.FileName,
ContentType = AttachmentDto.ContentType,
S3Key = objectKey,
ThumbS3Key = thumbS3Key,
Base64Data = AttachmentDto.Base64Data,
FileSize = AttachmentDto.FileSize,
UploadedAt = uploadedAt,
TenantId = tenantId
};
}
public static Document ToDocumentFromUpdateAttachmentDto(this UpdateAttachmentDto AttachmentDto, string objectKey, string thumbS3Key, DateTime uploadedAt, Guid tenantId)
{
return new Document
{
FileName = AttachmentDto.FileName,
ContentType = AttachmentDto.ContentType,
S3Key = objectKey,
ThumbS3Key = thumbS3Key,
Base64Data = AttachmentDto.Base64Data,
FileSize = AttachmentDto.FileSize,
UploadedAt = uploadedAt,
TenantId = tenantId
};
}
public static ForumTicketVM ToForumTicketVMFromTicketForum(this TicketForum ticket, Employee employee)
{
return new ForumTicketVM
{
Id = ticket.Id,
Subject = ticket.Subject,
Description = ticket.Description,
CreatedAt = ticket.CreatedAt,
LinkedProjectId = ticket.LinkedProjectId,
LinkedActivityId = ticket.LinkedActivityId,
Status = ticket.TicketStatusMaster != null ? ticket.TicketStatusMaster.ToTicketStatusVMFromTicketStatusMaster() : new TicketStatusVM(),
Priority = ticket.Priority != null ? ticket.Priority.ToTicketPriorityVMFromTicketPriorityMaster() : new TicketPriorityVM(),
Type = ticket.TicketTypeMaster != null ? ticket.TicketTypeMaster.ToTicketTypeVMFromTicketTypeMaster() : new TicketTypeVM(),
CreatedBy = employee.ToBasicEmployeeVMFromEmployee(),
};
}
public static TicketAttachmentVM ToTicketAttachmentVMFromTicketAttachment(this TicketAttachment attachment, string preSignedUrl, string thumbPreSignedUrl)
{
return new TicketAttachmentVM
{
Id = attachment.Id,
TicketId = attachment.TicketId,
CommentId = attachment.CommentId,
FileName = attachment.FileName,
PreSignedUrl = preSignedUrl,
ThumbPreSignedUrl = thumbPreSignedUrl
};
}
public static TicketCommentVM ToTicketCommentVMFromTicketComment(this TicketComment comment, Employee employee)
{
return new TicketCommentVM
{
Id = comment.Id,
TicketId = comment.TicketId,
Author = employee.ToBasicEmployeeVMFromEmployee(),
MessageText = comment.MessageText,
SentAt = comment.SentAt,
ParentMessageId = comment.ParentMessageId,
Attachments = new List<TicketAttachmentVM>()
};
}
public static TicketStatusVM ToTicketStatusVMFromTicketStatusMaster(this TicketStatusMaster statusMaster)
{
return new TicketStatusVM
{
Id = statusMaster.Id,
Name = statusMaster.Name,
Description = statusMaster.Description,
ColorCode = statusMaster.ColorCode,
IsDefault = statusMaster.IsDefault
};
}
public static TicketStatusMaster ToTicketStatusMasterFromTicketStatusMasterDto(this TicketStatusMasterDto statusMasterDto, Guid tenantId)
{
return new TicketStatusMaster
{
Id = statusMasterDto.Id != null ? statusMasterDto.Id.Value : Guid.Empty,
Name = statusMasterDto.Name,
Description = statusMasterDto.Description,
ColorCode = statusMasterDto.ColorCode,
IsDefault = statusMasterDto.IsDefault,
TenantId = tenantId
};
}
public static TicketPriorityVM ToTicketPriorityVMFromTicketPriorityMaster(this TicketPriorityMaster priorityMaster)
{
return new TicketPriorityVM
{
Id = priorityMaster.Id,
Name = priorityMaster.Name,
Level = priorityMaster.Level,
ColorCode = priorityMaster.ColorCode,
IsDefault = priorityMaster.IsDefault
};
}
public static TicketPriorityMaster ToTicketPriorityMasterFromTicketPriorityMasterDto(this TicketPriorityMasterDto priorityMasterDto, Guid tenantId)
{
return new TicketPriorityMaster
{
Id = priorityMasterDto.Id != null ? priorityMasterDto.Id.Value : Guid.Empty,
Name = priorityMasterDto.Name,
Level = priorityMasterDto.Level,
ColorCode = priorityMasterDto.ColorCode,
IsDefault = priorityMasterDto.IsDefault,
TenantId = tenantId
};
}
public static TicketTypeVM ToTicketTypeVMFromTicketTypeMaster(this TicketTypeMaster typeMaster)
{
return new TicketTypeVM
{
Id = typeMaster.Id,
Name = typeMaster.Name,
Description = typeMaster.Description,
IsDefault = typeMaster.IsDefault
};
}
public static TicketTypeMaster ToTicketTypeMasterFromTicketTypeMasterDto(this TicketTypeMasterDto typeMasterDto, Guid tenantId)
{
return new TicketTypeMaster
{
Id = typeMasterDto.Id != null ? typeMasterDto.Id.Value : Guid.Empty,
Name = typeMasterDto.Name,
Description = typeMasterDto.Description,
IsDefault = typeMasterDto.IsDefault,
TenantId = tenantId
};
}
public static TicketTagVM ToTicketTagVMFromTicketTagMaster(this TicketTagMaster tagMaster)
{
return new TicketTagVM
{
Id = tagMaster.Id,
Name = tagMaster.Name,
ColorCode = tagMaster.ColorCode,
IsDefault = tagMaster.IsDefault
};
}
public static TicketTagMaster ToTicketTagMasterFromTicketTagMasterDto(this TicketTagMasterDto tagMasterDto, Guid tenantId)
{
return new TicketTagMaster
{
Id = tagMasterDto.Id != null ? tagMasterDto.Id.Value : Guid.Empty,
Name = tagMasterDto.Name,
ColorCode = tagMasterDto.ColorCode,
IsDefault = tagMasterDto.IsDefault,
TenantId = tenantId
};
}
}
}

View File

@ -5,60 +5,61 @@ 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,
WorkCategoryId = model.WorkCategoryId,
TaskDate = DateTime.Now,
TenantId = model.TenantId,
WorkAreaId = model.WorkAreaID
TenantId = tenantId,
WorkAreaId = model.WorkAreaID
};
}

View File

@ -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,
@ -19,7 +20,7 @@ namespace Marco.Pms.Model.Mapper
};
}
public static InquiryEmailObject ToInquiryEmailObjectFromInquiriesDto(this InquiryDto inquiryDto,string industryName)
public static InquiryEmailObject ToInquiryEmailObjectFromInquiriesDto(this InquiryDto inquiryDto, string industryName)
{
return new InquiryEmailObject
{

View File

@ -0,0 +1,31 @@
using Marco.Pms.Model.Dtos.Master;
using Marco.Pms.Model.Master;
using Marco.Pms.Model.ViewModels.Master;
namespace Marco.Pms.Model.Mapper
{
public static class MasterMapper
{
// -------------------------------- Work Category --------------------------------
public static WorkCategoryMaster ToWorkCategoryMasterFromWorkCategoryMasterDto(this WorkCategoryMasterDto categoryMasterDto, Guid tenantId)
{
return new WorkCategoryMaster
{
Id = categoryMasterDto.Id ?? Guid.Empty,
Name = categoryMasterDto.Name,
Description = categoryMasterDto.Description ?? "",
TenantId = tenantId
};
}
public static WorkCategoryMasterVM ToWorkCategoryMasterVMFromWorkCategoryMaster(this WorkCategoryMaster categoryMaster)
{
return new WorkCategoryMasterVM
{
Id = categoryMaster.Id,
Name = categoryMaster.Name,
Description = categoryMaster.Description ?? "",
IsSystem = categoryMaster.IsSystem
};
}
}
}

View File

@ -1,6 +1,6 @@
using Marco.Pms.Model.Dtos.Project;
using Marco.Pms.Model.Projects;
using Marco.Pms.Model.ViewModels;
using Marco.Pms.Model.ViewModels.Projects;
namespace Marco.Pms.Model.Mapper
{
@ -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
};
}
}

View File

@ -0,0 +1,14 @@
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.Master
{
public class ActivityMaster : TenantRelation
{
public Guid Id { get; set; }
public string? ActivityName { get; set; }
public string? UnitOfMeasurement { get; set; }
public bool IsActive { get; set; } = true;
}
}

View File

@ -1,12 +1,13 @@
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Entitlements;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Entitlements
namespace Marco.Pms.Model.Master
{
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; }

View File

@ -1,8 +1,8 @@
namespace Marco.Pms.Model.Industries
namespace Marco.Pms.Model.Master
{
public class Industry
{
public int Id { get; set; }
public Guid Id { get; set; }
public string? Name { get; set; }
}
}

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Marco.Pms.Model.Entitlements
namespace Marco.Pms.Model.Master
{
public class Module
{
@ -10,14 +10,14 @@ 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; }
public string? Description { get; set; }
public string Key { get; set; }

View File

@ -0,0 +1,11 @@
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.Master
{
public class StatusMaster : TenantRelation
{
public Guid Id { get; set; }
public string? Status { get; set; }
}
}

View File

@ -0,0 +1,13 @@
namespace Marco.Pms.Model.Master
{
public class TicketPriorityMaster
{
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 Guid TenantId { get; set; }
}
}

View File

@ -0,0 +1,13 @@
namespace Marco.Pms.Model.Master
{
public class TicketStatusMaster
{
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 Guid TenantId { get; set; } // or nullable if global
}
}

View File

@ -0,0 +1,12 @@
namespace Marco.Pms.Model.Master
{
public class TicketTagMaster
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty; // e.g., "Bug", "UI", "Urgent"
public string? ColorCode { get; set; }
public Guid TenantId { get; set; }
public bool IsDefault { get; set; }
}
}

View File

@ -0,0 +1,12 @@
namespace Marco.Pms.Model.Forum
{
public class TicketTypeMaster
{
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 Guid TenantId { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.Master
{
public class WorkCategoryMaster : TenantRelation
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public bool IsSystem { get; set; } = false;
}
}

Some files were not shown because too many files have changed in this diff Show More