Compare commits
266 Commits
Ashutosh_T
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d04af2747b | |||
| 89c529695c | |||
| b8c10a20bf | |||
| 00b59d2499 | |||
| 55a05ecff2 | |||
| e0656b6734 | |||
| 6f6292b167 | |||
| cf240ae626 | |||
| 13d9f2d9e8 | |||
| 910110f86d | |||
| bb01e645fe | |||
| 3928eafef9 | |||
| 8409b0b85c | |||
| 94bbaeffa2 | |||
| bb102ce188 | |||
| 35c92183a5 | |||
| 0161c9be83 | |||
| 9c5df63134 | |||
| 5387e009cb | |||
| 4853613efd | |||
| 7459876a20 | |||
| c820b973a8 | |||
| 5459a24a58 | |||
| 0395b46610 | |||
| 6a300db97c | |||
| dac1e13685 | |||
| d00ddb8e8b | |||
| 93c4803634 | |||
| cce84d901a | |||
| f7e707557a | |||
| 6c35bd3bf8 | |||
| e7e96c3bb2 | |||
| 82c9f249ef | |||
| 4f427a58c4 | |||
| 9fbaf03ce4 | |||
| a0a65fc08c | |||
| 9b8bb5d0cb | |||
| 20df833c48 | |||
| 8470223f98 | |||
| c5949606aa | |||
| 4c284f9904 | |||
| 852ddc7e02 | |||
| 6bcc67bb63 | |||
| fdb08fae89 | |||
| 94e2e4f18b | |||
| 0960702f0c | |||
| 26ac59fa52 | |||
| aa604f4d9e | |||
| 1a3c030495 | |||
| 447e915505 | |||
| 3caf944c50 | |||
| 5d8a5e0cc8 | |||
| 4282a6e1f7 | |||
| e1ca7e6152 | |||
| 638d9faf1f | |||
| a4714d5440 | |||
| 4b981b6c74 | |||
| e92976049e | |||
| 28deae6416 | |||
| 1746cf0300 | |||
| 9e7651f345 | |||
| 49da601092 | |||
| 0fe59223e2 | |||
| 41feb58d45 | |||
| 34c5ac9c25 | |||
| 3dce559de2 | |||
| 886a32b3e3 | |||
| b6baff7d00 | |||
| bbe36ed535 | |||
| fa1c534ba8 | |||
| d1f5240f8f | |||
| c4653b557c | |||
| 8aace3e1d9 | |||
| a6177adb43 | |||
| 6b8ba85a31 | |||
| a3ffe1d3d6 | |||
| 55c2ca73de | |||
| bcba454b6e | |||
| e73413c849 | |||
| 457e3b411e | |||
| 8f5a49deed | |||
| f1f5fc263f | |||
| 64aab7d712 | |||
| c7a73e78fb | |||
| 1b94592026 | |||
| 9c95b12a8f | |||
| df0e9f7b46 | |||
| 24e45037da | |||
| a31266ee4a | |||
| bd2f9d953f | |||
| d5a7ad0716 | |||
| 4108915b92 | |||
| dad135571d | |||
| 5a402925b1 | |||
| 0277303c54 | |||
| eed97d31c6 | |||
| a7a9fb4012 | |||
| 03ee834505 | |||
| 0349229bac | |||
| f4e6fab3d6 | |||
| 6dfbf655ef | |||
| 230267bdb9 | |||
| f171b0add6 | |||
| 5522551e67 | |||
| b74ae2d75c | |||
| 0cdabf61ad | |||
| 76e77eb50f | |||
| b247ed36ed | |||
| 88de8b218b | |||
| bb328ad980 | |||
| 92a234ff7e | |||
| 64cb2e0671 | |||
| 863f0ce8e2 | |||
| bd14424062 | |||
| 897537a60c | |||
| 08a336be37 | |||
| 4cec5860ec | |||
| 5b57c93a21 | |||
| e30aec1791 | |||
| 2c8486f0de | |||
| 2806dceab2 | |||
| c61ef92f6e | |||
| e7a21e9e2f | |||
| 62031046a1 | |||
| fbb8a2261b | |||
| ed16c0f102 | |||
| 2f04339b4d | |||
| 611d7753bb | |||
| b789b84be1 | |||
| 883a65d124 | |||
| a9f1a99e6f | |||
| 6679c5877d | |||
| 4401bc0fa2 | |||
| 3d192770e9 | |||
| 4a0144c23b | |||
| 6e945cf6c1 | |||
| 5a97cd472c | |||
| 9af4c2279a | |||
| 8ce6f1c32f | |||
| a3703ae2ca | |||
| a32515fc84 | |||
| bfe9c03147 | |||
| d18bdb1363 | |||
| 31cfe2b581 | |||
| 394b8496f9 | |||
| 2b6c886186 | |||
| 8be9b05695 | |||
| b9c8fb539f | |||
| 128417858e | |||
| 4825f24694 | |||
| e63b320d99 | |||
| b023883233 | |||
| 0b2ed71dab | |||
| 7c80e49809 | |||
| 7928c6ca36 | |||
| d1c427f7b9 | |||
| e657f91d4b | |||
| 58a4a23ac7 | |||
| 985dc616c7 | |||
| 14be381f5f | |||
| ac711c7254 | |||
| 85ca0a4cb1 | |||
| 7ba97314b9 | |||
| 08e81c1185 | |||
| 27399322b8 | |||
| 381723d785 | |||
| f22f6c4ad9 | |||
| 643501ee9e | |||
| a6d5dfa1fc | |||
| 0c6e9fc57b | |||
| 7a80345c64 | |||
| 8b44fb6f39 | |||
| c71343d550 | |||
| 5910517d01 | |||
| 1615dde267 | |||
| e6b66479d5 | |||
| 46806b34bb | |||
| e21a9b8eda | |||
| 6f2903c0c7 | |||
| 73b85bee84 | |||
| 96411c43b0 | |||
| b54b83c63d | |||
| eccd4f6d76 | |||
| 244da76b75 | |||
| c5adc6322d | |||
| 90b7cabaf5 | |||
| f385a1b555 | |||
| a589f2af4b | |||
| 08e893dcc8 | |||
| 83e8e8c7de | |||
| 3b0c958342 | |||
| 4916a95eb4 | |||
| 86b37549eb | |||
| 5253ed9a39 | |||
| 4e171e8ca3 | |||
| bd839b12f9 | |||
| 08b2cfe844 | |||
| eed4e4cf31 | |||
| 7273f49b3f | |||
| 1a360447cd | |||
| 78575337ec | |||
| ac4da0c930 | |||
| d29b061799 | |||
| 04f1917332 | |||
| 1d54af7c00 | |||
| c6744f0556 | |||
| 031c34cb7c | |||
| b3595ad6b6 | |||
| 34bd84ad73 | |||
| c8d69e7c5b | |||
| 94f57e2852 | |||
| 843dc8edfc | |||
| 70aa5121fa | |||
| 2e299c6152 | |||
| c13dec9052 | |||
| 8c305872a0 | |||
| 302185808e | |||
| 4dc37cb0ac | |||
| e80728805b | |||
| 4434ea971f | |||
| 5a9b06cca6 | |||
| 47bb49fac6 | |||
| 5ce95f7e23 | |||
| 636dd48ad6 | |||
| 62688d508f | |||
| c92e71b292 | |||
| 2b19890b53 | |||
| 5ff87cd870 | |||
| b30369baa5 | |||
| 4684b438f6 | |||
| 7e20807325 | |||
| 186486d934 | |||
| d07f0311ae | |||
| 2f6031e62c | |||
| e02636b6b6 | |||
| bad784e147 | |||
| 886d0bb3b1 | |||
| 74dd9eeb8d | |||
| 1939a63d9a | |||
| c07db9f94d | |||
| 53da15416a | |||
| a809bdd469 | |||
| bb2c098cb9 | |||
| bd3b70f4ea | |||
| 000cef3bb7 | |||
| 522deae8f7 | |||
| 9a8aa4f5ce | |||
| af92ab977b | |||
| c06dc8ebe7 | |||
| 8609db64d2 | |||
| e831f50505 | |||
| ba88fbced6 | |||
| 13d2e1cd7d | |||
| 26acfec408 | |||
| 3bd38f3c68 | |||
| 2e29dc9946 | |||
| db752a4678 | |||
| 245182eb07 | |||
| 9daf76c6eb | |||
| c33afa58c3 | |||
| 4ceb5c3cb2 | |||
| d0dabf776b | |||
| 04223578ad | |||
| f94a7de4ab | |||
| eb3a65428e | |||
| 8ddb414e91 |
@ -1,17 +1,22 @@
|
|||||||
using Marco.Pms.Model.Activities;
|
using Marco.Pms.Model.Activities;
|
||||||
using Marco.Pms.Model.AttendanceModule;
|
using Marco.Pms.Model.AttendanceModule;
|
||||||
using Marco.Pms.Model.Authentication;
|
using Marco.Pms.Model.Authentication;
|
||||||
|
using Marco.Pms.Model.Collection;
|
||||||
using Marco.Pms.Model.Directory;
|
using Marco.Pms.Model.Directory;
|
||||||
using Marco.Pms.Model.DocumentManager;
|
using Marco.Pms.Model.DocumentManager;
|
||||||
using Marco.Pms.Model.Employees;
|
using Marco.Pms.Model.Employees;
|
||||||
using Marco.Pms.Model.Entitlements;
|
using Marco.Pms.Model.Entitlements;
|
||||||
using Marco.Pms.Model.Expenses;
|
using Marco.Pms.Model.Expenses;
|
||||||
|
using Marco.Pms.Model.Expenses.Masters;
|
||||||
using Marco.Pms.Model.Forum;
|
using Marco.Pms.Model.Forum;
|
||||||
using Marco.Pms.Model.Mail;
|
using Marco.Pms.Model.Mail;
|
||||||
using Marco.Pms.Model.Master;
|
using Marco.Pms.Model.Master;
|
||||||
using Marco.Pms.Model.OrganizationModel;
|
using Marco.Pms.Model.OrganizationModel;
|
||||||
|
using Marco.Pms.Model.PaymentGetway;
|
||||||
using Marco.Pms.Model.Projects;
|
using Marco.Pms.Model.Projects;
|
||||||
|
using Marco.Pms.Model.PurchaseInvoice;
|
||||||
using Marco.Pms.Model.Roles;
|
using Marco.Pms.Model.Roles;
|
||||||
|
using Marco.Pms.Model.ServiceProject;
|
||||||
using Marco.Pms.Model.TenantModels;
|
using Marco.Pms.Model.TenantModels;
|
||||||
using Marco.Pms.Model.Utilities;
|
using Marco.Pms.Model.Utilities;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
@ -31,46 +36,149 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
_httpContextAccessor = httpContextAccessor;
|
_httpContextAccessor = httpContextAccessor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#region ======================================================= System Masters =======================================================
|
||||||
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
||||||
public DbSet<TenantStatus> TenantStatus { get; set; }
|
public DbSet<TenantStatus> TenantStatus { get; set; }
|
||||||
public DbSet<SubscriptionStatus> SubscriptionStatus { get; set; }
|
public DbSet<SubscriptionStatus> SubscriptionStatus { get; set; }
|
||||||
|
public DbSet<Module> Modules { get; set; }
|
||||||
|
public DbSet<Feature> Features { get; set; }
|
||||||
|
public DbSet<FeaturePermission> FeaturePermissions { get; set; }
|
||||||
|
public DbSet<CurrencyMaster> CurrencyMaster { get; set; }
|
||||||
|
public DbSet<Industry> Industries { get; set; }
|
||||||
|
public DbSet<Inquiries> Inquiries { get; set; }
|
||||||
|
public DbSet<StatusUpdateLog> StatusUpdateLogs { get; set; }
|
||||||
|
public DbSet<PaymentDetail> PaymentDetails { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Tenant Masters =======================================================
|
||||||
|
public DbSet<Document> Documents { get; set; }
|
||||||
|
public DbSet<MailingList> MailingList { get; set; }
|
||||||
|
public DbSet<MailDetails> MailDetails { get; set; }
|
||||||
|
//public DbSet<MailLog> MailLogs { get; set; }
|
||||||
|
public DbSet<OTPDetails> OTPDetails { get; set; }
|
||||||
|
public DbSet<MPINDetails> MPINDetails { get; set; }
|
||||||
|
public DbSet<FCMTokenMapping> FCMTokenMappings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Tenant =======================================================
|
||||||
public DbSet<Tenant> Tenants { get; set; }
|
public DbSet<Tenant> Tenants { get; set; }
|
||||||
public DbSet<SubscriptionPlan> SubscriptionPlans { get; set; }
|
public DbSet<SubscriptionPlan> SubscriptionPlans { get; set; }
|
||||||
public DbSet<SubscriptionPlanDetails> SubscriptionPlanDetails { get; set; }
|
public DbSet<SubscriptionPlanDetails> SubscriptionPlanDetails { get; set; }
|
||||||
public DbSet<TenantSubscriptions> TenantSubscriptions { get; set; }
|
public DbSet<TenantSubscriptions> TenantSubscriptions { get; set; }
|
||||||
|
public DbSet<TenantEnquire> TenantEnquires { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Employees =======================================================
|
||||||
|
|
||||||
|
#region ======================================================= Masters =======================================================
|
||||||
|
public DbSet<JobRole> JobRoles { get; set; }
|
||||||
|
public DbSet<ApplicationRole> ApplicationRoles { get; set; }
|
||||||
|
public DbSet<RolePermissionMappings> RolePermissionMappings { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
public DbSet<ApplicationUser> ApplicationUsers { get; set; }
|
public DbSet<ApplicationUser> ApplicationUsers { get; set; }
|
||||||
|
public DbSet<Employee> Employees { get; set; }
|
||||||
|
public DbSet<EmployeeRoleMapping> EmployeeRoleMappings { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Project =======================================================
|
||||||
|
|
||||||
|
#region ======================================================= Masters =======================================================
|
||||||
public DbSet<ServiceMaster> ServiceMasters { get; set; }
|
public DbSet<ServiceMaster> ServiceMasters { get; set; }
|
||||||
public DbSet<ActivityGroupMaster> ActivityGroupMasters { get; set; }
|
public DbSet<ActivityGroupMaster> ActivityGroupMasters { get; set; }
|
||||||
public DbSet<ActivityMaster> ActivityMasters { get; set; }
|
public DbSet<ActivityMaster> ActivityMasters { get; set; }
|
||||||
|
public DbSet<StatusMaster> StatusMasters { get; set; }
|
||||||
|
public DbSet<ActivityCheckList> ActivityCheckLists { get; set; }
|
||||||
|
public DbSet<CheckListMappings> CheckListMappings { get; set; }
|
||||||
|
public DbSet<WorkCategoryMaster> WorkCategoryMasters { get; set; }
|
||||||
|
public DbSet<WorkStatusMaster> WorkStatusMasters { get; set; }
|
||||||
|
public DbSet<GlobalServiceMaster> GlobalServiceMasters { get; set; }
|
||||||
|
public DbSet<GlobalActivityGroupMaster> GlobalActivityGroupMasters { get; set; }
|
||||||
|
public DbSet<GlobalActivityMaster> GlobalActivityMasters { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
public DbSet<Project> Projects { get; set; }
|
public DbSet<Project> Projects { get; set; }
|
||||||
public DbSet<ProjectAllocation> ProjectAllocations { get; set; }
|
public DbSet<ProjectAllocation> ProjectAllocations { get; set; }
|
||||||
public DbSet<StatusMaster> StatusMasters { get; set; }
|
|
||||||
public DbSet<Building> Buildings { get; set; }
|
public DbSet<Building> Buildings { get; set; }
|
||||||
public DbSet<Floor> Floor { get; set; }
|
public DbSet<Floor> Floor { get; set; }
|
||||||
public DbSet<WorkArea> WorkAreas { get; set; }
|
public DbSet<WorkArea> WorkAreas { get; set; }
|
||||||
public DbSet<WorkItem> WorkItems { get; set; }
|
public DbSet<WorkItem> WorkItems { get; set; }
|
||||||
public DbSet<WorkShift> WorkShifts { get; set; }
|
public DbSet<WorkShift> WorkShifts { get; set; }
|
||||||
|
public DbSet<ProjectLevelPermissionMapping> ProjectLevelPermissionMappings { get; set; }
|
||||||
|
public DbSet<ProjectServiceMapping> ProjectServiceMappings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Task Allocation =======================================================
|
||||||
public DbSet<TaskAllocation> TaskAllocations { get; set; }
|
public DbSet<TaskAllocation> TaskAllocations { get; set; }
|
||||||
public DbSet<TaskComment> TaskComments { get; set; }
|
public DbSet<TaskComment> TaskComments { get; set; }
|
||||||
public DbSet<TaskMembers> TaskMembers { get; set; }
|
public DbSet<TaskMembers> TaskMembers { get; set; }
|
||||||
public DbSet<TaskAttachment> TaskAttachments { get; set; }
|
public DbSet<TaskAttachment> TaskAttachments { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Attendace =======================================================
|
||||||
public DbSet<Attendance> Attendes { get; set; }
|
public DbSet<Attendance> Attendes { get; set; }
|
||||||
public DbSet<AttendanceLog> AttendanceLogs { get; set; }
|
public DbSet<AttendanceLog> AttendanceLogs { get; set; }
|
||||||
public DbSet<Employee> Employees { get; set; }
|
#endregion
|
||||||
public DbSet<EmployeeRoleMapping> EmployeeRoleMappings { get; set; }
|
|
||||||
public DbSet<Module> Modules { get; set; }
|
#region ======================================================= Directory =======================================================
|
||||||
public DbSet<Feature> Features { get; set; }
|
|
||||||
public DbSet<FeaturePermission> FeaturePermissions { get; set; }
|
#region ======================================================= Masters =======================================================
|
||||||
public DbSet<ProjectLevelPermissionMapping> ProjectLevelPermissionMappings { get; set; }
|
public DbSet<Bucket> Buckets { get; set; }
|
||||||
public DbSet<CurrencyMaster> CurrencyMaster { get; set; }
|
public DbSet<ContactTagMaster> ContactTagMasters { get; set; }
|
||||||
public DbSet<ApplicationRole> ApplicationRoles { get; set; }
|
public DbSet<ContactCategoryMaster> ContactCategoryMasters { get; set; }
|
||||||
public DbSet<JobRole> JobRoles { get; set; }
|
#endregion
|
||||||
public DbSet<RolePermissionMappings> RolePermissionMappings { get; set; }
|
|
||||||
public DbSet<Industry> Industries { get; set; }
|
public DbSet<Contact> Contacts { get; set; }
|
||||||
public DbSet<ActivityCheckList> ActivityCheckLists { get; set; }
|
public DbSet<ContactEmail> ContactsEmails { get; set; }
|
||||||
public DbSet<CheckListMappings> CheckListMappings { get; set; }
|
public DbSet<ContactPhone> ContactsPhones { get; set; }
|
||||||
public DbSet<Inquiries> Inquiries { get; set; }
|
public DbSet<ContactNote> ContactNotes { get; set; }
|
||||||
|
public DbSet<ContactTagMapping> ContactTagMappings { get; set; }
|
||||||
|
public DbSet<EmployeeBucketMapping> EmployeeBucketMappings { get; set; }
|
||||||
|
public DbSet<ContactBucketMapping> ContactBucketMappings { get; set; }
|
||||||
|
public DbSet<ContactProjectMapping> ContactProjectMappings { get; set; }
|
||||||
|
public DbSet<DirectoryUpdateLog> DirectoryUpdateLogs { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Finance =======================================================
|
||||||
|
|
||||||
|
#region ======================================================= Masters =======================================================
|
||||||
|
public DbSet<PaymentModeMatser> PaymentModeMatser { get; set; }
|
||||||
|
public DbSet<ExpensesStatusMaster> ExpensesStatusMaster { get; set; }
|
||||||
|
public DbSet<ExpensesTypeMaster> ExpensesTypeMaster { get; set; }
|
||||||
|
public DbSet<ExpenseCategoryMaster> ExpenseCategoryMasters { get; set; }
|
||||||
|
public DbSet<RecurringPaymentStatus> RecurringPaymentStatus { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Expenses =======================================================
|
||||||
|
public DbSet<Expenses> Expenses { get; set; }
|
||||||
|
public DbSet<ExpenseLog> ExpenseLogs { get; set; }
|
||||||
|
public DbSet<BillAttachments> BillAttachments { get; set; }
|
||||||
|
public DbSet<ExpensesReimburse> ExpensesReimburse { get; set; }
|
||||||
|
public DbSet<ExpensesReimburseMapping> ExpensesReimburseMapping { get; set; }
|
||||||
|
public DbSet<StatusPermissionMapping> StatusPermissionMapping { get; set; }
|
||||||
|
public DbSet<ExpensesStatusMapping> ExpensesStatusMapping { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Collection =======================================================
|
||||||
|
public DbSet<Invoice> Invoices { get; set; }
|
||||||
|
public DbSet<InvoiceComment> InvoiceComments { get; set; }
|
||||||
|
public DbSet<InvoiceAttachment> InvoiceAttachments { get; set; }
|
||||||
|
public DbSet<ReceivedInvoicePayment> ReceivedInvoicePayments { get; set; }
|
||||||
|
public DbSet<PaymentAdjustmentHead> PaymentAdjustmentHeads { get; set; }
|
||||||
|
#endregion
|
||||||
|
public DbSet<PaymentRequest> PaymentRequests { get; set; }
|
||||||
|
public DbSet<PaymentRequestAttachment> PaymentRequestAttachments { get; set; }
|
||||||
|
public DbSet<RecurringPayment> RecurringPayments { get; set; }
|
||||||
|
public DbSet<AdvancePaymentTransaction> AdvancePaymentTransactions { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Tickets =======================================================
|
||||||
public DbSet<TicketForum> Tickets { get; set; }
|
public DbSet<TicketForum> Tickets { get; set; }
|
||||||
public DbSet<TicketAttachment> TicketAttachments { get; set; }
|
public DbSet<TicketAttachment> TicketAttachments { get; set; }
|
||||||
public DbSet<TicketComment> TicketComments { get; set; }
|
public DbSet<TicketComment> TicketComments { get; set; }
|
||||||
@ -78,42 +186,10 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
public DbSet<TicketTypeMaster> TicketTypeMasters { get; set; }
|
public DbSet<TicketTypeMaster> TicketTypeMasters { get; set; }
|
||||||
public DbSet<TicketPriorityMaster> TicketPriorityMasters { get; set; }
|
public DbSet<TicketPriorityMaster> TicketPriorityMasters { get; set; }
|
||||||
public DbSet<TicketTagMaster> TicketTagMasters { get; set; }
|
public DbSet<TicketTagMaster> TicketTagMasters { get; set; }
|
||||||
public DbSet<Document> Documents { get; set; }
|
|
||||||
public DbSet<TicketTag> TicketTags { get; set; }
|
public DbSet<TicketTag> TicketTags { get; set; }
|
||||||
public DbSet<WorkCategoryMaster> WorkCategoryMasters { get; set; }
|
#endregion
|
||||||
public DbSet<WorkStatusMaster> WorkStatusMasters { get; set; }
|
|
||||||
public DbSet<Contact> Contacts { get; set; }
|
|
||||||
public DbSet<ContactCategoryMaster> ContactCategoryMasters { get; set; }
|
|
||||||
public DbSet<ContactEmail> ContactsEmails { get; set; }
|
|
||||||
public DbSet<ContactPhone> ContactsPhones { get; set; }
|
|
||||||
public DbSet<ContactNote> ContactNotes { get; set; }
|
|
||||||
public DbSet<Bucket> Buckets { get; set; }
|
|
||||||
public DbSet<ContactTagMaster> ContactTagMasters { get; set; }
|
|
||||||
public DbSet<ContactTagMapping> ContactTagMappings { get; set; }
|
|
||||||
public DbSet<EmployeeBucketMapping> EmployeeBucketMappings { get; set; }
|
|
||||||
public DbSet<ContactBucketMapping> ContactBucketMappings { get; set; }
|
|
||||||
public DbSet<ContactProjectMapping> ContactProjectMappings { get; set; }
|
|
||||||
public DbSet<DirectoryUpdateLog> DirectoryUpdateLogs { get; set; }
|
|
||||||
|
|
||||||
public DbSet<MailingList> MailingList { get; set; }
|
|
||||||
public DbSet<MailDetails> MailDetails { get; set; }
|
|
||||||
public DbSet<MailLog> MailLogs { get; set; }
|
|
||||||
public DbSet<OTPDetails> OTPDetails { get; set; }
|
|
||||||
public DbSet<MPINDetails> MPINDetails { get; set; }
|
|
||||||
|
|
||||||
public DbSet<Expenses> Expenses { get; set; }
|
|
||||||
public DbSet<ExpenseLog> ExpenseLogs { get; set; }
|
|
||||||
public DbSet<ExpensesTypeMaster> ExpensesTypeMaster { get; set; }
|
|
||||||
public DbSet<PaymentModeMatser> PaymentModeMatser { get; set; }
|
|
||||||
public DbSet<ExpensesStatusMaster> ExpensesStatusMaster { get; set; }
|
|
||||||
public DbSet<BillAttachments> BillAttachments { get; set; }
|
|
||||||
public DbSet<ExpensesReimburse> ExpensesReimburse { get; set; }
|
|
||||||
public DbSet<ExpensesReimburseMapping> ExpensesReimburseMapping { get; set; }
|
|
||||||
public DbSet<StatusPermissionMapping> StatusPermissionMapping { get; set; }
|
|
||||||
public DbSet<ExpensesStatusMapping> ExpensesStatusMapping { get; set; }
|
|
||||||
|
|
||||||
public DbSet<FCMTokenMapping> FCMTokenMappings { get; set; }
|
|
||||||
|
|
||||||
|
#region ======================================================= Project and Employee Documents =======================================================
|
||||||
public DbSet<EntityTypeMaster> EntityTypeMasters { get; set; }
|
public DbSet<EntityTypeMaster> EntityTypeMasters { get; set; }
|
||||||
public DbSet<DocumentTypeMaster> DocumentTypeMasters { get; set; }
|
public DbSet<DocumentTypeMaster> DocumentTypeMasters { get; set; }
|
||||||
public DbSet<DocumentCategoryMaster> DocumentCategoryMasters { get; set; }
|
public DbSet<DocumentCategoryMaster> DocumentCategoryMasters { get; set; }
|
||||||
@ -121,18 +197,56 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
public DbSet<DocumentAttachment> DocumentAttachments { get; set; }
|
public DbSet<DocumentAttachment> DocumentAttachments { get; set; }
|
||||||
public DbSet<AttachmentVersionMapping> AttachmentVersionMappings { get; set; }
|
public DbSet<AttachmentVersionMapping> AttachmentVersionMappings { get; set; }
|
||||||
public DbSet<AttachmentTagMapping> AttachmentTagMappings { get; set; }
|
public DbSet<AttachmentTagMapping> AttachmentTagMappings { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
public DbSet<GlobalServiceMaster> GlobalServiceMasters { get; set; }
|
#region ======================================================= Organizations =======================================================
|
||||||
public DbSet<GlobalActivityGroupMaster> GlobalActivityGroupMasters { get; set; }
|
|
||||||
public DbSet<GlobalActivityMaster> GlobalActivityMasters { get; set; }
|
|
||||||
|
|
||||||
public DbSet<Organization> Organizations { get; set; }
|
public DbSet<Organization> Organizations { get; set; }
|
||||||
public DbSet<OrgTypeMaster> OrgTypeMasters { get; set; }
|
public DbSet<OrgTypeMaster> OrgTypeMasters { get; set; }
|
||||||
public DbSet<TenantOrgMapping> TenantOrgMappings { get; set; }
|
public DbSet<TenantOrgMapping> TenantOrgMappings { get; set; }
|
||||||
public DbSet<OrgServiceMapping> OrgServiceMappings { get; set; }
|
public DbSet<OrgServiceMapping> OrgServiceMappings { get; set; }
|
||||||
public DbSet<ProjectServiceMapping> ProjectServiceMappings { get; set; }
|
|
||||||
public DbSet<ProjectOrgMapping> ProjectOrgMappings { get; set; }
|
public DbSet<ProjectOrgMapping> ProjectOrgMappings { get; set; }
|
||||||
|
public DbSet<OrganizationHierarchy> OrganizationHierarchies { get; set; }
|
||||||
|
public DbSet<OrgHierarchyLog> OrgHierarchyLogs { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Service Project =======================================================
|
||||||
|
public DbSet<ServiceProject> ServiceProjects { get; set; }
|
||||||
|
public DbSet<ServiceProjectServiceMapping> ServiceProjectServiceMapping { get; set; }
|
||||||
|
public DbSet<TeamRoleMaster> TeamRoleMasters { get; set; }
|
||||||
|
public DbSet<ServiceProjectTag> ServiceProjectTags { get; set; }
|
||||||
|
//public DbSet<TalkingPoint> TalkingPoints { get; set; }
|
||||||
|
//public DbSet<TalkingPointAttachment> TalkingPointAttachments { get; set; }
|
||||||
|
public DbSet<ServiceProjectTagMapping> ServiceProjectTagMappings { get; set; }
|
||||||
|
public DbSet<ServiceProjectAllocation> ServiceProjectAllocations { get; set; }
|
||||||
|
|
||||||
|
#region ======================================================= Project Branch =======================================================
|
||||||
|
public DbSet<ProjectBranch> ProjectBranches { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Job =======================================================
|
||||||
|
public DbSet<JobTicket> JobTickets { get; set; }
|
||||||
|
public DbSet<JobStatus> JobStatus { get; set; }
|
||||||
|
public DbSet<JobStatusMapping> JobStatusMappings { get; set; }
|
||||||
|
public DbSet<JobComment> JobComments { get; set; }
|
||||||
|
public DbSet<JobEmployeeMapping> JobEmployeeMappings { get; set; }
|
||||||
|
public DbSet<JobTag> JobTags { get; set; }
|
||||||
|
public DbSet<JobTagMapping> JobTagMappings { get; set; }
|
||||||
|
public DbSet<JobAttachment> JobAttachments { get; set; }
|
||||||
|
public DbSet<JobAttendance> JobAttendance { get; set; }
|
||||||
|
public DbSet<JobAttendanceLog> JobAttendanceLogs { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ======================================================= Purchase Invoice =======================================================
|
||||||
|
public DbSet<PurchaseInvoiceDetails> PurchaseInvoiceDetails { get; set; }
|
||||||
|
public DbSet<DeliveryChallanDetails> DeliveryChallanDetails { get; set; }
|
||||||
|
public DbSet<PurchaseInvoiceAttachment> PurchaseInvoiceAttachments { get; set; }
|
||||||
|
public DbSet<PurchaseInvoicePayment> PurchaseInvoicePayments { get; set; }
|
||||||
|
public DbSet<PurchaseInvoiceStatus> PurchaseInvoiceStatus { get; set; }
|
||||||
|
public DbSet<InvoiceAttachmentType> InvoiceAttachmentTypes { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
@ -449,6 +563,101 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<InvoiceAttachmentType>().HasData(
|
||||||
|
new InvoiceAttachmentType
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("ca294108-a586-4207-88c8-163b24305ddc"),
|
||||||
|
Name = "Delivery Challan",
|
||||||
|
Description = "A delivery challan is a formal document accompanying a shipment of goods that lists the items included and serves as proof of delivery upon receipt."
|
||||||
|
},
|
||||||
|
new InvoiceAttachmentType
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("150ddd9b-4b8d-44ac-bae0-2e553c0f069a"),
|
||||||
|
Name = "E Way Bill",
|
||||||
|
Description = "An E-Way Bill (Electronic Way Bill) is a mandatory digital document generated on the GST portal to evidence and track the movement of goods valued over ₹50,000."
|
||||||
|
},
|
||||||
|
new InvoiceAttachmentType
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("3ca08288-0a74-4850-9948-0783aa975b84"),
|
||||||
|
Name = "Tax Invoice",
|
||||||
|
Description = "A Tax Invoice is a mandatory legal document issued by a GST-registered supplier for taxable goods or services, enabling the buyer to claim Input Tax Credit (ITC)."
|
||||||
|
},
|
||||||
|
new InvoiceAttachmentType
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("1fa20cff-b0ee-468e-9ea6-72d5aa144a3f"),
|
||||||
|
Name = "E-Invoice",
|
||||||
|
Description = "An E-Invoice (Electronic Invoice) is a system where B2B invoices are electronically authenticated by the GST Network (GSTN) to generate a unique Invoice Reference Number (IRN) and QR code."
|
||||||
|
},
|
||||||
|
new InvoiceAttachmentType
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("31cd7533-3ffc-4e84-a0b4-db3b94d016b2"),
|
||||||
|
Name = "Proforma Invoice",
|
||||||
|
Description = "Proforma Invoice"
|
||||||
|
},
|
||||||
|
new InvoiceAttachmentType
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("060c79a4-81c7-40a4-8cc3-56362ac9fad6"),
|
||||||
|
Name = "Sales Order",
|
||||||
|
Description = "Sales Order"
|
||||||
|
},
|
||||||
|
new InvoiceAttachmentType
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("12773c2c-64e7-478c-af17-8471f943a5ed"),
|
||||||
|
Name = "Other",
|
||||||
|
Description = "Other"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<PurchaseInvoiceStatus>().HasData(
|
||||||
|
new PurchaseInvoiceStatus
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("8a5ef25e-3c9e-45de-add9-6b1c1df54381"),
|
||||||
|
Name = "Draft",
|
||||||
|
DisplayName = "Draft",
|
||||||
|
Description = "Draft Status in a Purchase Invoice indicates a preliminary, unfinalized document that is saved for review but has not yet been posted to the general ledger or affected your accounts/inventory.",
|
||||||
|
Color = "#8592a3"
|
||||||
|
},
|
||||||
|
new PurchaseInvoiceStatus
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("16b10201-1651-465c-b2fd-236bdef86f95"),
|
||||||
|
Name = "Review Pending",
|
||||||
|
DisplayName = "Submit for Review",
|
||||||
|
Description = "Review Pending status in a Purchase Invoice indicates that the invoice has been submitted for validation but requires approval from an authorized person (like a manager or auditor) before it can be posted to the ledger or paid.",
|
||||||
|
Color = "#696cff"
|
||||||
|
},
|
||||||
|
new PurchaseInvoiceStatus
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("a05f5f4a-bd9d-4028-af42-48ee0caa3e40"),
|
||||||
|
Name = "Rejected by Reviewer",
|
||||||
|
DisplayName = "Reject",
|
||||||
|
Description = "Rejected by Reviewer status indicates that the invoice failed the approval process due to errors, discrepancies, or policy violations and has been returned to the initiator or vendor for correction.",
|
||||||
|
Color = "#ff3e1d"
|
||||||
|
},
|
||||||
|
new PurchaseInvoiceStatus
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("60027a54-3c23-4619-9f4e-6c20549b50a6"),
|
||||||
|
Name = "Approval Pending",
|
||||||
|
DisplayName = "Mark as Reviewed",
|
||||||
|
Description = "Approval Pending status in a Purchase Invoice indicates that the document has passed initial verification (matching and coding) and is now awaiting final financial authorization from a designated budget holder or signatory.",
|
||||||
|
Color = "#03c3ec"
|
||||||
|
},
|
||||||
|
new PurchaseInvoiceStatus
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("58de9cef-811f-46a4-814d-0069b64d98a9"),
|
||||||
|
Name = "Rejected by Approver",
|
||||||
|
DisplayName = "Reject",
|
||||||
|
Description = "Rejected by Approver status in a Purchase Invoice indicates that the document successfully passed initial verification but was ultimately denied by the final authorizing signatory (such as a Manager or CFO) due to budget or validity concerns.",
|
||||||
|
Color = "#ff3e1d"
|
||||||
|
},
|
||||||
|
new PurchaseInvoiceStatus
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("5b393371-dbcf-4a28-88a8-f406fa34e0d0"),
|
||||||
|
Name = "Approved",
|
||||||
|
DisplayName = "Mark as Approved",
|
||||||
|
Description = "Approved status indicates that the invoice has successfully cleared all necessary verification and authorization levels and is formally accepted by the company as a valid debt.",
|
||||||
|
Color = "#71dd37"
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ManageApplicationStructure(ModelBuilder modelBuilder)
|
private static void ManageApplicationStructure(ModelBuilder modelBuilder)
|
||||||
@ -458,6 +667,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
.HasOne<Tenant>() // No navigation property in ApplicationRole
|
.HasOne<Tenant>() // No navigation property in ApplicationRole
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey(ar => ar.TenantId);
|
.HasForeignKey(ar => ar.TenantId);
|
||||||
|
|
||||||
// Configure the relationship between ApplicationRole and FeaturePermission via a join table
|
// Configure the relationship between ApplicationRole and FeaturePermission via a join table
|
||||||
modelBuilder.Entity<RolePermissionMappings>(entity =>
|
modelBuilder.Entity<RolePermissionMappings>(entity =>
|
||||||
{
|
{
|
||||||
@ -473,6 +683,64 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
modelBuilder.Entity<CurrencyMaster>().HasData(
|
||||||
|
new CurrencyMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("78e96e4a-7ce0-4164-ae3a-c833ad45ec2c"),
|
||||||
|
CurrencyCode = "INR",
|
||||||
|
CurrencyName = "Indian Rupee",
|
||||||
|
Symbol = "₹",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new CurrencyMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("2f672568-a67b-4961-acb2-a8c7834e1762"),
|
||||||
|
CurrencyCode = "USD",
|
||||||
|
CurrencyName = "US Dollar",
|
||||||
|
Symbol = "$",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new CurrencyMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("4d1155bb-1448-4d97-a732-96c92eb99c45"),
|
||||||
|
CurrencyCode = "EUR",
|
||||||
|
CurrencyName = "Euro",
|
||||||
|
Symbol = "€",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new CurrencyMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("3e456237-ef06-4ea1-a261-188c9b0c6df6"),
|
||||||
|
CurrencyCode = "GBP",
|
||||||
|
CurrencyName = "Pound Sterling",
|
||||||
|
Symbol = "£",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new CurrencyMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("297e237a-56d3-48f6-b39d-ec3991dea8bf"),
|
||||||
|
CurrencyCode = "JPY",
|
||||||
|
CurrencyName = "Japanese Yen",
|
||||||
|
Symbol = "¥",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new CurrencyMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("efe9b4f6-64d6-446e-a42d-1c7aaf6dd70d"),
|
||||||
|
CurrencyCode = "RUB",
|
||||||
|
CurrencyName = "Russian Ruble",
|
||||||
|
Symbol = "₽",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new CurrencyMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("b960166a-f7e9-49e3-bb4b-28511f126c08"),
|
||||||
|
CurrencyCode = "CNY",
|
||||||
|
CurrencyName = "Chinese Yuan (Renminbi)",
|
||||||
|
Symbol = "¥",
|
||||||
|
IsActive = true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<ExpensesStatusMaster>().HasData(
|
modelBuilder.Entity<ExpensesStatusMaster>().HasData(
|
||||||
new ExpensesStatusMaster
|
new ExpensesStatusMaster
|
||||||
@ -489,7 +757,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
{
|
{
|
||||||
Id = Guid.Parse("6537018f-f4e9-4cb3-a210-6c3b2da999d7"),
|
Id = Guid.Parse("6537018f-f4e9-4cb3-a210-6c3b2da999d7"),
|
||||||
Name = "Review Pending",
|
Name = "Review Pending",
|
||||||
DisplayName = "Submit",
|
DisplayName = "Submit for Review",
|
||||||
Description = "Reviewer is currently reviewing the expense.",
|
Description = "Reviewer is currently reviewing the expense.",
|
||||||
Color = "#696cff",
|
Color = "#696cff",
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
@ -544,10 +812,27 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Color = "#71dd37",
|
Color = "#71dd37",
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true
|
IsActive = true
|
||||||
|
},
|
||||||
|
new ExpensesStatusMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("b8586f67-dc19-49c3-b4af-224149efe1d3"),
|
||||||
|
Name = "Done",
|
||||||
|
DisplayName = "Create Expense",
|
||||||
|
Description = "Create new Expense.",
|
||||||
|
Color = "#0E9F6E",
|
||||||
|
IsSystem = true,
|
||||||
|
IsActive = true
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<ExpensesStatusMapping>().HasData(
|
modelBuilder.Entity<ExpensesStatusMapping>().HasData(
|
||||||
|
// processed to Done
|
||||||
|
new ExpensesStatusMapping
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("a1cc95ed-b276-4a3e-9f00-0a249b522d64"),
|
||||||
|
StatusId = Guid.Parse("61578360-3a49-4c34-8604-7b35a3787b95"),
|
||||||
|
NextStatusId = Guid.Parse("b8586f67-dc19-49c3-b4af-224149efe1d3")
|
||||||
|
},
|
||||||
// Process to processed
|
// Process to processed
|
||||||
new ExpensesStatusMapping
|
new ExpensesStatusMapping
|
||||||
{
|
{
|
||||||
@ -655,10 +940,17 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Id = Guid.Parse("214354e5-daad-4569-ad69-eb5bf4e87fbc"),
|
Id = Guid.Parse("214354e5-daad-4569-ad69-eb5bf4e87fbc"),
|
||||||
PermissionId = Guid.Parse("ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"),
|
PermissionId = Guid.Parse("ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"),
|
||||||
StatusId = Guid.Parse("61578360-3a49-4c34-8604-7b35a3787b95")
|
StatusId = Guid.Parse("61578360-3a49-4c34-8604-7b35a3787b95")
|
||||||
|
},
|
||||||
|
// Done Permission Mapping
|
||||||
|
new StatusPermissionMapping
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("de04b6c7-a5cd-4a61-88b0-b43b0008202e"),
|
||||||
|
PermissionId = Guid.Parse("ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"),
|
||||||
|
StatusId = Guid.Parse("b8586f67-dc19-49c3-b4af-224149efe1d3")
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<ExpensesTypeMaster>().HasData(
|
modelBuilder.Entity<ExpenseCategoryMaster>().HasData(
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("5e0c6227-d49d-41ff-9f1f-781f0aee2469"),
|
Id = Guid.Parse("5e0c6227-d49d-41ff-9f1f-781f0aee2469"),
|
||||||
Name = "Procurement",
|
Name = "Procurement",
|
||||||
@ -668,7 +960,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
IsAttachmentRequried = true,
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("2de53163-0dbd-404b-8e60-1b02e6b4886a"),
|
Id = Guid.Parse("2de53163-0dbd-404b-8e60-1b02e6b4886a"),
|
||||||
Name = "Transport",
|
Name = "Transport",
|
||||||
@ -678,7 +970,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
IsAttachmentRequried = false,
|
IsAttachmentRequried = false,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"),
|
Id = Guid.Parse("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"),
|
||||||
Name = "Travelling",
|
Name = "Travelling",
|
||||||
@ -688,7 +980,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
IsAttachmentRequried = false,
|
IsAttachmentRequried = false,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("52484820-1b54-4865-8f0f-baa2b1d339b9"),
|
Id = Guid.Parse("52484820-1b54-4865-8f0f-baa2b1d339b9"),
|
||||||
Name = "Mobilization",
|
Name = "Mobilization",
|
||||||
@ -698,7 +990,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
IsAttachmentRequried = true,
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("fc59eb90-98ea-481c-b421-54bfa9e42d8f"),
|
Id = Guid.Parse("fc59eb90-98ea-481c-b421-54bfa9e42d8f"),
|
||||||
Name = "Employee Welfare",
|
Name = "Employee Welfare",
|
||||||
@ -708,7 +1000,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
IsAttachmentRequried = true,
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("77013784-9324-4d8b-bd36-d6f928e68942"),
|
Id = Guid.Parse("77013784-9324-4d8b-bd36-d6f928e68942"),
|
||||||
Name = "Maintenance & Utilities",
|
Name = "Maintenance & Utilities",
|
||||||
@ -718,7 +1010,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
IsAttachmentRequried = true,
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("1e2d697a-76b4-4be8-bc66-87144561a1a0"),
|
Id = Guid.Parse("1e2d697a-76b4-4be8-bc66-87144561a1a0"),
|
||||||
Name = "Vendor/Supplier Payments",
|
Name = "Vendor/Supplier Payments",
|
||||||
@ -728,7 +1020,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
IsAttachmentRequried = true,
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpenseCategoryMaster
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("4842fa61-64eb-4241-aebd-8282065af9f9"),
|
Id = Guid.Parse("4842fa61-64eb-4241-aebd-8282065af9f9"),
|
||||||
Name = "Compliance & Safety",
|
Name = "Compliance & Safety",
|
||||||
@ -746,30 +1038,106 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Id = Guid.Parse("24e6b0df-7929-47d2-88a3-4cf14c1f28f9"),
|
Id = Guid.Parse("24e6b0df-7929-47d2-88a3-4cf14c1f28f9"),
|
||||||
Name = "Cash",
|
Name = "Cash",
|
||||||
Description = "Physical currency; still used for small or informal transactions.",
|
Description = "Physical currency; still used for small or informal transactions.",
|
||||||
IsActive = true,
|
IsActive = true
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
|
||||||
},
|
},
|
||||||
new PaymentModeMatser
|
new PaymentModeMatser
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("48d9b462-5d87-4dec-8dec-2bc943943172"),
|
Id = Guid.Parse("48d9b462-5d87-4dec-8dec-2bc943943172"),
|
||||||
Name = "Cheque",
|
Name = "Cheque",
|
||||||
Description = "Paper-based payment order; less common now due to processing delays and fraud risks.",
|
Description = "Paper-based payment order; less common now due to processing delays and fraud risks.",
|
||||||
IsActive = true,
|
IsActive = true
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
|
||||||
},
|
},
|
||||||
new PaymentModeMatser
|
new PaymentModeMatser
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("ed667353-8eea-4fd1-8750-719405932480"),
|
Id = Guid.Parse("ed667353-8eea-4fd1-8750-719405932480"),
|
||||||
Name = "NetBanking",
|
Name = "NetBanking",
|
||||||
Description = "Online banking portals used to transfer funds directly between accounts",
|
Description = "Online banking portals used to transfer funds directly between accounts",
|
||||||
IsActive = true,
|
IsActive = true
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
|
||||||
},
|
},
|
||||||
new PaymentModeMatser
|
new PaymentModeMatser
|
||||||
{
|
{
|
||||||
Id = Guid.Parse("2e919e94-694c-41d9-9489-0a2b4208a027"),
|
Id = Guid.Parse("2e919e94-694c-41d9-9489-0a2b4208a027"),
|
||||||
Name = "UPI",
|
Name = "UPI",
|
||||||
Description = "Real-time bank-to-bank transfer using mobile apps; widely used for peer-to-peer and merchant payments.",
|
Description = "Real-time bank-to-bank transfer using mobile apps; widely used for peer-to-peer and merchant payments.",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new PaymentModeMatser
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("a820f240-5e9a-4ae9-9091-8a7aa7720cea"),
|
||||||
|
Name = "Credit card",
|
||||||
|
Description = "A credit card is a payment card that allows you to borrow funds from a financial institution to pay for goods and services",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new PaymentModeMatser
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("95697409-baf6-4f78-86ab-42d93d9569a8"),
|
||||||
|
Name = "Debit Card",
|
||||||
|
Description = "A debit card is a payment card that deducts funds directly from the cardholder's bank account when a purchase is made.",
|
||||||
|
IsActive = true
|
||||||
|
},
|
||||||
|
new PaymentModeMatser
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("f67beee6-6763-4108-922c-03bd86b9178d"),
|
||||||
|
Name = "Advance Payment",
|
||||||
|
Description = "When a bill is paid using the amount received in advance from a company.",
|
||||||
|
IsActive = true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<PaymentAdjustmentHead>().HasData(
|
||||||
|
new PaymentAdjustmentHead
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("dbdc047f-a2d2-4db0-b0e6-b9d9f923a0f1"),
|
||||||
|
Name = "Advance payment",
|
||||||
|
Description = "An advance payment is a sum paid before receiving goods or services, often to secure a transaction or cover initial costs.",
|
||||||
|
IsActive = true,
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
|
},
|
||||||
|
new PaymentAdjustmentHead
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("66c3c241-8b52-4327-a5ad-c1faf102583e"),
|
||||||
|
Name = "Base Amount",
|
||||||
|
Description = "The base amount refers to the principal sum or original value used as a reference in financial calculations, excluding taxes, fees, or additional charges.",
|
||||||
|
IsActive = true,
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
|
},
|
||||||
|
new PaymentAdjustmentHead
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("0d70cb2e-827e-44fc-90a5-c2c55ba51ba9"),
|
||||||
|
Name = "Tax Deducted at Source (TDS)",
|
||||||
|
Description = "TDS, or Tax Deducted at Source, is a system under the Indian Income Tax Act where tax is deducted at the point of income generation—such as salary, interest, or rent—and remitted to the government to prevent tax evasion and ensure timely collection.",
|
||||||
|
IsActive = true,
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
|
},
|
||||||
|
new PaymentAdjustmentHead
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("95f35acd-d979-4177-91ea-fd03a00e49ff"),
|
||||||
|
Name = "Retention",
|
||||||
|
Description = "Retention refers to a company's ability to keep customers, employees, or profits over time, commonly measured as a percentage and critical for long-term business sustainability and growth.",
|
||||||
|
IsActive = true,
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
|
},
|
||||||
|
new PaymentAdjustmentHead
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("3f09b19a-8d45-4cf2-be27-f4f09b38b9f7"),
|
||||||
|
Name = "Tax",
|
||||||
|
Description = "Tax is a mandatory financial charge imposed by a government on individuals or entities to fund public services and government operations, without direct benefit to the taxpayer.",
|
||||||
|
IsActive = true,
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
|
},
|
||||||
|
new PaymentAdjustmentHead
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("ec5e6a5f-ce62-44e5-8911-8426bbb4dde8"),
|
||||||
|
Name = "Penalty",
|
||||||
|
Description = "A penalty in the context of taxation is a financial sanction imposed by the government on individuals or entities for non-compliance with tax laws, such as late filing, underreporting income, or failure to pay taxes, and is typically calculated as a percentage of the tax due or a fixed amount.",
|
||||||
|
IsActive = true,
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
|
},
|
||||||
|
new PaymentAdjustmentHead
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("50584332-1cb7-4359-9721-c8ea35040881"),
|
||||||
|
Name = "Utility fees",
|
||||||
|
Description = "Utility fees are recurring charges for essential services such as electricity, water, gas, sewage, waste disposal, internet, and telecommunications, typically based on usage and necessary for operating a home or business.",
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
}
|
}
|
||||||
@ -1005,42 +1373,81 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<RecurringPaymentStatus>().HasData(
|
||||||
|
new RecurringPaymentStatus { Id = Guid.Parse("da462422-13b2-45cc-a175-910a225f6fc8"), Name = "Active" },
|
||||||
|
new RecurringPaymentStatus { Id = Guid.Parse("3ec864d2-8bf5-42fb-ba70-5090301dd816"), Name = "De-Activated" },
|
||||||
|
new RecurringPaymentStatus { Id = Guid.Parse("306856fb-5655-42eb-bf8b-808bb5e84725"), Name = "Completed" },
|
||||||
|
new RecurringPaymentStatus { Id = Guid.Parse("8bfc9346-e092-4a80-acbf-515ae1ef6868"), Name = "Paused" }
|
||||||
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<TeamRoleMaster>().HasData(
|
||||||
|
new TeamRoleMaster { Id = Guid.Parse("8cfbf16f-7d3b-4c29-af5b-18935f20aa7b"), Name = "Support", Description = "A Support role involves assisting users or customers by resolving technical or service-related issues, answering inquiries, and ensuring a positive experience with products or services." },
|
||||||
|
new TeamRoleMaster { Id = Guid.Parse("145d7222-408b-4733-8a17-f417e070b8b8"), Name = "Service Engineer", Description = "A Service Engineer installs, maintains, repairs, and troubleshoots equipment to ensure optimal operation and customer satisfaction." },
|
||||||
|
new TeamRoleMaster { Id = Guid.Parse("03bf5853-5e0b-4eb8-9f37-33bd999a05b3"), Name = "Manager", Description = "A Manager oversees and coordinates a team or department to achieve organizational goals through planning, decision-making, and leadership." }
|
||||||
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<JobStatus>().HasData(
|
||||||
|
new JobStatus { Id = Guid.Parse("32d76a02-8f44-4aa0-9b66-c3716c45a918"), Name = "New", DisplayName = "New", Level = 1 },
|
||||||
|
new JobStatus { Id = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), Name = "Assigned", DisplayName = "Assigned", Level = 2 },
|
||||||
|
new JobStatus { Id = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), Name = "In Progress", DisplayName = "In Progress", Level = 3 },
|
||||||
|
new JobStatus { Id = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), Name = "Work Done", DisplayName = "Work Done", Level = 4 },
|
||||||
|
new JobStatus { Id = Guid.Parse("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), Name = "Review Done", DisplayName = "Review Done", Level = 5 },
|
||||||
|
new JobStatus { Id = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), Name = "Closed", DisplayName = "Closed", Level = 6 },
|
||||||
|
new JobStatus { Id = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), Name = "On Hold", DisplayName = "On Hold", Level = 7 }
|
||||||
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<JobStatusMapping>().HasData(
|
||||||
|
// New to Assigned
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("024e1810-6a57-4a0d-8d2e-be88da79fcd4"), StatusId = Guid.Parse("32d76a02-8f44-4aa0-9b66-c3716c45a918"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Assinged to In Progress
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("cb0db140-87fa-4a6f-812d-2834bd0f53a9"), StatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), NextStatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Assinged to On Hold
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("42f24930-387e-4f51-9c2d-3e29ffaaf02a"), StatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), NextStatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Assigned to closed
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("16c83c23-09be-40fd-9d05-f44795d8dee8"), StatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// In Progress to Resolved
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("8c4ecdae-7435-4475-8389-15bc453561a1"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// In Progress to Assigned
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("a44b0a66-ee33-47e7-a01f-6b8d9b621543"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// In Progress to Closed
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("7165ecee-10e3-4fc0-85d2-6d93d5b11776"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// In Progress to On Hold
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("87891499-e45d-406b-bf22-722db1beedc9"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Resolved to Done
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("dc986ec4-858e-4c98-b330-4a5c98c91f07"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Resolved to Assigned
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("ca8b4358-3122-4aaa-bcf8-0b66e4ab313a"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Resolved to In Progress
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("5602d32c-290e-48a3-83dd-91af6d12ed46"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Resolved to Closed
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("9c2918be-b3c1-46fb-a03b-14dd613e1021"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Resolved to On Hold
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("ab974bdb-2d8f-4ddc-9b71-bd6d198bae75"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// On Hold to Assigned
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("2787c903-1b39-4e7d-a0f2-3bb2309bb341"), StatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
// Done to Close
|
||||||
|
new JobStatusMapping { Id = Guid.Parse("76bc5551-8f80-469d-ba23-95d7e746c9a9"), StatusId = Guid.Parse("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||||
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<Module>().HasData(
|
modelBuilder.Entity<Module>().HasData(
|
||||||
new Module
|
new Module { Id = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), Name = "Project", Description = "Project Module", Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02" },
|
||||||
{
|
new Module { Id = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), Name = "Employee", Description = "Employee Module", Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637" },
|
||||||
Id = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"),
|
new Module { Id = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), Name = "Masters", Description = "Masters Module", Key = "504ec132-e6a9-422f-8f85-050602cfce05" },
|
||||||
Name = "Project",
|
new Module { Id = new Guid("f482a079-4dec-4f2d-9867-6baf2a4f23d9"), Name = "Tenant", Description = "Tenant Module", Key = "504ec132-e6a9-422f-8f85-050602cfce05" },
|
||||||
Description = "Project Module",
|
new Module { Id = new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17"), Name = "Inventory", Description = "Inventory Module", Key = "504ec132-e6a9-422f-8f85-050602cfce05" },
|
||||||
Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02"
|
new Module { Id = new Guid("0a79687a-86d7-430d-a2d7-8b8603cc76a1"), Name = "Finance", Description = "Finance Module", Key = "504ec132-e6a9-422f-8f85-050602cfce05" }
|
||||||
},
|
);
|
||||||
new Module
|
|
||||||
{
|
|
||||||
Id = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"),
|
|
||||||
Name = "Employee",
|
|
||||||
Description = "Employee Module",
|
|
||||||
Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637"
|
|
||||||
},
|
|
||||||
new Module
|
|
||||||
{
|
|
||||||
Id = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
|
|
||||||
Name = "Masters",
|
|
||||||
Description = "Masters Module",
|
|
||||||
Key = "504ec132-e6a9-422f-8f85-050602cfce05"
|
|
||||||
},
|
|
||||||
new Module
|
|
||||||
{
|
|
||||||
Id = new Guid("f482a079-4dec-4f2d-9867-6baf2a4f23d9"),
|
|
||||||
Name = "Tenant",
|
|
||||||
Description = "Tenant Module",
|
|
||||||
Key = "504ec132-e6a9-422f-8f85-050602cfce05"
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity<Feature>().HasData(
|
modelBuilder.Entity<Feature>().HasData(
|
||||||
// Project Module
|
// Project Module
|
||||||
new Feature { Id = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), Description = "Manage Project", Name = "Project Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
new Feature { Id = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), Description = "Manage Project", Name = "Project Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
||||||
new Feature { Id = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), Description = "Expense Management is the systematic process of tracking, controlling, and reporting business-related expenditures.", Name = "Expense Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
|
||||||
new Feature { Id = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Task Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
new Feature { Id = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Task Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
||||||
|
|
||||||
|
// Finance Module
|
||||||
|
new Feature { Id = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), Description = "Expense Management is the systematic process of tracking, controlling, and reporting business-related expenditures.", Name = "Expense Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
||||||
|
new Feature { Id = new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), Description = "Collection Management is a feature that enables organizations to track, organize, and manage the status and recovery of receivables or assets efficiently throughout their lifecycle, supporting systematic follow-up and resolution of outstanding accounts.", Name = "Collection Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
||||||
|
new Feature { Id = new Guid("86e80017-0698-4efe-93d0-806de67266e0"), Description = "Recurring Template Management is the automated creation and scheduling of repetitive tasks, processes, or transactions using predefined templates at set intervals to ensure consistent and efficient workflow execution without manual recreation each time.", Name = "Recurring Template Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
|
||||||
|
|
||||||
// Employee Module
|
// Employee Module
|
||||||
new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Employee Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Employee Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
||||||
new Feature { Id = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
new Feature { Id = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
||||||
@ -1051,6 +1458,9 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Managing all directory related rights", Name = "Directory Management", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Managing all directory related rights", Name = "Directory Management", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
||||||
new Feature { Id = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), Description = "Managing all organization related rights", Name = "Organization Management", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
new Feature { Id = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), Description = "Managing all organization related rights", Name = "Organization Management", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
||||||
|
|
||||||
|
// Inventory Module
|
||||||
|
new Feature { Id = new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), Description = "Managing all Purchase invoice related rights", Name = "Purchase Invoice Management", ModuleId = new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17"), IsActive = true },
|
||||||
|
|
||||||
// Tenant Module
|
// Tenant Module
|
||||||
new Feature { Id = new Guid("2f3509b7-160d-410a-b9b6-daadd96c986d"), Description = "Managing all tenant related rights", Name = "Tenant Management", ModuleId = new Guid("f482a079-4dec-4f2d-9867-6baf2a4f23d9"), IsActive = true }
|
new Feature { Id = new Guid("2f3509b7-160d-410a-b9b6-daadd96c986d"), Description = "Managing all tenant related rights", Name = "Tenant Management", ModuleId = new Guid("f482a079-4dec-4f2d-9867-6baf2a4f23d9"), IsActive = true }
|
||||||
);
|
);
|
||||||
@ -1110,71 +1520,32 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
new FeaturePermission { Id = new Guid("ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Process", Description = "Allows a user to handle post-approval actions such as recording payments, updating financial records, or marking expenses as reimbursed or settled." },
|
new FeaturePermission { Id = new Guid("ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Process", Description = "Allows a user to handle post-approval actions such as recording payments, updating financial records, or marking expenses as reimbursed or settled." },
|
||||||
new FeaturePermission { Id = new Guid("bdee29a2-b73b-402d-8dd1-c4b1f81ccbc3"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Manage", Description = "Allows a user to configure and control system settings, such as managing expense types, payment modes, permissions, and overall workflow rules." },
|
new FeaturePermission { Id = new Guid("bdee29a2-b73b-402d-8dd1-c4b1f81ccbc3"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Manage", Description = "Allows a user to configure and control system settings, such as managing expense types, payment modes, permissions, and overall workflow rules." },
|
||||||
|
|
||||||
|
// Collection Management Feature
|
||||||
|
new FeaturePermission { Id = new Guid("dbf17591-09fe-4c93-9e1a-12db8f5cc5de"), FeatureId = new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), IsEnabled = true, Name = "Collection Admin", Description = "Collection Admin is a permission that grants a user full administrative control over collections, including creating, editing, managing access, and deleting collections within a system." },
|
||||||
|
new FeaturePermission { Id = new Guid("c8d7eea5-4033-4aad-9ebe-76de49896830"), FeatureId = new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), IsEnabled = true, Name = "View Collection", Description = "View Collection is a permission that allows users to see and browse assets or items within a collection without making any modifications or edits to its contents." },
|
||||||
|
new FeaturePermission { Id = new Guid("b93141fd-dbd3-4051-8f57-bf25d18e3555"), FeatureId = new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), IsEnabled = true, Name = "Create Collection", Description = "Authorizes users to create new collections for organizing related resources and managing access" },
|
||||||
|
new FeaturePermission { Id = new Guid("455187b4-fef1-41f9-b3d0-025d0b6302c3"), FeatureId = new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), IsEnabled = true, Name = "Edit Collection", Description = "Ability to modify collection properties, content, and access rights." },
|
||||||
|
new FeaturePermission { Id = new Guid("061d9ccd-85b4-4cb0-be06-2f9f32cebb72"), FeatureId = new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), IsEnabled = true, Name = "Add Payment", Description = " Enables entry and processing of payment transactions." },
|
||||||
|
|
||||||
|
// Recurring Template Management
|
||||||
|
new FeaturePermission { Id = new Guid("6382ea8b-aff2-4cd2-a48f-a652b35825d8"), FeatureId = new Guid("86e80017-0698-4efe-93d0-806de67266e0"), IsEnabled = true, Name = "Manage Recurring", Description = "Manage Recurring Template payment permission allows authorized users to set up, modify, and execute automated recurring payments using predefined templates, ensuring secure and controlled handling of repetitive financial transactions." },
|
||||||
|
new FeaturePermission { Id = new Guid("7ddf2fba-c44d-4fe3-b4ec-690ff70be2e3"), FeatureId = new Guid("86e80017-0698-4efe-93d0-806de67266e0"), IsEnabled = true, Name = "View All Recurring", Description = "The \"View All Recurring Template payment permission\" generally allows users to see and access all recurring payment templates in the system, enabling them to review, manage, and process recurring transactions efficiently." },
|
||||||
|
new FeaturePermission { Id = new Guid("e5d21efe-573d-4a16-a0f8-414d3e442e78"), FeatureId = new Guid("86e80017-0698-4efe-93d0-806de67266e0"), IsEnabled = true, Name = "View Self Recurring", Description = "View Self Recurring Template payment permission allows a user to view and access their own recurring payment templates without editing rights." },
|
||||||
|
|
||||||
// Organization Management Feature
|
// Organization Management Feature
|
||||||
new FeaturePermission { Id = new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"), FeatureId = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), IsEnabled = true, Name = "Add Organization", Description = "Allow user to create new organization" },
|
new FeaturePermission { Id = new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"), FeatureId = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), IsEnabled = true, Name = "Add Organization", Description = "Allow user to create new organization" },
|
||||||
new FeaturePermission { Id = new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"), FeatureId = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), IsEnabled = true, Name = "Edit Organization", Description = "Allow the user to update the basic information of the organization" },
|
new FeaturePermission { Id = new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"), FeatureId = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), IsEnabled = true, Name = "Edit Organization", Description = "Allow the user to update the basic information of the organization" },
|
||||||
new FeaturePermission { Id = new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"), FeatureId = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), IsEnabled = true, Name = "View Organization", Description = "Allow the user to view information of the organization" }
|
new FeaturePermission { Id = new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"), FeatureId = new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), IsEnabled = true, Name = "View Organization", Description = "Allow the user to view information of the organization" },
|
||||||
|
|
||||||
|
// Purchase Invoice Management Feature
|
||||||
|
new FeaturePermission { Id = new Guid("91e09825-512a-465e-82ad-fa355b305585"), FeatureId = new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), IsEnabled = true, Name = "View Self Purchase Invoice", Description = "Allows the user to view only the purchase invoices they created." },
|
||||||
|
new FeaturePermission { Id = new Guid("d6ae78d3-a941-4cc4-8d0a-d40479be4211"), FeatureId = new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), IsEnabled = true, Name = "View All Purchase Invoice", Description = "Allows the user to view all purchase invoices across the entire organization." },
|
||||||
|
new FeaturePermission { Id = new Guid("68ff925d-8ebf-4034-a137-8d3317c56ca1"), FeatureId = new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), IsEnabled = true, Name = "Manage Purchase Invoice", Description = "Allows full control to create, edit, and process purchase invoices." },
|
||||||
|
new FeaturePermission { Id = new Guid("a4b77638-bf31-42bb-afd4-d5bbd15ccadc"), FeatureId = new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), IsEnabled = true, Name = "Delete Purchase Invoice", Description = "Allows the user to mark purchase invoices as inactive or void." },
|
||||||
|
new FeaturePermission { Id = new Guid("b24eba39-4a92-4f7a-b33b-b5308fbc48b9"), FeatureId = new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), IsEnabled = true, Name = "Add Delivery Challan", Description = "Allows the user to create delivery challans for purchase invoices." }
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<CurrencyMaster>().HasData(
|
|
||||||
new CurrencyMaster
|
|
||||||
{
|
|
||||||
Id = Guid.Parse("78e96e4a-7ce0-4164-ae3a-c833ad45ec2c"),
|
|
||||||
CurrencyCode = "INR",
|
|
||||||
CurrencyName = "Indian Rupee",
|
|
||||||
Symbol = "₹",
|
|
||||||
IsActive = true
|
|
||||||
},
|
|
||||||
new CurrencyMaster
|
|
||||||
{
|
|
||||||
Id = Guid.Parse("2f672568-a67b-4961-acb2-a8c7834e1762"),
|
|
||||||
CurrencyCode = "USD",
|
|
||||||
CurrencyName = "US Dollar",
|
|
||||||
Symbol = "$",
|
|
||||||
IsActive = true
|
|
||||||
},
|
|
||||||
new CurrencyMaster
|
|
||||||
{
|
|
||||||
Id = Guid.Parse("4d1155bb-1448-4d97-a732-96c92eb99c45"),
|
|
||||||
CurrencyCode = "EUR",
|
|
||||||
CurrencyName = "Euro",
|
|
||||||
Symbol = "€",
|
|
||||||
IsActive = true
|
|
||||||
},
|
|
||||||
new CurrencyMaster
|
|
||||||
{
|
|
||||||
Id = Guid.Parse("3e456237-ef06-4ea1-a261-188c9b0c6df6"),
|
|
||||||
CurrencyCode = "GBP",
|
|
||||||
CurrencyName = "Pound Sterling",
|
|
||||||
Symbol = "£",
|
|
||||||
IsActive = true
|
|
||||||
},
|
|
||||||
new CurrencyMaster
|
|
||||||
{
|
|
||||||
Id = Guid.Parse("297e237a-56d3-48f6-b39d-ec3991dea8bf"),
|
|
||||||
CurrencyCode = "JPY",
|
|
||||||
CurrencyName = "Japanese Yen",
|
|
||||||
Symbol = "¥",
|
|
||||||
IsActive = true
|
|
||||||
},
|
|
||||||
new CurrencyMaster
|
|
||||||
{
|
|
||||||
Id = Guid.Parse("efe9b4f6-64d6-446e-a42d-1c7aaf6dd70d"),
|
|
||||||
CurrencyCode = "RUB",
|
|
||||||
CurrencyName = "Russian Ruble",
|
|
||||||
Symbol = "₽",
|
|
||||||
IsActive = true
|
|
||||||
},
|
|
||||||
new CurrencyMaster
|
|
||||||
{
|
|
||||||
Id = Guid.Parse("b960166a-f7e9-49e3-bb4b-28511f126c08"),
|
|
||||||
CurrencyCode = "CNY",
|
|
||||||
CurrencyName = "Chinese Yuan (Renminbi)",
|
|
||||||
Symbol = "¥",
|
|
||||||
IsActive = true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
6209
Marco.Pms.DataAccess/Migrations/20251004112239_Added_ExpenceUID_In_Expense_Table.Designer.cs
generated
Normal file
6209
Marco.Pms.DataAccess/Migrations/20251004112239_Added_ExpenceUID_In_Expense_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_ExpenceUID_In_Expense_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "ExpenseUId",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ExpenseUId",
|
||||||
|
table: "Expenses");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6226
Marco.Pms.DataAccess/Migrations/20251010062100_Added_Requested_In_Attendance_Table.Designer.cs
generated
Normal file
6226
Marco.Pms.DataAccess/Migrations/20251010062100_Added_Requested_In_Attendance_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,70 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Requested_In_Attendance_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "ApprovedAt",
|
||||||
|
table: "Attendes",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "RequestedAt",
|
||||||
|
table: "Attendes",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "RequestedById",
|
||||||
|
table: "Attendes",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Attendes_RequestedById",
|
||||||
|
table: "Attendes",
|
||||||
|
column: "RequestedById");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_RequestedById",
|
||||||
|
table: "Attendes",
|
||||||
|
column: "RequestedById",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_RequestedById",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Attendes_RequestedById",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ApprovedAt",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "RequestedAt",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "RequestedById",
|
||||||
|
table: "Attendes");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6505
Marco.Pms.DataAccess/Migrations/20251013122515_Added_Collection_Related_Tables.Designer.cs
generated
Normal file
6505
Marco.Pms.DataAccess/Migrations/20251013122515_Added_Collection_Related_Tables.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,256 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Collection_Related_Tables : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Invoices",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
InvoiceNumber = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
InvoiceDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
ClientSubmitedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
ExceptedPaymentDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
Amount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Invoices", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Invoices_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Invoices_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Invoices_Projects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Invoices_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "InvoiceAttachments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
InvoiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_InvoiceAttachments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_InvoiceAttachments_Documents_DocumentId",
|
||||||
|
column: x => x.DocumentId,
|
||||||
|
principalTable: "Documents",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_InvoiceAttachments_Invoices_InvoiceId",
|
||||||
|
column: x => x.InvoiceId,
|
||||||
|
principalTable: "Invoices",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_InvoiceAttachments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "InvoiceComments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
InvoiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_InvoiceComments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_InvoiceComments_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_InvoiceComments_Invoices_InvoiceId",
|
||||||
|
column: x => x.InvoiceId,
|
||||||
|
principalTable: "Invoices",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_InvoiceComments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ReceivedInvoicePayments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
InvoiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PaymentReceivedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
TransactionId = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Amount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ReceivedInvoicePayments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ReceivedInvoicePayments_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ReceivedInvoicePayments_Invoices_InvoiceId",
|
||||||
|
column: x => x.InvoiceId,
|
||||||
|
principalTable: "Invoices",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ReceivedInvoicePayments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_InvoiceAttachments_DocumentId",
|
||||||
|
table: "InvoiceAttachments",
|
||||||
|
column: "DocumentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_InvoiceAttachments_InvoiceId",
|
||||||
|
table: "InvoiceAttachments",
|
||||||
|
column: "InvoiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_InvoiceAttachments_TenantId",
|
||||||
|
table: "InvoiceAttachments",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_InvoiceComments_CreatedById",
|
||||||
|
table: "InvoiceComments",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_InvoiceComments_InvoiceId",
|
||||||
|
table: "InvoiceComments",
|
||||||
|
column: "InvoiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_InvoiceComments_TenantId",
|
||||||
|
table: "InvoiceComments",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Invoices_CreatedById",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Invoices_ProjectId",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Invoices_TenantId",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Invoices_UpdatedById",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ReceivedInvoicePayments_CreatedById",
|
||||||
|
table: "ReceivedInvoicePayments",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ReceivedInvoicePayments_InvoiceId",
|
||||||
|
table: "ReceivedInvoicePayments",
|
||||||
|
column: "InvoiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ReceivedInvoicePayments_TenantId",
|
||||||
|
table: "ReceivedInvoicePayments",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "InvoiceAttachments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "InvoiceComments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ReceivedInvoicePayments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Invoices");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6514
Marco.Pms.DataAccess/Migrations/20251013141456_Added_EInvoiceNumber_In_Invoice_Table.Designer.cs
generated
Normal file
6514
Marco.Pms.DataAccess/Migrations/20251013141456_Added_EInvoiceNumber_In_Invoice_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,61 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_EInvoiceNumber_In_Invoice_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Amount",
|
||||||
|
table: "Invoices",
|
||||||
|
newName: "TaxAmount");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<double>(
|
||||||
|
name: "BasicAmount",
|
||||||
|
table: "Invoices",
|
||||||
|
type: "double",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0.0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "EInvoiceNumber",
|
||||||
|
table: "Invoices",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "MarkAsCompleted",
|
||||||
|
table: "Invoices",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "BasicAmount",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "EInvoiceNumber",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "MarkAsCompleted",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "TaxAmount",
|
||||||
|
table: "Invoices",
|
||||||
|
newName: "Amount");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6518
Marco.Pms.DataAccess/Migrations/20251014094816_Added_Comment_In_ReceivedInvoicePayment_Table.Designer.cs
generated
Normal file
6518
Marco.Pms.DataAccess/Migrations/20251014094816_Added_Comment_In_ReceivedInvoicePayment_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Comment_In_ReceivedInvoicePayment_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Comment",
|
||||||
|
table: "ReceivedInvoicePayments",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Comment",
|
||||||
|
table: "ReceivedInvoicePayments");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6613
Marco.Pms.DataAccess/Migrations/20251014114810_Added_PaymentAdjustmentHead_Master_Table.Designer.cs
generated
Normal file
6613
Marco.Pms.DataAccess/Migrations/20251014114810_Added_PaymentAdjustmentHead_Master_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,67 @@
|
|||||||
|
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_PaymentAdjustmentHead_Master_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PaymentAdjustmentHeads",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IsActive = 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_PaymentAdjustmentHeads", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentAdjustmentHeads_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "PaymentAdjustmentHeads",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "Name", "TenantId" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("0d70cb2e-827e-44fc-90a5-c2c55ba51ba9"), "TDS, or Tax Deducted at Source, is a system under the Indian Income Tax Act where tax is deducted at the point of income generation—such as salary, interest, or rent—and remitted to the government to prevent tax evasion and ensure timely collection.", true, "Tax Deducted at Source (TDS)", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("3f09b19a-8d45-4cf2-be27-f4f09b38b9f7"), "Tax is a mandatory financial charge imposed by a government on individuals or entities to fund public services and government operations, without direct benefit to the taxpayer.", true, "Tax", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("50584332-1cb7-4359-9721-c8ea35040881"), "Utility fees are recurring charges for essential services such as electricity, water, gas, sewage, waste disposal, internet, and telecommunications, typically based on usage and necessary for operating a home or business.", true, "Utility fees", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("66c3c241-8b52-4327-a5ad-c1faf102583e"), "The base amount refers to the principal sum or original value used as a reference in financial calculations, excluding taxes, fees, or additional charges.", true, "Base Amount", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("95f35acd-d979-4177-91ea-fd03a00e49ff"), "Retention refers to a company's ability to keep customers, employees, or profits over time, commonly measured as a percentage and critical for long-term business sustainability and growth.", true, "Retention", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("dbdc047f-a2d2-4db0-b0e6-b9d9f923a0f1"), "An advance payment is a sum paid before receiving goods or services, often to secure a transaction or cover initial costs.", true, "Advance payment", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("ec5e6a5f-ce62-44e5-8911-8426bbb4dde8"), "A penalty in the context of taxation is a financial sanction imposed by the government on individuals or entities for non-compliance with tax laws, such as late filing, underreporting income, or failure to pay taxes, and is typically calculated as a percentage of the tax due or a fixed amount.", true, "Penalty", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentAdjustmentHeads_TenantId",
|
||||||
|
table: "PaymentAdjustmentHeads",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PaymentAdjustmentHeads");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,51 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_PaymentAdjustmentHead_ForignKey_In_ReceivedInvoicePayment_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "PaymentAdjustmentHeadId",
|
||||||
|
table: "ReceivedInvoicePayments",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("66c3c241-8b52-4327-a5ad-c1faf102583e"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ReceivedInvoicePayments_PaymentAdjustmentHeadId",
|
||||||
|
table: "ReceivedInvoicePayments",
|
||||||
|
column: "PaymentAdjustmentHeadId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ReceivedInvoicePayments_PaymentAdjustmentHeads_PaymentAdjust~",
|
||||||
|
table: "ReceivedInvoicePayments",
|
||||||
|
column: "PaymentAdjustmentHeadId",
|
||||||
|
principalTable: "PaymentAdjustmentHeads",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ReceivedInvoicePayments_PaymentAdjustmentHeads_PaymentAdjust~",
|
||||||
|
table: "ReceivedInvoicePayments");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ReceivedInvoicePayments_PaymentAdjustmentHeadId",
|
||||||
|
table: "ReceivedInvoicePayments");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PaymentAdjustmentHeadId",
|
||||||
|
table: "ReceivedInvoicePayments");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6674
Marco.Pms.DataAccess/Migrations/20251016073202_Added_Collection_Related_Permissions.Designer.cs
generated
Normal file
6674
Marco.Pms.DataAccess/Migrations/20251016073202_Added_Collection_Related_Permissions.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,68 @@
|
|||||||
|
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_Collection_Related_Permissions : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Features",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
||||||
|
values: new object[] { new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), "Collection Management is a feature that enables organizations to track, organize, and manage the status and recovery of receivables or assets efficiently throughout their lifecycle, supporting systematic follow-up and resolution of outstanding accounts.", true, new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), "Collection Management" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("061d9ccd-85b4-4cb0-be06-2f9f32cebb72"), " Enables entry and processing of payment transactions.", new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), true, "Add Payment" },
|
||||||
|
{ new Guid("455187b4-fef1-41f9-b3d0-025d0b6302c3"), "Ability to modify collection properties, content, and access rights.", new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), true, "Edit Collection" },
|
||||||
|
{ new Guid("b93141fd-dbd3-4051-8f57-bf25d18e3555"), "Authorizes users to create new collections for organizing related resources and managing access", new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), true, "Create Collection" },
|
||||||
|
{ new Guid("c8d7eea5-4033-4aad-9ebe-76de49896830"), "View Collection is a permission that allows users to see and browse assets or items within a collection without making any modifications or edits to its contents.", new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), true, "View Collection" },
|
||||||
|
{ new Guid("dbf17591-09fe-4c93-9e1a-12db8f5cc5de"), "Collection Admin is a permission that grants a user full administrative control over collections, including creating, editing, managing access, and deleting collections within a system.", new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"), true, "Collection Admin" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("061d9ccd-85b4-4cb0-be06-2f9f32cebb72"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("455187b4-fef1-41f9-b3d0-025d0b6302c3"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b93141fd-dbd3-4051-8f57-bf25d18e3555"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("c8d7eea5-4033-4aad-9ebe-76de49896830"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("dbf17591-09fe-4c93-9e1a-12db8f5cc5de"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Features",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("fc586e7d-ed1a-45e5-bb51-9f34af98ec13"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6713
Marco.Pms.DataAccess/Migrations/20251027041510_Added_PaymentDetails_Table.Designer.cs
generated
Normal file
6713
Marco.Pms.DataAccess/Migrations/20251027041510_Added_PaymentDetails_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_PaymentDetails_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PaymentDetails",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PaymentId = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
OrderId = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Status = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Method = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
EncryptedDetails = table.Column<byte[]>(type: "longblob", nullable: true),
|
||||||
|
Nonce = table.Column<byte[]>(type: "longblob", nullable: true),
|
||||||
|
Tag = table.Column<byte[]>(type: "longblob", nullable: true),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PaymentDetails", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PaymentDetails");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6772
Marco.Pms.DataAccess/Migrations/20251027103648_Added_TenantEnquire_Table.Designer.cs
generated
Normal file
6772
Marco.Pms.DataAccess/Migrations/20251027103648_Added_TenantEnquire_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,62 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_TenantEnquire_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "TenantEnquires",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
FirstName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
LastName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
OrganizationName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Email = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ContactNumber = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
BillingAddress = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
OrganizationSize = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IndustryId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Reference = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_TenantEnquires", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_TenantEnquires_Industries_IndustryId",
|
||||||
|
column: x => x.IndustryId,
|
||||||
|
principalTable: "Industries",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TenantEnquires_IndustryId",
|
||||||
|
table: "TenantEnquires",
|
||||||
|
column: "IndustryId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "TenantEnquires");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6783
Marco.Pms.DataAccess/Migrations/20251028052440_Added_PaymentDetails_In_TenantSubscription_Table.Designer.cs
generated
Normal file
6783
Marco.Pms.DataAccess/Migrations/20251028052440_Added_PaymentDetails_In_TenantSubscription_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,50 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_PaymentDetails_In_TenantSubscription_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "PaymentDetailId",
|
||||||
|
table: "TenantSubscriptions",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TenantSubscriptions_PaymentDetailId",
|
||||||
|
table: "TenantSubscriptions",
|
||||||
|
column: "PaymentDetailId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
||||||
|
table: "TenantSubscriptions",
|
||||||
|
column: "PaymentDetailId",
|
||||||
|
principalTable: "PaymentDetails",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
||||||
|
table: "TenantSubscriptions");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_TenantSubscriptions_PaymentDetailId",
|
||||||
|
table: "TenantSubscriptions");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PaymentDetailId",
|
||||||
|
table: "TenantSubscriptions");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7494
Marco.Pms.DataAccess/Migrations/20251107110903_Added_Finance_Related_Tables.Designer.cs
generated
Normal file
7494
Marco.Pms.DataAccess/Migrations/20251107110903_Added_Finance_Related_Tables.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,950 @@
|
|||||||
|
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_Finance_Related_Tables : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Expenses_ExpensesTypeMaster_ExpensesTypeId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PaymentModeMatser_Tenants_TenantId",
|
||||||
|
table: "PaymentModeMatser");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_PaymentModeMatser_TenantId",
|
||||||
|
table: "PaymentModeMatser");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Expenses_ExpensesTypeId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("77013784-9324-4d8b-bd36-d6f928e68942"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"));
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "PaymentModeMatser");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ExpenseUId",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<double>(
|
||||||
|
name: "BaseAmount",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "double",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "CurrencyId",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("78e96e4a-7ce0-4164-ae3a-c833ad45ec2c"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ExpenseCategoryId",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "PaymentRequestId",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<double>(
|
||||||
|
name: "TDSPercentage",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "double",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<double>(
|
||||||
|
name: "TaxAmount",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "double",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "UIDPostfix",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "UIDPrefix",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "AdvancePaymentTransactions",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
FinanceUIdPrefix = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
FinanceUIdPostfix = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Amount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
CurrentBalance = table.Column<double>(type: "double", nullable: false),
|
||||||
|
PaidAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
IsActive = 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_AdvancePaymentTransactions", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AdvancePaymentTransactions_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AdvancePaymentTransactions_Employees_EmployeeId",
|
||||||
|
column: x => x.EmployeeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AdvancePaymentTransactions_Projects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AdvancePaymentTransactions_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ExpenseCategoryMasters",
|
||||||
|
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"),
|
||||||
|
NoOfPersonsRequired = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
IsAttachmentRequried = 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_ExpenseCategoryMasters", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ExpenseCategoryMasters_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "RecurringPaymentStatus",
|
||||||
|
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")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_RecurringPaymentStatus", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "StatusUpdateLogs",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
EntityId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Comment = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_StatusUpdateLogs", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_StatusUpdateLogs_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_StatusUpdateLogs_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "RecurringPayments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UIDPrefix = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UIDPostfix = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Payee = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
NotifyTo = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
CurrencyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Amount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
StrikeDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
LatestPRGeneratedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
PaymentBufferDays = table.Column<int>(type: "int", nullable: false),
|
||||||
|
NumberOfIteration = table.Column<int>(type: "int", nullable: false),
|
||||||
|
ExpenseCategoryId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Frequency = table.Column<int>(type: "int", nullable: false),
|
||||||
|
IsVariable = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_RecurringPayments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_RecurringPayments_CurrencyMaster_CurrencyId",
|
||||||
|
column: x => x.CurrencyId,
|
||||||
|
principalTable: "CurrencyMaster",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_RecurringPayments_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_RecurringPayments_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_RecurringPayments_ExpenseCategoryMasters_ExpenseCategoryId",
|
||||||
|
column: x => x.ExpenseCategoryId,
|
||||||
|
principalTable: "ExpenseCategoryMasters",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_RecurringPayments_Projects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_RecurringPayments_RecurringPaymentStatus_StatusId",
|
||||||
|
column: x => x.StatusId,
|
||||||
|
principalTable: "RecurringPaymentStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_RecurringPayments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PaymentRequests",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UIDPrefix = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UIDPostfix = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Payee = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IsAdvancePayment = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CurrencyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Amount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
BaseAmount = table.Column<double>(type: "double", nullable: true),
|
||||||
|
TaxAmount = table.Column<double>(type: "double", nullable: true),
|
||||||
|
TDSPercentage = table.Column<double>(type: "double", nullable: true),
|
||||||
|
DueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
RecurringPaymentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
ExpenseCategoryId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
ExpenseStatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PaidTransactionId = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
PaidAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
PaidById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
IsExpenseCreated = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PaymentRequests", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_CurrencyMaster_CurrencyId",
|
||||||
|
column: x => x.CurrencyId,
|
||||||
|
principalTable: "CurrencyMaster",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_Employees_PaidById",
|
||||||
|
column: x => x.PaidById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_ExpenseCategoryMasters_ExpenseCategoryId",
|
||||||
|
column: x => x.ExpenseCategoryId,
|
||||||
|
principalTable: "ExpenseCategoryMasters",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_ExpensesStatusMaster_ExpenseStatusId",
|
||||||
|
column: x => x.ExpenseStatusId,
|
||||||
|
principalTable: "ExpensesStatusMaster",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_Projects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_RecurringPayments_RecurringPaymentId",
|
||||||
|
column: x => x.RecurringPaymentId,
|
||||||
|
principalTable: "RecurringPayments",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequests_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PaymentRequestAttachments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PaymentRequestId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PaymentRequestAttachments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequestAttachments_Documents_DocumentId",
|
||||||
|
column: x => x.DocumentId,
|
||||||
|
principalTable: "Documents",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequestAttachments_PaymentRequests_PaymentRequestId",
|
||||||
|
column: x => x.PaymentRequestId,
|
||||||
|
principalTable: "PaymentRequests",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PaymentRequestAttachments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "ExpenseCategoryMasters",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "IsAttachmentRequried", "Name", "NoOfPersonsRequired", "TenantId" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"), "Scheduled payments for external services or goods.", true, true, "Vendor/Supplier Payments", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"), "Vehicle fuel, logistics services and delivery of goods or personnel.", true, false, "Transport", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"), "Government fees, insurance, inspections and safety-related expenditures.", true, true, "Compliance & Safety", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"), "Site setup costs including equipment deployment and temporary infrastructure.", true, true, "Mobilization", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"), "Materials, equipment and supplies purchased for site operations.", true, true, "Procurement", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("77013784-9324-4d8b-bd36-d6f928e68942"), "Machinery servicing, electricity, water, and temporary office needs.", true, true, "Maintenance & Utilities", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"), "Delivery of personnel.", true, false, "Travelling", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"), " Worker amenities like snacks, meals, safety gear, accommodation, medical support etc.", true, true, "Employee Welfare", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesStatusMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6537018f-f4e9-4cb3-a210-6c3b2da999d7"),
|
||||||
|
column: "DisplayName",
|
||||||
|
value: "Submit for Review");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "ExpensesStatusMaster",
|
||||||
|
columns: new[] { "Id", "Color", "Description", "DisplayName", "IsActive", "IsSystem", "Name" },
|
||||||
|
values: new object[] { new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3"), "#0E9F6E", "Create new Expense.", "Create Expense", true, true, "Done" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Features",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
||||||
|
values: new object[] { new Guid("86e80017-0698-4efe-93d0-806de67266e0"), "Recurring Template Management is the automated creation and scheduling of repetitive tasks, processes, or transactions using predefined templates at set intervals to ensure consistent and efficient workflow execution without manual recreation each time.", true, new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), "Recurring Template Management" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Modules",
|
||||||
|
columns: new[] { "Id", "Description", "Key", "Name" },
|
||||||
|
values: new object[] { new Guid("0a79687a-86d7-430d-a2d7-8b8603cc76a1"), "Finance Module", "504ec132-e6a9-422f-8f85-050602cfce05", "Finance" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("95697409-baf6-4f78-86ab-42d93d9569a8"), "A debit card is a payment card that deducts funds directly from the cardholder's bank account when a purchase is made.", true, "Debit Card" },
|
||||||
|
{ new Guid("a820f240-5e9a-4ae9-9091-8a7aa7720cea"), "A credit card is a payment card that allows you to borrow funds from a financial institution to pay for goods and services", true, "Credit card" },
|
||||||
|
{ new Guid("f67beee6-6763-4108-922c-03bd86b9178d"), "When a bill is paid using the amount received in advance from a company.", true, "Advance Payment" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "RecurringPaymentStatus",
|
||||||
|
columns: new[] { "Id", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("306856fb-5655-42eb-bf8b-808bb5e84725"), "Completed" },
|
||||||
|
{ new Guid("3ec864d2-8bf5-42fb-ba70-5090301dd816"), "De-Activated" },
|
||||||
|
{ new Guid("8bfc9346-e092-4a80-acbf-515ae1ef6868"), "Paused" },
|
||||||
|
{ new Guid("da462422-13b2-45cc-a175-910a225f6fc8"), "Active" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "ExpensesStatusMapping",
|
||||||
|
columns: new[] { "Id", "NextStatusId", "StatusId" },
|
||||||
|
values: new object[] { new Guid("a1cc95ed-b276-4a3e-9f00-0a249b522d64"), new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3"), new Guid("61578360-3a49-4c34-8604-7b35a3787b95") });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("6382ea8b-aff2-4cd2-a48f-a652b35825d8"), "Manage Recurring Template payment permission allows authorized users to set up, modify, and execute automated recurring payments using predefined templates, ensuring secure and controlled handling of repetitive financial transactions.", new Guid("86e80017-0698-4efe-93d0-806de67266e0"), true, "Manage Recurring" },
|
||||||
|
{ new Guid("7ddf2fba-c44d-4fe3-b4ec-690ff70be2e3"), "The \"View All Recurring Template payment permission\" generally allows users to see and access all recurring payment templates in the system, enabling them to review, manage, and process recurring transactions efficiently.", new Guid("86e80017-0698-4efe-93d0-806de67266e0"), true, "View All Recurring" },
|
||||||
|
{ new Guid("e5d21efe-573d-4a16-a0f8-414d3e442e78"), "View Self Recurring Template payment permission allows a user to view and access their own recurring payment templates without editing rights.", new Guid("86e80017-0698-4efe-93d0-806de67266e0"), true, "View Self Recurring" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "StatusPermissionMapping",
|
||||||
|
columns: new[] { "Id", "PermissionId", "StatusId" },
|
||||||
|
values: new object[] { new Guid("de04b6c7-a5cd-4a61-88b0-b43b0008202e"), new Guid("ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"), new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3") });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Expenses_CurrencyId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "CurrencyId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Expenses_ExpenseCategoryId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "ExpenseCategoryId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Expenses_PaymentRequestId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "PaymentRequestId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AdvancePaymentTransactions_CreatedById",
|
||||||
|
table: "AdvancePaymentTransactions",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AdvancePaymentTransactions_EmployeeId",
|
||||||
|
table: "AdvancePaymentTransactions",
|
||||||
|
column: "EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AdvancePaymentTransactions_ProjectId",
|
||||||
|
table: "AdvancePaymentTransactions",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AdvancePaymentTransactions_TenantId",
|
||||||
|
table: "AdvancePaymentTransactions",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ExpenseCategoryMasters_TenantId",
|
||||||
|
table: "ExpenseCategoryMasters",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequestAttachments_DocumentId",
|
||||||
|
table: "PaymentRequestAttachments",
|
||||||
|
column: "DocumentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequestAttachments_PaymentRequestId",
|
||||||
|
table: "PaymentRequestAttachments",
|
||||||
|
column: "PaymentRequestId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequestAttachments_TenantId",
|
||||||
|
table: "PaymentRequestAttachments",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_CreatedById",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_CurrencyId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "CurrencyId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_ExpenseCategoryId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "ExpenseCategoryId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_ExpenseStatusId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "ExpenseStatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_PaidById",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "PaidById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_ProjectId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_RecurringPaymentId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "RecurringPaymentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_TenantId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_UpdatedById",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_CreatedById",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_CurrencyId",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "CurrencyId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_ExpenseCategoryId",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "ExpenseCategoryId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_ProjectId",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_StatusId",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_TenantId",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_UpdatedById",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_StatusUpdateLogs_TenantId",
|
||||||
|
table: "StatusUpdateLogs",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_StatusUpdateLogs_UpdatedById",
|
||||||
|
table: "StatusUpdateLogs",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Expenses_CurrencyMaster_CurrencyId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "CurrencyId",
|
||||||
|
principalTable: "CurrencyMaster",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Expenses_ExpenseCategoryMasters_ExpenseCategoryId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "ExpenseCategoryId",
|
||||||
|
principalTable: "ExpenseCategoryMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Expenses_PaymentRequests_PaymentRequestId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "PaymentRequestId",
|
||||||
|
principalTable: "PaymentRequests",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Expenses_CurrencyMaster_CurrencyId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Expenses_ExpenseCategoryMasters_ExpenseCategoryId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Expenses_PaymentRequests_PaymentRequestId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "AdvancePaymentTransactions");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PaymentRequestAttachments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "StatusUpdateLogs");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PaymentRequests");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "RecurringPayments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ExpenseCategoryMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "RecurringPaymentStatus");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Expenses_CurrencyId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Expenses_ExpenseCategoryId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Expenses_PaymentRequestId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesStatusMapping",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1cc95ed-b276-4a3e-9f00-0a249b522d64"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6382ea8b-aff2-4cd2-a48f-a652b35825d8"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7ddf2fba-c44d-4fe3-b4ec-690ff70be2e3"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("e5d21efe-573d-4a16-a0f8-414d3e442e78"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Modules",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("0a79687a-86d7-430d-a2d7-8b8603cc76a1"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("95697409-baf6-4f78-86ab-42d93d9569a8"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a820f240-5e9a-4ae9-9091-8a7aa7720cea"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f67beee6-6763-4108-922c-03bd86b9178d"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "StatusPermissionMapping",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("de04b6c7-a5cd-4a61-88b0-b43b0008202e"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ExpensesStatusMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Features",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("86e80017-0698-4efe-93d0-806de67266e0"));
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "BaseAmount",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CurrencyId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ExpenseCategoryId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PaymentRequestId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TDSPercentage",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TaxAmount",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UIDPostfix",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UIDPrefix",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Expenses",
|
||||||
|
keyColumn: "ExpenseUId",
|
||||||
|
keyValue: null,
|
||||||
|
column: "ExpenseUId",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ExpenseUId",
|
||||||
|
table: "Expenses",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesStatusMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6537018f-f4e9-4cb3-a210-6c3b2da999d7"),
|
||||||
|
column: "DisplayName",
|
||||||
|
value: "Submit");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "IsAttachmentRequried", "Name", "NoOfPersonsRequired", "TenantId" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"), "Scheduled payments for external services or goods.", true, true, "Vendor/Supplier Payments", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"), "Vehicle fuel, logistics services and delivery of goods or personnel.", true, false, "Transport", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"), "Government fees, insurance, inspections and safety-related expenditures.", true, true, "Compliance & Safety", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"), "Site setup costs including equipment deployment and temporary infrastructure.", true, true, "Mobilization", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"), "Materials, equipment and supplies purchased for site operations.", true, true, "Procurement", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("77013784-9324-4d8b-bd36-d6f928e68942"), "Machinery servicing, electricity, water, and temporary office needs.", true, true, "Maintenance & Utilities", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"), "Delivery of personnel.", true, false, "Travelling", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"), " Worker amenities like snacks, meals, safety gear, accommodation, medical support etc.", true, true, "Employee Welfare", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("24e6b0df-7929-47d2-88a3-4cf14c1f28f9"),
|
||||||
|
column: "TenantId",
|
||||||
|
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2e919e94-694c-41d9-9489-0a2b4208a027"),
|
||||||
|
column: "TenantId",
|
||||||
|
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("48d9b462-5d87-4dec-8dec-2bc943943172"),
|
||||||
|
column: "TenantId",
|
||||||
|
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("ed667353-8eea-4fd1-8750-719405932480"),
|
||||||
|
column: "TenantId",
|
||||||
|
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentModeMatser_TenantId",
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Expenses_ExpensesTypeId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "ExpensesTypeId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Expenses_ExpensesTypeMaster_ExpensesTypeId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "ExpensesTypeId",
|
||||||
|
principalTable: "ExpensesTypeMaster",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PaymentModeMatser_Tenants_TenantId",
|
||||||
|
table: "PaymentModeMatser",
|
||||||
|
column: "TenantId",
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7494
Marco.Pms.DataAccess/Migrations/20251108065039_Made_StatusId_Nullable_In_StatusUpdateLog_Table.Designer.cs
generated
Normal file
7494
Marco.Pms.DataAccess/Migrations/20251108065039_Made_StatusId_Nullable_In_StatusUpdateLog_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Made_StatusId_Nullable_In_StatusUpdateLog_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "StatusId",
|
||||||
|
table: "StatusUpdateLogs",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)")
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "StatusId",
|
||||||
|
table: "StatusUpdateLogs",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)",
|
||||||
|
oldNullable: true)
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,50 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_NextStrikeDate_And_EndDate_In_RecurringPayment_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "NumberOfIteration",
|
||||||
|
table: "RecurringPayments");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "EndDate",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(2025, 11, 10, 10, 17, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "NextStrikeDate",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "EndDate",
|
||||||
|
table: "RecurringPayments");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "NextStrikeDate",
|
||||||
|
table: "RecurringPayments");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "NumberOfIteration",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,160 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_ServiceProject_And_ServiceProjectServiceMapping_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ServiceProjects",
|
||||||
|
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"),
|
||||||
|
ShortName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ClientId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Address = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
AssignedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ContactName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ContactPhone = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ContactEmail = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ServiceProjects", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjects_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjects_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjects_Organizations_ClientId",
|
||||||
|
column: x => x.ClientId,
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjects_StatusMasters_StatusId",
|
||||||
|
column: x => x.StatusId,
|
||||||
|
principalTable: "StatusMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjects_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ServiceProjectServiceMapping",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ServiceProjectServiceMapping", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectServiceMapping_ServiceMasters_ServiceId",
|
||||||
|
column: x => x.ServiceId,
|
||||||
|
principalTable: "ServiceMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectServiceMapping_ServiceProjects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "ServiceProjects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectServiceMapping_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjects_ClientId",
|
||||||
|
table: "ServiceProjects",
|
||||||
|
column: "ClientId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjects_CreatedById",
|
||||||
|
table: "ServiceProjects",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjects_StatusId",
|
||||||
|
table: "ServiceProjects",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjects_TenantId",
|
||||||
|
table: "ServiceProjects",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjects_UpdatedById",
|
||||||
|
table: "ServiceProjects",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectServiceMapping_ProjectId",
|
||||||
|
table: "ServiceProjectServiceMapping",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectServiceMapping_ServiceId",
|
||||||
|
table: "ServiceProjectServiceMapping",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectServiceMapping_TenantId",
|
||||||
|
table: "ServiceProjectServiceMapping",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ServiceProjectServiceMapping");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ServiceProjects");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7628
Marco.Pms.DataAccess/Migrations/20251111065550_Added_OrganiazationHierarchy_Related_Table.Designer.cs
generated
Normal file
7628
Marco.Pms.DataAccess/Migrations/20251111065550_Added_OrganiazationHierarchy_Related_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,137 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_OrganiazationHierarchy_Related_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "OrganizationHierarchies",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ReportToId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
IsPrimary = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
AssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
AssignedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_OrganizationHierarchies", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrganizationHierarchies_Employees_AssignedById",
|
||||||
|
column: x => x.AssignedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrganizationHierarchies_Employees_EmployeeId",
|
||||||
|
column: x => x.EmployeeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrganizationHierarchies_Employees_ReportToId",
|
||||||
|
column: x => x.ReportToId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrganizationHierarchies_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "OrgHierarchyLogs",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
OrganizationHierarchyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ReAssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
ReAssignedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_OrgHierarchyLogs", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrgHierarchyLogs_Employees_ReAssignedById",
|
||||||
|
column: x => x.ReAssignedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrgHierarchyLogs_OrganizationHierarchies_OrganizationHierarc~",
|
||||||
|
column: x => x.OrganizationHierarchyId,
|
||||||
|
principalTable: "OrganizationHierarchies",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrgHierarchyLogs_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrganizationHierarchies_AssignedById",
|
||||||
|
table: "OrganizationHierarchies",
|
||||||
|
column: "AssignedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrganizationHierarchies_EmployeeId",
|
||||||
|
table: "OrganizationHierarchies",
|
||||||
|
column: "EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrganizationHierarchies_ReportToId",
|
||||||
|
table: "OrganizationHierarchies",
|
||||||
|
column: "ReportToId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrganizationHierarchies_TenantId",
|
||||||
|
table: "OrganizationHierarchies",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrgHierarchyLogs_OrganizationHierarchyId",
|
||||||
|
table: "OrgHierarchyLogs",
|
||||||
|
column: "OrganizationHierarchyId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrgHierarchyLogs_ReAssignedById",
|
||||||
|
table: "OrgHierarchyLogs",
|
||||||
|
column: "ReAssignedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrgHierarchyLogs_TenantId",
|
||||||
|
table: "OrgHierarchyLogs",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "OrgHierarchyLogs");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "OrganizationHierarchies");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8341
Marco.Pms.DataAccess/Migrations/20251112134339_Added_JobTicket_Related_Tables.Designer.cs
generated
Normal file
8341
Marco.Pms.DataAccess/Migrations/20251112134339_Added_JobTicket_Related_Tables.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,538 @@
|
|||||||
|
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_JobTicket_Related_Tables : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobStatus",
|
||||||
|
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"),
|
||||||
|
DisplayName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobStatus", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobTags",
|
||||||
|
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"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobTags", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTags_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ServiceProjectTags",
|
||||||
|
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"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ServiceProjectTags", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectTags_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "TeamRoleMasters",
|
||||||
|
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")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_TeamRoleMasters", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobTickets",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
AssigneeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
DueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobTickets", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTickets_Employees_AssigneeId",
|
||||||
|
column: x => x.AssigneeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTickets_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTickets_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTickets_JobStatus_StatusId",
|
||||||
|
column: x => x.StatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTickets_ServiceProjects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "ServiceProjects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTickets_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ServiceProjectTagMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ServiceProjectTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ServiceProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ServiceProjectTagMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectTagMappings_ServiceProjectTags_ServiceProjectT~",
|
||||||
|
column: x => x.ServiceProjectTagId,
|
||||||
|
principalTable: "ServiceProjectTags",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectTagMappings_ServiceProjects_ServiceProjectId",
|
||||||
|
column: x => x.ServiceProjectId,
|
||||||
|
principalTable: "ServiceProjects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobStatusMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TeamRoleId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobStatusMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobStatusMappings_JobStatus_NextStatusId",
|
||||||
|
column: x => x.NextStatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobStatusMappings_JobStatus_StatusId",
|
||||||
|
column: x => x.StatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobStatusMappings_TeamRoleMasters_TeamRoleId",
|
||||||
|
column: x => x.TeamRoleId,
|
||||||
|
principalTable: "TeamRoleMasters",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobStatusMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobEmployeeMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
AssigneeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobEmployeeMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobEmployeeMappings_Employees_AssigneeId",
|
||||||
|
column: x => x.AssigneeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobEmployeeMappings_JobTickets_JobTicketId",
|
||||||
|
column: x => x.JobTicketId,
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobEmployeeMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobTagMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobTagMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTagMappings_JobTags_JobTagId",
|
||||||
|
column: x => x.JobTagId,
|
||||||
|
principalTable: "JobTags",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTagMappings_JobTickets_JobTicketId",
|
||||||
|
column: x => x.JobTicketId,
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobTagMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobUpdateLogs",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobUpdateLogs", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_JobStatus_NextStatusId",
|
||||||
|
column: x => x.NextStatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_JobStatus_StatusId",
|
||||||
|
column: x => x.StatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_JobTickets_JobTicketId",
|
||||||
|
column: x => x.JobTicketId,
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "JobStatus",
|
||||||
|
columns: new[] { "Id", "DisplayName", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"), "New", "New" },
|
||||||
|
{ new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), "Closed", "Closed" },
|
||||||
|
{ new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), "In Progress", "In Progress" },
|
||||||
|
{ new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), "On Hold", "On Hold" },
|
||||||
|
{ new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), "Resolved", "Resolved" },
|
||||||
|
{ new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), "Assigned", "Assigned" },
|
||||||
|
{ new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), "Done", "Done" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "TeamRoleMasters",
|
||||||
|
columns: new[] { "Id", "Description", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("03bf5853-5e0b-4eb8-9f37-33bd999a05b3"), "A Manager oversees and coordinates a team or department to achieve organizational goals through planning, decision-making, and leadership.", "Manager" },
|
||||||
|
{ new Guid("145d7222-408b-4733-8a17-f417e070b8b8"), "A Service Engineer installs, maintains, repairs, and troubleshoots equipment to ensure optimal operation and customer satisfaction.", "Service Engineer" },
|
||||||
|
{ new Guid("8cfbf16f-7d3b-4c29-af5b-18935f20aa7b"), "A Support role involves assisting users or customers by resolving technical or service-related issues, answering inquiries, and ensuring a positive experience with products or services.", "Support" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "JobStatusMappings",
|
||||||
|
columns: new[] { "Id", "NextStatusId", "StatusId", "TeamRoleId", "TenantId" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("024e1810-6a57-4a0d-8d2e-be88da79fcd4"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("16c83c23-09be-40fd-9d05-f44795d8dee8"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("2787c903-1b39-4e7d-a0f2-3bb2309bb341"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("42f24930-387e-4f51-9c2d-3e29ffaaf02a"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("5602d32c-290e-48a3-83dd-91af6d12ed46"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("7165ecee-10e3-4fc0-85d2-6d93d5b11776"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("76bc5551-8f80-469d-ba23-95d7e746c9a9"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("87891499-e45d-406b-bf22-722db1beedc9"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("8c4ecdae-7435-4475-8389-15bc453561a1"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("9c2918be-b3c1-46fb-a03b-14dd613e1021"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("a44b0a66-ee33-47e7-a01f-6b8d9b621543"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("ab974bdb-2d8f-4ddc-9b71-bd6d198bae75"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("ca8b4358-3122-4aaa-bcf8-0b66e4ab313a"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("cb0db140-87fa-4a6f-812d-2834bd0f53a9"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("dc986ec4-858e-4c98-b330-4a5c98c91f07"), new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobEmployeeMappings_AssigneeId",
|
||||||
|
table: "JobEmployeeMappings",
|
||||||
|
column: "AssigneeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobEmployeeMappings_JobTicketId",
|
||||||
|
table: "JobEmployeeMappings",
|
||||||
|
column: "JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobEmployeeMappings_TenantId",
|
||||||
|
table: "JobEmployeeMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobStatusMappings_NextStatusId",
|
||||||
|
table: "JobStatusMappings",
|
||||||
|
column: "NextStatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobStatusMappings_StatusId",
|
||||||
|
table: "JobStatusMappings",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobStatusMappings_TeamRoleId",
|
||||||
|
table: "JobStatusMappings",
|
||||||
|
column: "TeamRoleId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobStatusMappings_TenantId",
|
||||||
|
table: "JobStatusMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTagMappings_JobTagId",
|
||||||
|
table: "JobTagMappings",
|
||||||
|
column: "JobTagId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTagMappings_JobTicketId",
|
||||||
|
table: "JobTagMappings",
|
||||||
|
column: "JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTagMappings_TenantId",
|
||||||
|
table: "JobTagMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTags_TenantId",
|
||||||
|
table: "JobTags",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_AssigneeId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "AssigneeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_CreatedById",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_ProjectId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_StatusId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_TenantId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_UpdatedById",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_JobTicketId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_NextStatusId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "NextStatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_StatusId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_TenantId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_UpdatedById",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectTagMappings_ServiceProjectId",
|
||||||
|
table: "ServiceProjectTagMappings",
|
||||||
|
column: "ServiceProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectTagMappings_ServiceProjectTagId",
|
||||||
|
table: "ServiceProjectTagMappings",
|
||||||
|
column: "ServiceProjectTagId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectTags_TenantId",
|
||||||
|
table: "ServiceProjectTags",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobEmployeeMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobTagMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobUpdateLogs");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ServiceProjectTagMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "TeamRoleMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobTags");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobTickets");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ServiceProjectTags");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobStatus");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8461
Marco.Pms.DataAccess/Migrations/20251113051300_Removed_Assignee_From_JobTicket_Table.Designer.cs
generated
Normal file
8461
Marco.Pms.DataAccess/Migrations/20251113051300_Removed_Assignee_From_JobTicket_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,50 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_Assignee_From_JobTicket_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_JobTickets_Employees_AssigneeId",
|
||||||
|
table: "JobTickets");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_JobTickets_AssigneeId",
|
||||||
|
table: "JobTickets");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "AssigneeId",
|
||||||
|
table: "JobTickets");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "AssigneeId",
|
||||||
|
table: "JobTickets",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_AssigneeId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "AssigneeId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_JobTickets_Employees_AssigneeId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "AssigneeId",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,151 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_JobUpdateLog_Table_And_Added_JobComments_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobUpdateLogs");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobComments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobComments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobComments_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobComments_JobTickets_JobTicketId",
|
||||||
|
column: x => x.JobTicketId,
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobComments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobComments_CreatedById",
|
||||||
|
table: "JobComments",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobComments_JobTicketId",
|
||||||
|
table: "JobComments",
|
||||||
|
column: "JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobComments_TenantId",
|
||||||
|
table: "JobComments",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobComments");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobUpdateLogs",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobUpdateLogs", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_JobStatus_NextStatusId",
|
||||||
|
column: x => x.NextStatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_JobStatus_StatusId",
|
||||||
|
column: x => x.StatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_JobTickets_JobTicketId",
|
||||||
|
column: x => x.JobTicketId,
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobUpdateLogs_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_JobTicketId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_NextStatusId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "NextStatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_StatusId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_TenantId",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobUpdateLogs_UpdatedById",
|
||||||
|
table: "JobUpdateLogs",
|
||||||
|
column: "UpdatedById");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8615
Marco.Pms.DataAccess/Migrations/20251113113335_Added_JobAttcahments_Table.Designer.cs
generated
Normal file
8615
Marco.Pms.DataAccess/Migrations/20251113113335_Added_JobAttcahments_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,222 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_JobAttcahments_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "JobComments",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "UpdatedAt",
|
||||||
|
table: "JobComments",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "UpdatedById",
|
||||||
|
table: "JobComments",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobAttachments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobCommentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobAttachments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttachments_Documents_DocumentId",
|
||||||
|
column: x => x.DocumentId,
|
||||||
|
principalTable: "Documents",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttachments_JobComments_JobCommentId",
|
||||||
|
column: x => x.JobCommentId,
|
||||||
|
principalTable: "JobComments",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttachments_JobStatus_StatusId",
|
||||||
|
column: x => x.StatusId,
|
||||||
|
principalTable: "JobStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttachments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ServiceProjectAllocations",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TeamRoleId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
AssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
AssignedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ReAssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
ReAssignedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ServiceProjectAllocations", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectAllocations_Employees_AssignedById",
|
||||||
|
column: x => x.AssignedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectAllocations_Employees_EmployeeId",
|
||||||
|
column: x => x.EmployeeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectAllocations_Employees_ReAssignedById",
|
||||||
|
column: x => x.ReAssignedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectAllocations_ServiceProjects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "ServiceProjects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectAllocations_TeamRoleMasters_TeamRoleId",
|
||||||
|
column: x => x.TeamRoleId,
|
||||||
|
principalTable: "TeamRoleMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceProjectAllocations_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobComments_UpdatedById",
|
||||||
|
table: "JobComments",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttachments_DocumentId",
|
||||||
|
table: "JobAttachments",
|
||||||
|
column: "DocumentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttachments_JobCommentId",
|
||||||
|
table: "JobAttachments",
|
||||||
|
column: "JobCommentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttachments_StatusId",
|
||||||
|
table: "JobAttachments",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttachments_TenantId",
|
||||||
|
table: "JobAttachments",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectAllocations_AssignedById",
|
||||||
|
table: "ServiceProjectAllocations",
|
||||||
|
column: "AssignedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectAllocations_EmployeeId",
|
||||||
|
table: "ServiceProjectAllocations",
|
||||||
|
column: "EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectAllocations_ProjectId",
|
||||||
|
table: "ServiceProjectAllocations",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectAllocations_ReAssignedById",
|
||||||
|
table: "ServiceProjectAllocations",
|
||||||
|
column: "ReAssignedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectAllocations_TeamRoleId",
|
||||||
|
table: "ServiceProjectAllocations",
|
||||||
|
column: "TeamRoleId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceProjectAllocations_TenantId",
|
||||||
|
table: "ServiceProjectAllocations",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_JobComments_Employees_UpdatedById",
|
||||||
|
table: "JobComments",
|
||||||
|
column: "UpdatedById",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_JobComments_Employees_UpdatedById",
|
||||||
|
table: "JobComments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobAttachments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ServiceProjectAllocations");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_JobComments_UpdatedById",
|
||||||
|
table: "JobComments");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "JobComments");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UpdatedAt",
|
||||||
|
table: "JobComments");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UpdatedById",
|
||||||
|
table: "JobComments");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8625
Marco.Pms.DataAccess/Migrations/20251113114720_Added_Level_In_JobStatus_Table.Designer.cs
generated
Normal file
8625
Marco.Pms.DataAccess/Migrations/20251113114720_Added_Level_In_JobStatus_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,85 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Level_In_JobStatus_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "Level",
|
||||||
|
table: "JobStatus",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 1);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"),
|
||||||
|
column: "Level",
|
||||||
|
value: 1);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"),
|
||||||
|
column: "Level",
|
||||||
|
value: 6);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"),
|
||||||
|
column: "Level",
|
||||||
|
value: 3);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"),
|
||||||
|
column: "Level",
|
||||||
|
value: 7);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||||
|
columns: new[] { "DisplayName", "Level", "Name" },
|
||||||
|
values: new object[] { "Review", 4, "Review" });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"),
|
||||||
|
column: "Level",
|
||||||
|
value: 2);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"),
|
||||||
|
column: "Level",
|
||||||
|
value: 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Level",
|
||||||
|
table: "JobStatus");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||||
|
columns: new[] { "DisplayName", "Name" },
|
||||||
|
values: new object[] { "Resolved", "Resolved" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8628
Marco.Pms.DataAccess/Migrations/20251114120630_Added_GoogleMapUrl_In_ServiceProject_Table.Designer.cs
generated
Normal file
8628
Marco.Pms.DataAccess/Migrations/20251114120630_Added_GoogleMapUrl_In_ServiceProject_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_GoogleMapUrl_In_ServiceProject_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "GoogleMapUrl",
|
||||||
|
table: "ServiceProjects",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GoogleMapUrl",
|
||||||
|
table: "ServiceProjects");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8631
Marco.Pms.DataAccess/Migrations/20251115101806_Added_GSTNumber_In_Organization_Table.Designer.cs
generated
Normal file
8631
Marco.Pms.DataAccess/Migrations/20251115101806_Added_GSTNumber_In_Organization_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,76 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_GSTNumber_In_Organization_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<long>(
|
||||||
|
name: "SPRID",
|
||||||
|
table: "TenantOrgMappings",
|
||||||
|
type: "bigint",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<long>(
|
||||||
|
name: "SPRID",
|
||||||
|
table: "Organizations",
|
||||||
|
type: "bigint",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "GSTNumber",
|
||||||
|
table: "Organizations",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Organizations",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
columns: new[] { "GSTNumber", "SPRID" },
|
||||||
|
values: new object[] { null, 5400L });
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GSTNumber",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "SPRID",
|
||||||
|
table: "TenantOrgMappings",
|
||||||
|
type: "double",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(long),
|
||||||
|
oldType: "bigint");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "SPRID",
|
||||||
|
table: "Organizations",
|
||||||
|
type: "double",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(long),
|
||||||
|
oldType: "bigint");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Organizations",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
column: "SPRID",
|
||||||
|
value: 5400.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8794
Marco.Pms.DataAccess/Migrations/20251117045622_Added_JobAttendance_Related_Table.Designer.cs
generated
Normal file
8794
Marco.Pms.DataAccess/Migrations/20251117045622_Added_JobAttendance_Related_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,158 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_JobAttendance_Related_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobAttendance",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTcketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Action = table.Column<int>(type: "int", nullable: false),
|
||||||
|
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TaggedInTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
TaggedOutTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
TaggedInAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
TaggedOutAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobAttendance", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendance_Employees_EmployeeId",
|
||||||
|
column: x => x.EmployeeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendance_JobTickets_JobTcketId",
|
||||||
|
column: x => x.JobTcketId,
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendance_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "JobAttendanceLogs",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobAttendanceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
JobTcketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
DocumentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
Latitude = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Longitude = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Action = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Comment = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
MarkedTIme = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
MarkedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_JobAttendanceLogs", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_Documents_DocumentId",
|
||||||
|
column: x => x.DocumentId,
|
||||||
|
principalTable: "Documents",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_Employees_EmployeeId",
|
||||||
|
column: x => x.EmployeeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_JobAttendance_JobAttendanceId",
|
||||||
|
column: x => x.JobAttendanceId,
|
||||||
|
principalTable: "JobAttendance",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_JobTickets_JobTcketId",
|
||||||
|
column: x => x.JobTcketId,
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendance_EmployeeId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
column: "EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendance_JobTcketId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
column: "JobTcketId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendance_TenantId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendanceLogs_DocumentId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
column: "DocumentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendanceLogs_EmployeeId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
column: "EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendanceLogs_JobAttendanceId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
column: "JobAttendanceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendanceLogs_JobTcketId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
column: "JobTcketId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobAttendanceLogs_TenantId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobAttendanceLogs");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "JobAttendance");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8801
Marco.Pms.DataAccess/Migrations/20251117074609_Added_UID_In_JobTicket_Table.Designer.cs
generated
Normal file
8801
Marco.Pms.DataAccess/Migrations/20251117074609_Added_UID_In_JobTicket_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,40 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_UID_In_JobTicket_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "UIDPostfix",
|
||||||
|
table: "JobTickets",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "UIDPrefix",
|
||||||
|
table: "JobTickets",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UIDPostfix",
|
||||||
|
table: "JobTickets");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UIDPrefix",
|
||||||
|
table: "JobTickets");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8802
Marco.Pms.DataAccess/Migrations/20251117135930_Added_BilledTo_In_Invoice_Table.Designer.cs
generated
Normal file
8802
Marco.Pms.DataAccess/Migrations/20251117135930_Added_BilledTo_In_Invoice_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,71 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_BilledTo_In_Invoice_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Invoices_Projects_ProjectId",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Invoices_ProjectId",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "BilledToId",
|
||||||
|
table: "Invoices",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Invoices_BilledToId",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "BilledToId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Invoices_Organizations_BilledToId",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "BilledToId",
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Invoices_Organizations_BilledToId",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Invoices_BilledToId",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "BilledToId",
|
||||||
|
table: "Invoices");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Invoices_ProjectId",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Invoices_Projects_ProjectId",
|
||||||
|
table: "Invoices",
|
||||||
|
column: "ProjectId",
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8895
Marco.Pms.DataAccess/Migrations/20251119065548_Added_ProjectBranches_Table.Designer.cs
generated
Normal file
8895
Marco.Pms.DataAccess/Migrations/20251119065548_Added_ProjectBranches_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,122 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_ProjectBranches_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
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.CreateTable(
|
||||||
|
name: "ProjectBranches",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
BranchName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ContactInformation = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Address = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
BranchType = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
GoogleMapUrl = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ProjectBranches", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectBranches_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectBranches_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectBranches_ServiceProjects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "ServiceProjects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectBranches_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectBranches_CreatedById",
|
||||||
|
table: "ProjectBranches",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectBranches_ProjectId",
|
||||||
|
table: "ProjectBranches",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectBranches_TenantId",
|
||||||
|
table: "ProjectBranches",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectBranches_UpdatedById",
|
||||||
|
table: "ProjectBranches",
|
||||||
|
column: "UpdatedById");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ProjectBranches");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ContactPerson",
|
||||||
|
table: "Projects",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,78 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_ProjectBranch_As_ForignKey_In_JobTickets_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ProjectBranchId",
|
||||||
|
table: "JobTickets",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||||
|
columns: new[] { "DisplayName", "Name" },
|
||||||
|
values: new object[] { "Work Done", "Work Done" });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"),
|
||||||
|
columns: new[] { "DisplayName", "Name" },
|
||||||
|
values: new object[] { "Review Done", "Review Done" });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_JobTickets_ProjectBranchId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "ProjectBranchId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_JobTickets_ProjectBranches_ProjectBranchId",
|
||||||
|
table: "JobTickets",
|
||||||
|
column: "ProjectBranchId",
|
||||||
|
principalTable: "ProjectBranches",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_JobTickets_ProjectBranches_ProjectBranchId",
|
||||||
|
table: "JobTickets");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_JobTickets_ProjectBranchId",
|
||||||
|
table: "JobTickets");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ProjectBranchId",
|
||||||
|
table: "JobTickets");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||||
|
columns: new[] { "DisplayName", "Name" },
|
||||||
|
values: new object[] { "Review", "Review" });
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "JobStatus",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"),
|
||||||
|
columns: new[] { "DisplayName", "Name" },
|
||||||
|
values: new object[] { "Done", "Done" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8909
Marco.Pms.DataAccess/Migrations/20251120051203_Added_IsArchive_In_JobTicket_Table.Designer.cs
generated
Normal file
8909
Marco.Pms.DataAccess/Migrations/20251120051203_Added_IsArchive_In_JobTicket_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_IsArchive_In_JobTicket_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsArchive",
|
||||||
|
table: "JobTickets",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsArchive",
|
||||||
|
table: "JobTickets");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8899
Marco.Pms.DataAccess/Migrations/20251120111120_Removed_Project_ForignKey_From_Expenses_Table.Designer.cs
generated
Normal file
8899
Marco.Pms.DataAccess/Migrations/20251120111120_Removed_Project_ForignKey_From_Expenses_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_Project_ForignKey_From_Expenses_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Expenses_Projects_ProjectId",
|
||||||
|
table: "Expenses");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Expenses_ProjectId",
|
||||||
|
table: "Expenses");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Expenses_ProjectId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Expenses_Projects_ProjectId",
|
||||||
|
table: "Expenses",
|
||||||
|
column: "ProjectId",
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,38 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_Project_ForignKey_From_PaymentRequest_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PaymentRequests_Projects_ProjectId",
|
||||||
|
table: "PaymentRequests");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_PaymentRequests_ProjectId",
|
||||||
|
table: "PaymentRequests");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PaymentRequests_ProjectId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PaymentRequests_Projects_ProjectId",
|
||||||
|
table: "PaymentRequests",
|
||||||
|
column: "ProjectId",
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,38 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_Project_ForignKey_From_RecurringPayment_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_RecurringPayments_Projects_ProjectId",
|
||||||
|
table: "RecurringPayments");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_RecurringPayments_ProjectId",
|
||||||
|
table: "RecurringPayments");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_RecurringPayments_ProjectId",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RecurringPayments_Projects_ProjectId",
|
||||||
|
table: "RecurringPayments",
|
||||||
|
column: "ProjectId",
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_Project_ForignKey_From_ProjectContactMapping_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ContactProjectMappings_Projects_ProjectId",
|
||||||
|
table: "ContactProjectMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ContactProjectMappings_ProjectId",
|
||||||
|
table: "ContactProjectMappings");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ContactProjectMappings_ProjectId",
|
||||||
|
table: "ContactProjectMappings",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ContactProjectMappings_Projects_ProjectId",
|
||||||
|
table: "ContactProjectMappings",
|
||||||
|
column: "ProjectId",
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8873
Marco.Pms.DataAccess/Migrations/20251125072208_Corrected_JobTicketId_Spelling_In_JobAttendance.Designer.cs
generated
Normal file
8873
Marco.Pms.DataAccess/Migrations/20251125072208_Corrected_JobTicketId_Spelling_In_JobAttendance.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,106 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Corrected_JobTicketId_Spelling_In_JobAttendance : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_JobAttendance_JobTickets_JobTcketId",
|
||||||
|
table: "JobAttendance");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_JobTickets_JobTcketId",
|
||||||
|
table: "JobAttendanceLogs");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "JobTcketId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
newName: "JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_JobAttendanceLogs_JobTcketId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
newName: "IX_JobAttendanceLogs_JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "JobTcketId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
newName: "JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_JobAttendance_JobTcketId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
newName: "IX_JobAttendance_JobTicketId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_JobAttendance_JobTickets_JobTicketId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
column: "JobTicketId",
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_JobTickets_JobTicketId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
column: "JobTicketId",
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_JobAttendance_JobTickets_JobTicketId",
|
||||||
|
table: "JobAttendance");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_JobTickets_JobTicketId",
|
||||||
|
table: "JobAttendanceLogs");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "JobTicketId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
newName: "JobTcketId");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_JobAttendanceLogs_JobTicketId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
newName: "IX_JobAttendanceLogs_JobTcketId");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "JobTicketId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
newName: "JobTcketId");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_JobAttendance_JobTicketId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
newName: "IX_JobAttendance_JobTcketId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_JobAttendance_JobTickets_JobTcketId",
|
||||||
|
table: "JobAttendance",
|
||||||
|
column: "JobTcketId",
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_JobAttendanceLogs_JobTickets_JobTcketId",
|
||||||
|
table: "JobAttendanceLogs",
|
||||||
|
column: "JobTcketId",
|
||||||
|
principalTable: "JobTickets",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9385
Marco.Pms.DataAccess/Migrations/20251125130508_Added_PurchaseInvoice_Related_Tables.Designer.cs
generated
Normal file
9385
Marco.Pms.DataAccess/Migrations/20251125130508_Added_PurchaseInvoice_Related_Tables.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,423 @@
|
|||||||
|
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_PurchaseInvoice_Related_Tables : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AdvancePaymentTransactions_Projects_ProjectId",
|
||||||
|
table: "AdvancePaymentTransactions");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_AdvancePaymentTransactions_ProjectId",
|
||||||
|
table: "AdvancePaymentTransactions");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "InvoiceAttachmentTypes",
|
||||||
|
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")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_InvoiceAttachmentTypes", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PurchaseInvoiceDetails",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UIDPrefix = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UIDPostfix = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
OrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
BillingAddress = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ShippingAddress = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
PurchaseOrderNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
PurchaseOrderDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
SupplierId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ProformaInvoiceNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ProformaInvoiceDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
ProformaInvoiceAmount = table.Column<double>(type: "double", nullable: true),
|
||||||
|
InvoiceNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
InvoiceDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
EWayBillNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
EWayBillDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
InvoiceReferenceNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
AcknowledgmentNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
AcknowledgmentDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
BaseAmount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
TaxAmount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
TransportCharges = table.Column<double>(type: "double", nullable: true),
|
||||||
|
TotalAmount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
PaymentDueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PurchaseInvoiceDetails", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceDetails_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceDetails_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceDetails_Organizations_OrganizationId",
|
||||||
|
column: x => x.OrganizationId,
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceDetails_Organizations_SupplierId",
|
||||||
|
column: x => x.SupplierId,
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceDetails_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PurchaseInvoiceStatus",
|
||||||
|
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"),
|
||||||
|
DisplayName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Color = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PurchaseInvoiceStatus", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PurchaseInvoiceAttachments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PurchaseInvoiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
UploadedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
UploadedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PurchaseInvoiceAttachments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceAttachments_Documents_DocumentId",
|
||||||
|
column: x => x.DocumentId,
|
||||||
|
principalTable: "Documents",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceAttachments_Employees_UploadedById",
|
||||||
|
column: x => x.UploadedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceAttachments_PurchaseInvoiceDetails_PurchaseIn~",
|
||||||
|
column: x => x.PurchaseInvoiceId,
|
||||||
|
principalTable: "PurchaseInvoiceDetails",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceAttachments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PurchaseInvoicePayments",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
InvoiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PaymentReceivedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
TransactionId = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Amount = table.Column<double>(type: "double", nullable: false),
|
||||||
|
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
PaymentAdjustmentHeadId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PurchaseInvoicePayments", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoicePayments_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoicePayments_PaymentAdjustmentHeads_PaymentAdjust~",
|
||||||
|
column: x => x.PaymentAdjustmentHeadId,
|
||||||
|
principalTable: "PaymentAdjustmentHeads",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoicePayments_PurchaseInvoiceDetails_InvoiceId",
|
||||||
|
column: x => x.InvoiceId,
|
||||||
|
principalTable: "PurchaseInvoiceDetails",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PurchaseInvoicePayments_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "DeliveryChallanDetails",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
DeliveryChallanNumber = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
DeliveryChallanDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
PurchaseInvoiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
AttachmentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_DeliveryChallanDetails", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_DeliveryChallanDetails_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_DeliveryChallanDetails_PurchaseInvoiceAttachments_Attachment~",
|
||||||
|
column: x => x.AttachmentId,
|
||||||
|
principalTable: "PurchaseInvoiceAttachments",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_DeliveryChallanDetails_PurchaseInvoiceDetails_PurchaseInvoic~",
|
||||||
|
column: x => x.PurchaseInvoiceId,
|
||||||
|
principalTable: "PurchaseInvoiceDetails",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_DeliveryChallanDetails_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "InvoiceAttachmentTypes",
|
||||||
|
columns: new[] { "Id", "Description", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("150ddd9b-4b8d-44ac-bae0-2e553c0f069a"), "An E-Way Bill (Electronic Way Bill) is a mandatory digital document generated on the GST portal to evidence and track the movement of goods valued over ₹50,000.", "E Way Bill" },
|
||||||
|
{ new Guid("1fa20cff-b0ee-468e-9ea6-72d5aa144a3f"), "An E-Invoice (Electronic Invoice) is a system where B2B invoices are electronically authenticated by the GST Network (GSTN) to generate a unique Invoice Reference Number (IRN) and QR code.", "E-Invoice" },
|
||||||
|
{ new Guid("3ca08288-0a74-4850-9948-0783aa975b84"), "A Tax Invoice is a mandatory legal document issued by a GST-registered supplier for taxable goods or services, enabling the buyer to claim Input Tax Credit (ITC).", "Tax Invoice" },
|
||||||
|
{ new Guid("ca294108-a586-4207-88c8-163b24305ddc"), "A delivery challan is a formal document accompanying a shipment of goods that lists the items included and serves as proof of delivery upon receipt.", "Delivery Challan" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "PurchaseInvoiceStatus",
|
||||||
|
columns: new[] { "Id", "Color", "Description", "DisplayName", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("16b10201-1651-465c-b2fd-236bdef86f95"), "#696cff", "Review Pending status in a Purchase Invoice indicates that the invoice has been submitted for validation but requires approval from an authorized person (like a manager or auditor) before it can be posted to the ledger or paid.", "Submit for Review", "Review Pending" },
|
||||||
|
{ new Guid("58de9cef-811f-46a4-814d-0069b64d98a9"), "#ff3e1d", "Rejected by Approver status in a Purchase Invoice indicates that the document successfully passed initial verification but was ultimately denied by the final authorizing signatory (such as a Manager or CFO) due to budget or validity concerns.", "Reject", "Rejected by Approver" },
|
||||||
|
{ new Guid("5b393371-dbcf-4a28-88a8-f406fa34e0d0"), "#71dd37", "Approved status indicates that the invoice has successfully cleared all necessary verification and authorization levels and is formally accepted by the company as a valid debt.", "Mark as Approved", "Approved" },
|
||||||
|
{ new Guid("60027a54-3c23-4619-9f4e-6c20549b50a6"), "#03c3ec", "Approval Pending status in a Purchase Invoice indicates that the document has passed initial verification (matching and coding) and is now awaiting final financial authorization from a designated budget holder or signatory.", "Mark as Reviewed", "Approval Pending" },
|
||||||
|
{ new Guid("8a5ef25e-3c9e-45de-add9-6b1c1df54381"), "#8592a3", "Draft Status in a Purchase Invoice indicates a preliminary, unfinalized document that is saved for review but has not yet been posted to the general ledger or affected your accounts/inventory.", "Draft", "Draft" },
|
||||||
|
{ new Guid("a05f5f4a-bd9d-4028-af42-48ee0caa3e40"), "#ff3e1d", "Rejected by Reviewer status indicates that the invoice failed the approval process due to errors, discrepancies, or policy violations and has been returned to the initiator or vendor for correction.", "Reject", "Rejected by Reviewer" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_DeliveryChallanDetails_AttachmentId",
|
||||||
|
table: "DeliveryChallanDetails",
|
||||||
|
column: "AttachmentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_DeliveryChallanDetails_CreatedById",
|
||||||
|
table: "DeliveryChallanDetails",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_DeliveryChallanDetails_PurchaseInvoiceId",
|
||||||
|
table: "DeliveryChallanDetails",
|
||||||
|
column: "PurchaseInvoiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_DeliveryChallanDetails_TenantId",
|
||||||
|
table: "DeliveryChallanDetails",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceAttachments_DocumentId",
|
||||||
|
table: "PurchaseInvoiceAttachments",
|
||||||
|
column: "DocumentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceAttachments_PurchaseInvoiceId",
|
||||||
|
table: "PurchaseInvoiceAttachments",
|
||||||
|
column: "PurchaseInvoiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceAttachments_TenantId",
|
||||||
|
table: "PurchaseInvoiceAttachments",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceAttachments_UploadedById",
|
||||||
|
table: "PurchaseInvoiceAttachments",
|
||||||
|
column: "UploadedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceDetails_CreatedById",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceDetails_OrganizationId",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
column: "OrganizationId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceDetails_SupplierId",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
column: "SupplierId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceDetails_TenantId",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceDetails_UpdatedById",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoicePayments_CreatedById",
|
||||||
|
table: "PurchaseInvoicePayments",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoicePayments_InvoiceId",
|
||||||
|
table: "PurchaseInvoicePayments",
|
||||||
|
column: "InvoiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoicePayments_PaymentAdjustmentHeadId",
|
||||||
|
table: "PurchaseInvoicePayments",
|
||||||
|
column: "PaymentAdjustmentHeadId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoicePayments_TenantId",
|
||||||
|
table: "PurchaseInvoicePayments",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "DeliveryChallanDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "InvoiceAttachmentTypes");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PurchaseInvoicePayments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PurchaseInvoiceStatus");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PurchaseInvoiceAttachments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PurchaseInvoiceDetails");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AdvancePaymentTransactions_ProjectId",
|
||||||
|
table: "AdvancePaymentTransactions",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AdvancePaymentTransactions_Projects_ProjectId",
|
||||||
|
table: "AdvancePaymentTransactions",
|
||||||
|
column: "ProjectId",
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9411
Marco.Pms.DataAccess/Migrations/20251125143000_Added_Status_In_PurchaseInvoiceDetails_Table.Designer.cs
generated
Normal file
9411
Marco.Pms.DataAccess/Migrations/20251125143000_Added_Status_In_PurchaseInvoiceDetails_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,84 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Status_In_PurchaseInvoiceDetails_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "StatusId",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("8a5ef25e-3c9e-45de-add9-6b1c1df54381"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "InvoiceAttachmentTypeId",
|
||||||
|
table: "PurchaseInvoiceAttachments",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("3ca08288-0a74-4850-9948-0783aa975b84"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceDetails_StatusId",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
column: "StatusId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PurchaseInvoiceAttachments_InvoiceAttachmentTypeId",
|
||||||
|
table: "PurchaseInvoiceAttachments",
|
||||||
|
column: "InvoiceAttachmentTypeId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceAttachments_InvoiceAttachmentTypes_InvoiceAtt~",
|
||||||
|
table: "PurchaseInvoiceAttachments",
|
||||||
|
column: "InvoiceAttachmentTypeId",
|
||||||
|
principalTable: "InvoiceAttachmentTypes",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceDetails_PurchaseInvoiceStatus_StatusId",
|
||||||
|
table: "PurchaseInvoiceDetails",
|
||||||
|
column: "StatusId",
|
||||||
|
principalTable: "PurchaseInvoiceStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceAttachments_InvoiceAttachmentTypes_InvoiceAtt~",
|
||||||
|
table: "PurchaseInvoiceAttachments");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PurchaseInvoiceDetails_PurchaseInvoiceStatus_StatusId",
|
||||||
|
table: "PurchaseInvoiceDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_PurchaseInvoiceDetails_StatusId",
|
||||||
|
table: "PurchaseInvoiceDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_PurchaseInvoiceAttachments_InvoiceAttachmentTypeId",
|
||||||
|
table: "PurchaseInvoiceAttachments");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "StatusId",
|
||||||
|
table: "PurchaseInvoiceDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "InvoiceAttachmentTypeId",
|
||||||
|
table: "PurchaseInvoiceAttachments");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9466
Marco.Pms.DataAccess/Migrations/20251201060004_Added_Purchase_Invoice_Permissions.Designer.cs
generated
Normal file
9466
Marco.Pms.DataAccess/Migrations/20251201060004_Added_Purchase_Invoice_Permissions.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,78 @@
|
|||||||
|
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_Purchase_Invoice_Permissions : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Modules",
|
||||||
|
columns: new[] { "Id", "Description", "Key", "Name" },
|
||||||
|
values: new object[] { new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17"), "Inventory Module", "504ec132-e6a9-422f-8f85-050602cfce05", "Inventory" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Features",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
||||||
|
values: new object[] { new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), "Managing all Purchase invoice related rights", true, new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17"), "Purchase Invoice Management" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("68ff925d-8ebf-4034-a137-8d3317c56ca1"), "Allows full control to create, edit, and process purchase invoices.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "Manage Purchase Invoice" },
|
||||||
|
{ new Guid("91e09825-512a-465e-82ad-fa355b305585"), "Allows the user to view only the purchase invoices they created.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "View Self Purchase Invoice" },
|
||||||
|
{ new Guid("a4b77638-bf31-42bb-afd4-d5bbd15ccadc"), "Allows the user to mark purchase invoices as inactive or void.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "Delete Purchase Invoice" },
|
||||||
|
{ new Guid("b24eba39-4a92-4f7a-b33b-b5308fbc48b9"), "Allows the user to create delivery challans for purchase invoices.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "Add Delivery Challan" },
|
||||||
|
{ new Guid("d6ae78d3-a941-4cc4-8d0a-d40479be4211"), "Allows the user to view all purchase invoices across the entire organization.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "View All Purchase Invoice" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("68ff925d-8ebf-4034-a137-8d3317c56ca1"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("91e09825-512a-465e-82ad-fa355b305585"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a4b77638-bf31-42bb-afd4-d5bbd15ccadc"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b24eba39-4a92-4f7a-b33b-b5308fbc48b9"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("d6ae78d3-a941-4cc4-8d0a-d40479be4211"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Features",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Modules",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9484
Marco.Pms.DataAccess/Migrations/20251204085823_Added_Invoice_Attachment_Type_Table.Designer.cs
generated
Normal file
9484
Marco.Pms.DataAccess/Migrations/20251204085823_Added_Invoice_Attachment_Type_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,46 @@
|
|||||||
|
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_Invoice_Attachment_Type_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "InvoiceAttachmentTypes",
|
||||||
|
columns: new[] { "Id", "Description", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("060c79a4-81c7-40a4-8cc3-56362ac9fad6"), "Sales Order", "Sales Order" },
|
||||||
|
{ new Guid("12773c2c-64e7-478c-af17-8471f943a5ed"), "Other", "Other" },
|
||||||
|
{ new Guid("31cd7533-3ffc-4e84-a0b4-db3b94d016b2"), "Proforma Invoice", "Proforma Invoice" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "InvoiceAttachmentTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("060c79a4-81c7-40a4-8cc3-56362ac9fad6"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "InvoiceAttachmentTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("12773c2c-64e7-478c-af17-8471f943a5ed"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "InvoiceAttachmentTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("31cd7533-3ffc-4e84-a0b4-db3b94d016b2"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9453
Marco.Pms.DataAccess/Migrations/20251206102239_Removed_MaiLogs_Table.Designer.cs
generated
Normal file
9453
Marco.Pms.DataAccess/Migrations/20251206102239_Removed_MaiLogs_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_MaiLogs_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "MailLogs");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "MailLogs",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Body = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
EmailId = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
TimeStamp = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_MailLogs", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -212,6 +212,48 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
public async Task<bool> ClearAllEmployeesFromCacheByOnlyEmployeeId(Guid employeeId)
|
||||||
|
{
|
||||||
|
var employeeIdString = employeeId.ToString();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeIdString);
|
||||||
|
|
||||||
|
var result = await _collection.DeleteManyAsync(filter);
|
||||||
|
|
||||||
|
if (result.DeletedCount == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error occured while deleting employee profile");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public async Task<bool> ClearAllEmployeesFromCacheByTenantId(Guid tenantId)
|
||||||
|
{
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
|
var result = await _collection.DeleteManyAsync(filter);
|
||||||
|
|
||||||
|
if (result.DeletedCount == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error occured while deleting employee profile");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
public async Task<bool> ClearAllEmployeesFromCacheByEmployeeIds(List<string> employeeIds, Guid tenantId)
|
public async Task<bool> ClearAllEmployeesFromCacheByEmployeeIds(List<string> employeeIds, Guid tenantId)
|
||||||
{
|
{
|
||||||
var tenantIdString = tenantId.ToString();
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|||||||
@ -8,6 +8,7 @@ using Marco.Pms.Model.Projects;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using MongoDB.Bson;
|
using MongoDB.Bson;
|
||||||
|
using MongoDB.Bson.Serialization;
|
||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
|
|
||||||
namespace Marco.Pms.Helpers
|
namespace Marco.Pms.Helpers
|
||||||
@ -16,6 +17,11 @@ namespace Marco.Pms.Helpers
|
|||||||
{
|
{
|
||||||
private readonly IMongoCollection<ProjectMongoDB> _projectCollection;
|
private readonly IMongoCollection<ProjectMongoDB> _projectCollection;
|
||||||
private readonly IMongoCollection<WorkItemMongoDB> _taskCollection;
|
private readonly IMongoCollection<WorkItemMongoDB> _taskCollection;
|
||||||
|
|
||||||
|
private readonly string ActiveProjectStatusId = "b74da4c2-d07e-46f2-9919-e75e49b12731";
|
||||||
|
private readonly string InProgressProjectStatusId = "cdad86aa-8a56-4ff4-b633-9c629057dfef";
|
||||||
|
private readonly string OnHoldProjectStatusId = "603e994b-a27f-4e5d-a251-f3d69b0498ba";
|
||||||
|
private readonly string InActiveProjectStatusId = "ef1c356e-0fe0-42df-a5d3-8daee355492d";
|
||||||
public ProjectCache(ApplicationDbContext context, IConfiguration configuration)
|
public ProjectCache(ApplicationDbContext context, IConfiguration configuration)
|
||||||
{
|
{
|
||||||
var connectionString = configuration["MongoDB:ConnectionString"];
|
var connectionString = configuration["MongoDB:ConnectionString"];
|
||||||
@ -135,16 +141,68 @@ namespace Marco.Pms.Helpers
|
|||||||
|
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public async Task<List<ProjectMongoDB>> GetProjectDetailsListFromCache(List<Guid> projectIds)
|
||||||
|
//{
|
||||||
|
// List<string> stringProjectIds = projectIds.Select(p => p.ToString()).ToList();
|
||||||
|
// var filter = Builders<ProjectMongoDB>.Filter.In(p => p.Id, stringProjectIds);
|
||||||
|
// var projection = Builders<ProjectMongoDB>.Projection.Exclude(p => p.Buildings);
|
||||||
|
// var projects = await _projectCollection
|
||||||
|
// .Find(filter)
|
||||||
|
// .Project<ProjectMongoDB>(projection)
|
||||||
|
// .ToListAsync();
|
||||||
|
// return projects;
|
||||||
|
//}
|
||||||
|
|
||||||
public async Task<List<ProjectMongoDB>> GetProjectDetailsListFromCache(List<Guid> projectIds)
|
public async Task<List<ProjectMongoDB>> GetProjectDetailsListFromCache(List<Guid> projectIds)
|
||||||
{
|
{
|
||||||
List<string> stringProjectIds = projectIds.Select(p => p.ToString()).ToList();
|
var stringProjectIds = projectIds.Select(p => p.ToString()).ToList();
|
||||||
|
|
||||||
var filter = Builders<ProjectMongoDB>.Filter.In(p => p.Id, stringProjectIds);
|
var filter = Builders<ProjectMongoDB>.Filter.In(p => p.Id, stringProjectIds);
|
||||||
var projection = Builders<ProjectMongoDB>.Projection.Exclude(p => p.Buildings);
|
|
||||||
var projects = await _projectCollection
|
var projection = Builders<ProjectMongoDB>.Projection
|
||||||
.Find(filter)
|
.Exclude(p => p.Buildings);
|
||||||
|
|
||||||
|
// base aggregation
|
||||||
|
var aggregate = _projectCollection.Aggregate()
|
||||||
|
.Match(filter)
|
||||||
.Project<ProjectMongoDB>(projection)
|
.Project<ProjectMongoDB>(projection)
|
||||||
.ToListAsync();
|
.AppendStage<BsonDocument>(
|
||||||
return projects;
|
@"{
|
||||||
|
$addFields: {
|
||||||
|
statusPriority: {
|
||||||
|
$cond: [
|
||||||
|
{ $eq: [""$ProjectStatus.Id"", """ + ActiveProjectStatusId + @"""] }, 0,
|
||||||
|
{
|
||||||
|
$cond: [
|
||||||
|
{ $eq: [""$ProjectStatus.Id"", """ + InProgressProjectStatusId + @"""] }, 1,
|
||||||
|
{
|
||||||
|
$cond: [
|
||||||
|
{ $eq: [""$ProjectStatus.Id"", """ + OnHoldProjectStatusId + @"""] }, 2,
|
||||||
|
{
|
||||||
|
$cond: [
|
||||||
|
{ $eq: [""$ProjectStatus.Id"", """ + InActiveProjectStatusId + @"""] }, 3,
|
||||||
|
4
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}")
|
||||||
|
.Sort(Builders<BsonDocument>.Sort
|
||||||
|
.Ascending("statusPriority") // custom status order
|
||||||
|
.Ascending("ShortName")); // then by Name
|
||||||
|
|
||||||
|
var docs = await aggregate.ToListAsync();
|
||||||
|
|
||||||
|
var items = docs
|
||||||
|
.Select(d => BsonSerializer.Deserialize<ProjectMongoDB>(d))
|
||||||
|
.ToList();
|
||||||
|
return items;
|
||||||
}
|
}
|
||||||
public async Task<bool> DeleteProjectByIdFromCacheAsync(Guid projectId)
|
public async Task<bool> DeleteProjectByIdFromCacheAsync(Guid projectId)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
||||||
|
<PackageReference Include="Razorpay" Version="3.3.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
34
Marco.Pms.Helpers/Utility/MailLogHelper.cs
Normal file
34
Marco.Pms.Helpers/Utility/MailLogHelper.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using Marco.Pms.Model.Mail;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using MongoDB.Driver;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Helpers.Utility
|
||||||
|
{
|
||||||
|
public class MailLogHelper
|
||||||
|
{
|
||||||
|
private readonly IMongoCollection<MailLog> _collection;
|
||||||
|
private readonly ILogger<MailLogHelper> _logger;
|
||||||
|
public MailLogHelper(IConfiguration configuration, ILogger<MailLogHelper> logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
var connectionString = configuration["MongoDB:MailConnectionString"];
|
||||||
|
var mongoUrl = new MongoUrl(connectionString);
|
||||||
|
var client = new MongoClient(mongoUrl); // Your MongoDB connection string
|
||||||
|
var mongoDB = client.GetDatabase(mongoUrl.DatabaseName); // Your MongoDB Database name
|
||||||
|
_collection = mongoDB.GetCollection<MailLog>("MailLogs");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task AddWebMenuItemAsync(List<MailLog> mailLogs)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await _collection.InsertManyAsync(mailLogs);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error occurred while adding Mail Logs.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,14 +1,14 @@
|
|||||||
using Marco.Pms.Model.AppMenu;
|
using Marco.Pms.Model.AppMenu;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using MongoDB.Bson;
|
|
||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
|
|
||||||
namespace Marco.Pms.CacheHelper
|
namespace Marco.Pms.CacheHelper
|
||||||
{
|
{
|
||||||
public class SidebarMenuHelper
|
public class SidebarMenuHelper
|
||||||
{
|
{
|
||||||
private readonly IMongoCollection<MenuSection> _collection;
|
private readonly IMongoCollection<WebSideMenuItem> _webCollection;
|
||||||
|
private readonly IMongoCollection<MobileMenu> _mobileCollection;
|
||||||
private readonly ILogger<SidebarMenuHelper> _logger;
|
private readonly ILogger<SidebarMenuHelper> _logger;
|
||||||
|
|
||||||
public SidebarMenuHelper(IConfiguration configuration, ILogger<SidebarMenuHelper> logger)
|
public SidebarMenuHelper(IConfiguration configuration, ILogger<SidebarMenuHelper> logger)
|
||||||
@ -18,191 +18,18 @@ namespace Marco.Pms.CacheHelper
|
|||||||
var mongoUrl = new MongoUrl(connectionString);
|
var mongoUrl = new MongoUrl(connectionString);
|
||||||
var client = new MongoClient(mongoUrl);
|
var client = new MongoClient(mongoUrl);
|
||||||
var database = client.GetDatabase(mongoUrl.DatabaseName);
|
var database = client.GetDatabase(mongoUrl.DatabaseName);
|
||||||
_collection = database.GetCollection<MenuSection>("Menus");
|
_webCollection = database.GetCollection<WebSideMenuItem>("WebSideMenus");
|
||||||
|
_mobileCollection = database.GetCollection<MobileMenu>("MobileSideMenus");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<MenuSection?> CreateMenuSectionAsync(MenuSection section)
|
public async Task<List<WebSideMenuItem>> GetAllWebMenuSectionsAsync(Guid tenantId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _collection.InsertOneAsync(section);
|
var filter = Builders<WebSideMenuItem>.Filter.Eq(e => e.TenantId, tenantId);
|
||||||
return section;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error occurred while adding MenuSection.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuSection?> UpdateMenuSectionAsync(Guid sectionId, MenuSection updatedSection)
|
var result = await _webCollection
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId);
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update
|
|
||||||
.Set(s => s.Header, updatedSection.Header)
|
|
||||||
.Set(s => s.Title, updatedSection.Title)
|
|
||||||
.Set(s => s.Items, updatedSection.Items);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
return await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error updating MenuSection.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuSection?> AddMenuItemAsync(Guid sectionId, MenuItem newItem)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
newItem.Id = Guid.NewGuid();
|
|
||||||
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId);
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update.Push(s => s.Items, newItem);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
return await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error adding menu item.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuItem?> UpdateMenuItemAsync(Guid sectionId, Guid itemId, MenuItem updatedItem)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.And(
|
|
||||||
Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId),
|
|
||||||
Builders<MenuSection>.Filter.ElemMatch(s => s.Items, i => i.Id == itemId)
|
|
||||||
);
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update
|
|
||||||
.Set("Items.$.Text", updatedItem.Text)
|
|
||||||
.Set("Items.$.Icon", updatedItem.Icon)
|
|
||||||
.Set("Items.$.Available", updatedItem.Available)
|
|
||||||
.Set("Items.$.Link", updatedItem.Link)
|
|
||||||
.Set("Items.$.PermissionIds", updatedItem.PermissionIds);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
// Re-fetch section and return the updated item
|
|
||||||
var section = await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
return section?.Items.FirstOrDefault(i => i.Id == itemId);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error updating MenuItem.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuSection?> AddSubMenuItemAsync(Guid sectionId, Guid itemId, SubMenuItem newSubItem)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
newSubItem.Id = Guid.NewGuid();
|
|
||||||
|
|
||||||
// Match the MenuSection and the specific MenuItem inside it
|
|
||||||
var filter = Builders<MenuSection>.Filter.And(
|
|
||||||
Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId),
|
|
||||||
Builders<MenuSection>.Filter.ElemMatch(s => s.Items, i => i.Id == itemId)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Use positional operator `$` to target matched MenuItem and push into its Submenu
|
|
||||||
var update = Builders<MenuSection>.Update.Push("Items.$.Submenu", newSubItem);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
return await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error adding submenu item.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<SubMenuItem?> UpdateSubmenuItemAsync(Guid sectionId, Guid itemId, Guid subItemId, SubMenuItem updatedSub)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId);
|
|
||||||
|
|
||||||
var arrayFilters = new List<ArrayFilterDefinition>
|
|
||||||
{
|
|
||||||
new BsonDocumentArrayFilterDefinition<BsonDocument>(
|
|
||||||
new BsonDocument("item._id", itemId.ToString())),
|
|
||||||
new BsonDocumentArrayFilterDefinition<BsonDocument>(
|
|
||||||
new BsonDocument("sub._id", subItemId.ToString()))
|
|
||||||
};
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].Text", updatedSub.Text)
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].Available", updatedSub.Available)
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].Link", updatedSub.Link)
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].PermissionKeys", updatedSub.PermissionIds);
|
|
||||||
|
|
||||||
var options = new UpdateOptions { ArrayFilters = arrayFilters };
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update, options);
|
|
||||||
|
|
||||||
if (result.ModifiedCount == 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var updatedSection = await _collection.Find(x => x.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
var subItem = updatedSection?.Items
|
|
||||||
.FirstOrDefault(i => i.Id == itemId)?
|
|
||||||
.Submenu
|
|
||||||
.FirstOrDefault(s => s.Id == subItemId);
|
|
||||||
|
|
||||||
return subItem;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error updating SubMenuItem.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async Task<List<MenuSection>> GetAllMenuSectionsAsync(Guid tenantId)
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(e => e.TenantId, tenantId);
|
|
||||||
|
|
||||||
var result = await _collection
|
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
if (result.Any())
|
if (result.Any())
|
||||||
@ -211,13 +38,74 @@ namespace Marco.Pms.CacheHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
tenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26");
|
tenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26");
|
||||||
filter = Builders<MenuSection>.Filter.Eq(e => e.TenantId, tenantId);
|
filter = Builders<WebSideMenuItem>.Filter.Eq(e => e.TenantId, tenantId);
|
||||||
|
|
||||||
result = await _collection
|
result = await _webCollection
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error occurred while fetching Web Menu Sections.");
|
||||||
|
return new List<WebSideMenuItem>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public async Task<List<WebSideMenuItem>> AddWebMenuItemAsync(List<WebSideMenuItem> newItems)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await _webCollection.InsertManyAsync(newItems);
|
||||||
|
return newItems;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error occurred while adding Web Menu Section.");
|
||||||
|
return new List<WebSideMenuItem>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public async Task<List<MobileMenu>> GetAllMobileMenuSectionsAsync(Guid tenantId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var filter = Builders<MobileMenu>.Filter.Eq(e => e.TenantId, tenantId);
|
||||||
|
|
||||||
|
var result = await _mobileCollection
|
||||||
|
.Find(filter)
|
||||||
|
.ToListAsync();
|
||||||
|
if (result.Any())
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
tenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26");
|
||||||
|
filter = Builders<MobileMenu>.Filter.Eq(e => e.TenantId, tenantId);
|
||||||
|
|
||||||
|
result = await _mobileCollection
|
||||||
|
.Find(filter)
|
||||||
|
.ToListAsync();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error occurred while fetching Web Menu Sections.");
|
||||||
|
return new List<MobileMenu>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public async Task<List<MobileMenu>> AddMobileMenuItemAsync(List<MobileMenu> newItems)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await _mobileCollection.InsertManyAsync(newItems);
|
||||||
|
return newItems;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error occurred while adding Mobile Menu Section.");
|
||||||
|
return new List<MobileMenu>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,8 @@ namespace Marco.Pms.Model.AppMenu
|
|||||||
public string? Icon { get; set; }
|
public string? Icon { get; set; }
|
||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string? Link { get; set; }
|
public string Link { get; set; } = string.Empty;
|
||||||
|
public string MobileLink { get; set; } = string.Empty;
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
21
Marco.Pms.Model/AppMenu/MobileMenu.cs
Normal file
21
Marco.Pms.Model/AppMenu/MobileMenu.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using MongoDB.Bson;
|
||||||
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.AppMenu
|
||||||
|
{
|
||||||
|
public class MobileMenu
|
||||||
|
{
|
||||||
|
[BsonId]
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
public bool Available { get; set; }
|
||||||
|
public string? MobileLink { get; set; }
|
||||||
|
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public List<Guid> PermissionIds { get; set; } = new List<Guid>();
|
||||||
|
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid TenantId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,6 +13,7 @@ namespace Marco.Pms.Model.AppMenu
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
public string Link { get; set; } = string.Empty;
|
||||||
|
public string MobileLink { get; set; } = string.Empty;
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
19
Marco.Pms.Model/AppMenu/WebMenuSection.cs
Normal file
19
Marco.Pms.Model/AppMenu/WebMenuSection.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using MongoDB.Bson;
|
||||||
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.AppMenu
|
||||||
|
{
|
||||||
|
public class WebMenuSection
|
||||||
|
{
|
||||||
|
[BsonId]
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid Id { get; set; } = Guid.NewGuid();
|
||||||
|
|
||||||
|
public string? Header { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
public List<WebSideMenuItem> Items { get; set; } = new List<WebSideMenuItem>();
|
||||||
|
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid TenantId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
25
Marco.Pms.Model/AppMenu/WebSideMenuItem.cs
Normal file
25
Marco.Pms.Model/AppMenu/WebSideMenuItem.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using MongoDB.Bson;
|
||||||
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.AppMenu
|
||||||
|
{
|
||||||
|
public class WebSideMenuItem
|
||||||
|
{
|
||||||
|
[BsonId]
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid Id { get; set; } = Guid.NewGuid();
|
||||||
|
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid? ParentMenuId { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
public string? Icon { get; set; }
|
||||||
|
public bool Available { get; set; } = true;
|
||||||
|
public string Link { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public List<Guid> PermissionIds { get; set; } = new List<Guid>();
|
||||||
|
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid TenantId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -29,5 +29,12 @@ namespace Marco.Pms.Model.AttendanceModule
|
|||||||
[ForeignKey("ApprovedById")]
|
[ForeignKey("ApprovedById")]
|
||||||
[ValidateNever]
|
[ValidateNever]
|
||||||
public Employee? Approver { get; set; }
|
public Employee? Approver { get; set; }
|
||||||
|
public DateTime? RequestedAt { get; set; }
|
||||||
|
public DateTime? ApprovedAt { get; set; }
|
||||||
|
public Guid? RequestedById { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("RequestedById")]
|
||||||
|
[ValidateNever]
|
||||||
|
public Employee? RequestedBy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
44
Marco.Pms.Model/Collection/Invoice.cs
Normal file
44
Marco.Pms.Model/Collection/Invoice.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using Marco.Pms.Model.Employees;
|
||||||
|
using Marco.Pms.Model.OrganizationModel;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Collection
|
||||||
|
{
|
||||||
|
public class Invoice : TenantRelation
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Title { get; set; } = default!;
|
||||||
|
public string Description { get; set; } = default!;
|
||||||
|
public Guid? BilledToId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("BilledToId")]
|
||||||
|
public Organization? BilledTo { get; set; }
|
||||||
|
public string InvoiceNumber { get; set; } = default!;
|
||||||
|
public string? EInvoiceNumber { get; set; }
|
||||||
|
public Guid ProjectId { get; set; }
|
||||||
|
public DateTime InvoiceDate { get; set; }
|
||||||
|
public DateTime ClientSubmitedDate { get; set; }
|
||||||
|
public DateTime ExceptedPaymentDate { get; set; }
|
||||||
|
public double BasicAmount { get; set; }
|
||||||
|
public double TaxAmount { get; set; }
|
||||||
|
public bool IsActive { get; set; } = true;
|
||||||
|
public bool MarkAsCompleted { get; set; } = true;
|
||||||
|
public DateTime CreatedAt { get; set; }
|
||||||
|
public Guid CreatedById { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("CreatedById")]
|
||||||
|
public Employee? CreatedBy { get; set; }
|
||||||
|
public DateTime? UpdatedAt { get; set; }
|
||||||
|
public Guid? UpdatedById { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("UpdatedById")]
|
||||||
|
public Employee? UpdatedBy { get; set; }
|
||||||
|
|
||||||
|
public ICollection<ReceivedInvoicePayment> ReceivedInvoicePayments { get; set; } = new List<ReceivedInvoicePayment>();
|
||||||
|
}
|
||||||
|
}
|
||||||
22
Marco.Pms.Model/Collection/InvoiceAttachment.cs
Normal file
22
Marco.Pms.Model/Collection/InvoiceAttachment.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using Marco.Pms.Model.DocumentManager;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Collection
|
||||||
|
{
|
||||||
|
public class InvoiceAttachment : TenantRelation
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public Guid InvoiceId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("InvoiceId")]
|
||||||
|
public Invoice? Invoice { get; set; }
|
||||||
|
public Guid DocumentId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("DocumentId")]
|
||||||
|
public Document? Document { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
24
Marco.Pms.Model/Collection/InvoiceComment.cs
Normal file
24
Marco.Pms.Model/Collection/InvoiceComment.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using Marco.Pms.Model.Employees;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Collection
|
||||||
|
{
|
||||||
|
public class InvoiceComment : TenantRelation
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Comment { get; set; } = default!;
|
||||||
|
public DateTime CreatedAt { get; set; }
|
||||||
|
public Guid CreatedById { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("CreatedById")]
|
||||||
|
public Employee? CreatedBy { get; set; }
|
||||||
|
public Guid InvoiceId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("InvoiceId")]
|
||||||
|
public Invoice? Invoice { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Marco.Pms.Model/Collection/PaymentAdjustmentHead.cs
Normal file
12
Marco.Pms.Model/Collection/PaymentAdjustmentHead.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Collection
|
||||||
|
{
|
||||||
|
public class PaymentAdjustmentHead : TenantRelation
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Name { get; set; } = default!;
|
||||||
|
public string? Description { get; set; }
|
||||||
|
public bool IsActive { get; set; } = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
33
Marco.Pms.Model/Collection/ReceivedInvoicePayment.cs
Normal file
33
Marco.Pms.Model/Collection/ReceivedInvoicePayment.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using Marco.Pms.Model.Employees;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Collection
|
||||||
|
{
|
||||||
|
public class ReceivedInvoicePayment : TenantRelation
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public Guid InvoiceId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("InvoiceId")]
|
||||||
|
public Invoice? Invoice { get; set; }
|
||||||
|
public DateTime PaymentReceivedDate { get; set; }
|
||||||
|
public string TransactionId { get; set; } = default!;
|
||||||
|
public double Amount { get; set; }
|
||||||
|
public string Comment { get; set; } = default!;
|
||||||
|
public bool IsActive { get; set; } = true;
|
||||||
|
public Guid PaymentAdjustmentHeadId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("PaymentAdjustmentHeadId")]
|
||||||
|
public PaymentAdjustmentHead? PaymentAdjustmentHead { get; set; }
|
||||||
|
public DateTime CreatedAt { get; set; }
|
||||||
|
public Guid CreatedById { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("CreatedById")]
|
||||||
|
public Employee? CreatedBy { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using Marco.Pms.Model.Utilities;
|
||||||
using Marco.Pms.Model.Projects;
|
|
||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
namespace Marco.Pms.Model.Directory
|
||||||
{
|
{
|
||||||
@ -9,9 +8,6 @@ namespace Marco.Pms.Model.Directory
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid ProjectId { get; set; }
|
public Guid ProjectId { get; set; }
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("ProjectId")]
|
|
||||||
public Project? Project { get; set; }
|
|
||||||
public Guid ContactId { get; set; }
|
public Guid ContactId { get; set; }
|
||||||
[ValidateNever]
|
[ValidateNever]
|
||||||
[ForeignKey("ContactId")]
|
[ForeignKey("ContactId")]
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class CreateWorkStatusMasterDto
|
public class CreateWorkStatusMasterDto
|
||||||
{
|
{
|
||||||
public string? Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public string? Description { get; set; }
|
public required string Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
public class UpdateWorkStatusMasterDto
|
public class UpdateWorkStatusMasterDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string? Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public string? Description { get; set; }
|
public required string Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.AppMenu
|
|
||||||
{
|
|
||||||
public class CreateMenuItemDto
|
|
||||||
{
|
|
||||||
public required string Text { get; set; }
|
|
||||||
public required string Icon { get; set; }
|
|
||||||
public bool Available { get; set; } = true;
|
|
||||||
|
|
||||||
public required string Link { get; set; }
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
|
||||||
|
|
||||||
public List<CreateSubMenuItemDto> Submenu { get; set; } = new List<CreateSubMenuItemDto>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user