Compare commits
298 Commits
Ashutosh_T
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| d8329f1fab | |||
| d0912cca56 | |||
| d957c692f1 | |||
| 40ca680f45 | |||
| 8dee7b0fa2 | |||
| 1e1fe6692d | |||
| 0df13975a7 | |||
| 8fb5aa632d | |||
| 7e4d4b0f5b | |||
| 64bde99ab5 | |||
| 90851a3349 | |||
| 2c0cd87227 | |||
| c3670eaab9 | |||
| 1cd8203d27 | |||
| 5df66b79ca | |||
| 31da8a4402 | |||
| 27a2610388 | |||
| cd175c4fdf | |||
| d6145ee0ba | |||
| 04086ed7e0 | |||
| a9b4b79ee4 | |||
| 70092e5601 | |||
| 33cd7113a7 | |||
| 1d4d61ef2c | |||
| f93686c1df | |||
| f2213db807 | |||
| eddbdde355 | |||
| 0048281616 | |||
| f248557704 | |||
| 18d590ccbe | |||
| 4c6070fee5 | |||
| 0fb5c3935d | |||
| 2f052174aa | |||
| 2258771229 | |||
| e4e49595e6 | |||
| 44d2827dcc | |||
| fef3db297c | |||
| 0d4d4c3754 | |||
| 162d735d16 | |||
| 38e1f7a0fc | |||
| fe1dfd7293 | |||
| 42da1f12cf | |||
| c5da400e6b | |||
| a405cfec13 | |||
| bc3e927777 | |||
| c304b615f7 | |||
| 8d64e9702d | |||
| 98acbb66d6 | |||
| 81d1137939 | |||
| 0c6f5e0df0 | |||
| f45bc29a44 | |||
| ef84ba34da | |||
| bd421d45aa | |||
| 777a72c71f | |||
| 264c9466c9 | |||
| a1f6552347 | |||
| 06c5457981 | |||
| 0ba4ccf45c | |||
| 84e2f840b4 | |||
| 34b89c4718 | |||
| d0745e8688 | |||
| 7d85cb5f4c | |||
| 9b59a4d6b6 | |||
| 7e0322c859 | |||
| 05bfa48115 | |||
| 091d73958d | |||
| f45ada2be2 | |||
| bcc416f47e | |||
| ee1cb73fe5 | |||
| eba1a70037 | |||
| 2f03de97d6 | |||
| a1ab143df5 | |||
| 64e6255458 | |||
| aa596b736d | |||
| 3884c74d9b | |||
| 7f2b9f0ceb | |||
| f633e11e97 | |||
| 5fab8371ac | |||
| 2e0ea562fe | |||
| 8c97c78408 | |||
| 86102ef70d | |||
| 009ac36e38 | |||
| d38bc4752a | |||
| 77db9a6bd9 | |||
| d452faf6a9 | |||
| 2ce294904b | |||
| 1e66dd2017 | |||
| aed6949187 | |||
| b069e9f07d | |||
| d41c49af7b | |||
| a10b24523e | |||
| efd8667774 | |||
| ac672d0cc2 | |||
| de883103d5 | |||
| bb31e33983 | |||
| 51d86d7bfc | |||
| 2039d84918 | |||
| 0ecc07777f | |||
| 0dd5633f2e | |||
| f8182494d2 | |||
| dbd551e08c | |||
| d9e0c2ee57 | |||
| db0d464ab5 | |||
| 55cae17ed1 | |||
| 846b3ed6e3 | |||
| 3f8024421a | |||
| 9d71a71a53 | |||
| 4a25158cc9 | |||
| 20b12cfcd4 | |||
| 0eb740fa25 | |||
| 5158153ee6 | |||
| 4884bf5de0 | |||
| 368fd37115 | |||
| 68cd5acc9c | |||
| 30623d6bbc | |||
| 1e8c967d7a | |||
| cda8005b1b | |||
| 8d97b2a687 | |||
| 061f287e8c | |||
| 84baa3a147 | |||
| fae6d7bbe9 | |||
| 0ef9d66cf1 | |||
| d9a1832e2e | |||
| 122e7074b8 | |||
| cdc2afb688 | |||
| 892facef40 | |||
| 0b150fed9a | |||
| b17d1d30e5 | |||
| a0789f7f8e | |||
| 7d30831408 | |||
| 87ebee8005 | |||
| a88446ceb5 | |||
| 5717bb6dac | |||
| cf35b8c773 | |||
| 5105da7b54 | |||
| e1b045f852 | |||
| f75c31b3ce | |||
| 01f214a60b | |||
| 935f5345b9 | |||
| 5263e89df6 | |||
| 7324537a90 | |||
| caeac04d0d | |||
| 33ebee08db | |||
| d51d7da4f8 | |||
| de08ceeb0d | |||
| ecabf52f2f | |||
| aa2a370467 | |||
| 73318060ec | |||
| 365439b2de | |||
| 06db1adc52 | |||
| 4f77431541 | |||
| 1fd0837640 | |||
| 672046d02e | |||
| 48562235f5 | |||
| d507b9ede2 | |||
| 194764c9d6 | |||
| 28caee40e3 | |||
| 4a13386546 | |||
| b336bd3481 | |||
| 3a3e742296 | |||
| 35ea41d1ce | |||
| 0916abe464 | |||
| 961cc018cf | |||
| 2e55d1e3c4 | |||
| c27b2a2ff1 | |||
| cd489f45ae | |||
| 4c2b33472b | |||
| 9b3324c27c | |||
| efc577f9a2 | |||
| 391d79af3e | |||
| 830a9526dd | |||
| 067da422c2 | |||
| c199e3e241 | |||
| 1d50d4987a | |||
| de4d62ba78 | |||
| b6243f8100 | |||
| 727df6e828 | |||
| e34840fbb8 | |||
| dd48e5071c | |||
| 242c345ce1 | |||
| 2ca9dead1f | |||
| ec4756d888 | |||
| 03959f9b38 | |||
| ac69bcb339 | |||
| a24db1716f | |||
| da787cfe43 | |||
| 452f4a7e5a | |||
| ca31c011e4 | |||
| 5ac1c2b798 | |||
| cf51d4f37c | |||
| 2b6e8b7c8a | |||
| 4af6891821 | |||
| 455cbc5cd4 | |||
| f6ce8dd4f6 | |||
| 5538c3ae25 | |||
| 38450dce70 | |||
| 23473b33f0 | |||
| 7b1238e7d6 | |||
| 4655aa948b | |||
| f4cb08f472 | |||
| 990b928a63 | |||
| 9a9876b7ca | |||
| 884efdce61 | |||
| ba5698f4b2 | |||
| 673102cb50 | |||
| 2699439996 | |||
| 813bc70bda | |||
| 58b817be99 | |||
| 47a3d6035c | |||
| 7f4f266dd0 | |||
| 5cf6885a93 | |||
| 48fb5fd449 | |||
| b44fd6d49f | |||
| 56977e3702 | |||
| 6f1a9cd892 | |||
| 44614f475b | |||
| 7335ad23ce | |||
| c5385c0b06 | |||
| 6017d87793 | |||
| f502adb6c6 | |||
| 1b47fbdcf0 | |||
| 37c91d4432 | |||
| 0ba2874041 | |||
| 4bd3e59427 | |||
| 4a78bb8074 | |||
| e7302ecd6c | |||
| 6688b76145 | |||
| 759d152a9a | |||
| ef41990d7f | |||
| 830accbe98 | |||
| 3980c14d72 | |||
| 9e15cf0447 | |||
| 53a93542e9 | |||
| 019ef5d997 | |||
| 373d80260f | |||
| bb76047605 | |||
| 648b4f9ef0 |
@ -1,6 +1,7 @@
|
|||||||
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;
|
||||||
@ -9,6 +10,7 @@ using Marco.Pms.Model.Expenses;
|
|||||||
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.Projects;
|
using Marco.Pms.Model.Projects;
|
||||||
using Marco.Pms.Model.Roles;
|
using Marco.Pms.Model.Roles;
|
||||||
using Marco.Pms.Model.TenantModels;
|
using Marco.Pms.Model.TenantModels;
|
||||||
@ -39,6 +41,8 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
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<ApplicationUser> ApplicationUsers { get; set; }
|
public DbSet<ApplicationUser> ApplicationUsers { get; set; }
|
||||||
|
public DbSet<ServiceMaster> ServiceMasters { get; set; }
|
||||||
|
public DbSet<ActivityGroupMaster> ActivityGroupMasters { get; set; }
|
||||||
public DbSet<ActivityMaster> ActivityMasters { get; set; }
|
public DbSet<ActivityMaster> ActivityMasters { get; set; }
|
||||||
public DbSet<Project> Projects { get; set; }
|
public DbSet<Project> Projects { get; set; }
|
||||||
public DbSet<ProjectAllocation> ProjectAllocations { get; set; }
|
public DbSet<ProjectAllocation> ProjectAllocations { get; set; }
|
||||||
@ -59,6 +63,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
public DbSet<Module> Modules { get; set; }
|
public DbSet<Module> Modules { get; set; }
|
||||||
public DbSet<Feature> Features { get; set; }
|
public DbSet<Feature> Features { get; set; }
|
||||||
public DbSet<FeaturePermission> FeaturePermissions { get; set; }
|
public DbSet<FeaturePermission> FeaturePermissions { get; set; }
|
||||||
|
public DbSet<ProjectLevelPermissionMapping> ProjectLevelPermissionMappings { get; set; }
|
||||||
public DbSet<CurrencyMaster> CurrencyMaster { get; set; }
|
public DbSet<CurrencyMaster> CurrencyMaster { get; set; }
|
||||||
public DbSet<ApplicationRole> ApplicationRoles { get; set; }
|
public DbSet<ApplicationRole> ApplicationRoles { get; set; }
|
||||||
public DbSet<JobRole> JobRoles { get; set; }
|
public DbSet<JobRole> JobRoles { get; set; }
|
||||||
@ -108,6 +113,8 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
public DbSet<StatusPermissionMapping> StatusPermissionMapping { get; set; }
|
public DbSet<StatusPermissionMapping> StatusPermissionMapping { get; set; }
|
||||||
public DbSet<ExpensesStatusMapping> ExpensesStatusMapping { get; set; }
|
public DbSet<ExpensesStatusMapping> ExpensesStatusMapping { get; set; }
|
||||||
|
|
||||||
|
public DbSet<FCMTokenMapping> FCMTokenMappings { get; set; }
|
||||||
|
|
||||||
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; }
|
||||||
@ -116,6 +123,24 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
public DbSet<AttachmentVersionMapping> AttachmentVersionMappings { get; set; }
|
public DbSet<AttachmentVersionMapping> AttachmentVersionMappings { get; set; }
|
||||||
public DbSet<AttachmentTagMapping> AttachmentTagMappings { get; set; }
|
public DbSet<AttachmentTagMapping> AttachmentTagMappings { get; set; }
|
||||||
|
|
||||||
|
public DbSet<GlobalServiceMaster> GlobalServiceMasters { get; set; }
|
||||||
|
public DbSet<GlobalActivityGroupMaster> GlobalActivityGroupMasters { get; set; }
|
||||||
|
public DbSet<GlobalActivityMaster> GlobalActivityMasters { get; set; }
|
||||||
|
|
||||||
|
public DbSet<Organization> Organizations { get; set; }
|
||||||
|
public DbSet<OrgTypeMaster> OrgTypeMasters { get; set; }
|
||||||
|
public DbSet<TenantOrgMapping> TenantOrgMappings { get; set; }
|
||||||
|
public DbSet<OrgServiceMapping> OrgServiceMappings { get; set; }
|
||||||
|
public DbSet<ProjectServiceMapping> ProjectServiceMappings { get; set; }
|
||||||
|
public DbSet<ProjectOrgMapping> ProjectOrgMappings { get; set; }
|
||||||
|
|
||||||
|
// 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; }
|
||||||
|
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
@ -131,6 +156,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
.HasForeignKey(e => e.UserId)
|
.HasForeignKey(e => e.UserId)
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<TenantStatus>().HasData(
|
modelBuilder.Entity<TenantStatus>().HasData(
|
||||||
new TenantStatus
|
new TenantStatus
|
||||||
{
|
{
|
||||||
@ -149,6 +175,21 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<Organization>().HasData(
|
||||||
|
new Organization
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
Name = "MarcoBMS",
|
||||||
|
ContactPerson = "Admin",
|
||||||
|
Email = "admin@marcoaiot.com",
|
||||||
|
ContactNumber = "123456789",
|
||||||
|
Address = "2nd Floor, Fullora Building, Tejas CHS, behind Kothrud Stand, Tejas Society, Dahanukar Colony, Kothrud, Pune, Maharashtra 411038",
|
||||||
|
CreatedAt = DateTime.MinValue,
|
||||||
|
SPRID = 5400,
|
||||||
|
IsActive = true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<Tenant>().HasData(
|
modelBuilder.Entity<Tenant>().HasData(
|
||||||
new Tenant
|
new Tenant
|
||||||
{
|
{
|
||||||
@ -162,6 +203,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
DomainName = "www.marcobms.org",
|
DomainName = "www.marcobms.org",
|
||||||
TenantStatusId = Guid.Parse("62b05792-5115-4f99-8ff5-e8374859b191"),
|
TenantStatusId = Guid.Parse("62b05792-5115-4f99-8ff5-e8374859b191"),
|
||||||
IndustryId = Guid.Parse("15436ee3-a650-469e-bfc2-59993f7514bb"),
|
IndustryId = Guid.Parse("15436ee3-a650-469e-bfc2-59993f7514bb"),
|
||||||
|
OrganizationId = Guid.Parse("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
BillingAddress = "2nd Floor, Fullora Building, Tejas CHS, behind Kothrud Stand, Tejas Society, Dahanukar Colony, Kothrud, Pune, Maharashtra 411038",
|
BillingAddress = "2nd Floor, Fullora Building, Tejas CHS, behind Kothrud Stand, Tejas Society, Dahanukar Colony, Kothrud, Pune, Maharashtra 411038",
|
||||||
OnBoardingDate = DateTime.MinValue,
|
OnBoardingDate = DateTime.MinValue,
|
||||||
IsSuperTenant = true,
|
IsSuperTenant = true,
|
||||||
@ -196,6 +238,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Status = "Completed"
|
Status = "Completed"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<Project>().HasData(
|
modelBuilder.Entity<Project>().HasData(
|
||||||
new Project
|
new Project
|
||||||
{
|
{
|
||||||
@ -225,6 +268,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
new Industry { Id = Guid.Parse("8a0d6134-2dbe-4e0a-b250-ff34cb7b9df0"), Name = "Education & Training" }
|
new Industry { Id = Guid.Parse("8a0d6134-2dbe-4e0a-b250-ff34cb7b9df0"), Name = "Education & Training" }
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<TicketStatusMaster>().HasData(
|
modelBuilder.Entity<TicketStatusMaster>().HasData(
|
||||||
new TicketStatusMaster
|
new TicketStatusMaster
|
||||||
{
|
{
|
||||||
@ -272,6 +316,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<TicketTypeMaster>().HasData(
|
modelBuilder.Entity<TicketTypeMaster>().HasData(
|
||||||
new TicketTypeMaster
|
new TicketTypeMaster
|
||||||
{
|
{
|
||||||
@ -290,6 +335,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<TicketPriorityMaster>().HasData(
|
modelBuilder.Entity<TicketPriorityMaster>().HasData(
|
||||||
new TicketPriorityMaster
|
new TicketPriorityMaster
|
||||||
{
|
{
|
||||||
@ -337,6 +383,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<TicketTagMaster>().HasData(
|
modelBuilder.Entity<TicketTagMaster>().HasData(
|
||||||
new TicketTagMaster
|
new TicketTagMaster
|
||||||
{
|
{
|
||||||
@ -382,6 +429,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<WorkStatusMaster>().HasData(
|
modelBuilder.Entity<WorkStatusMaster>().HasData(
|
||||||
new WorkStatusMaster
|
new WorkStatusMaster
|
||||||
{
|
{
|
||||||
@ -625,6 +673,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = "Materials, equipment and supplies purchased for site operations.",
|
Description = "Materials, equipment and supplies purchased for site operations.",
|
||||||
NoOfPersonsRequired = false,
|
NoOfPersonsRequired = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpensesTypeMaster
|
||||||
@ -634,6 +683,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = "Vehicle fuel, logistics services and delivery of goods or personnel.",
|
Description = "Vehicle fuel, logistics services and delivery of goods or personnel.",
|
||||||
NoOfPersonsRequired = false,
|
NoOfPersonsRequired = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = false,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpensesTypeMaster
|
||||||
@ -643,6 +693,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = "Delivery of personnel.",
|
Description = "Delivery of personnel.",
|
||||||
NoOfPersonsRequired = true,
|
NoOfPersonsRequired = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = false,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpensesTypeMaster
|
||||||
@ -652,6 +703,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = "Site setup costs including equipment deployment and temporary infrastructure.",
|
Description = "Site setup costs including equipment deployment and temporary infrastructure.",
|
||||||
NoOfPersonsRequired = false,
|
NoOfPersonsRequired = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpensesTypeMaster
|
||||||
@ -661,6 +713,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = " Worker amenities like snacks, meals, safety gear, accommodation, medical support etc.",
|
Description = " Worker amenities like snacks, meals, safety gear, accommodation, medical support etc.",
|
||||||
NoOfPersonsRequired = true,
|
NoOfPersonsRequired = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpensesTypeMaster
|
||||||
@ -670,6 +723,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = "Machinery servicing, electricity, water, and temporary office needs.",
|
Description = "Machinery servicing, electricity, water, and temporary office needs.",
|
||||||
NoOfPersonsRequired = false,
|
NoOfPersonsRequired = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpensesTypeMaster
|
||||||
@ -679,6 +733,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = "Scheduled payments for external services or goods.",
|
Description = "Scheduled payments for external services or goods.",
|
||||||
NoOfPersonsRequired = false,
|
NoOfPersonsRequired = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new ExpensesTypeMaster
|
new ExpensesTypeMaster
|
||||||
@ -688,6 +743,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Description = "Government fees, insurance, inspections and safety-related expenditures.",
|
Description = "Government fees, insurance, inspections and safety-related expenditures.",
|
||||||
NoOfPersonsRequired = false,
|
NoOfPersonsRequired = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
IsAttachmentRequried = true,
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -727,6 +783,65 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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,
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<EntityTypeMaster>().HasData(
|
modelBuilder.Entity<EntityTypeMaster>().HasData(
|
||||||
new EntityTypeMaster
|
new EntityTypeMaster
|
||||||
{
|
{
|
||||||
@ -749,7 +864,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Name = "Project Documents",
|
Name = "Project Documents",
|
||||||
Description = "Project documents are formal records that outline the plans, progress, and details necessary to execute and manage a project effectively.",
|
Description = "Project documents are formal records that outline the plans, progress, and details necessary to execute and manage a project effectively.",
|
||||||
EntityTypeId = Guid.Parse("c8fe7115-aa27-43bc-99f4-7b05fabe436e"),
|
EntityTypeId = Guid.Parse("c8fe7115-aa27-43bc-99f4-7b05fabe436e"),
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
},
|
},
|
||||||
new DocumentCategoryMaster
|
new DocumentCategoryMaster
|
||||||
@ -758,10 +873,10 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
Name = "Employee Documents",
|
Name = "Employee Documents",
|
||||||
Description = "Employment details along with legal IDs like passports or driver’s licenses to verify identity and work authorization.",
|
Description = "Employment details along with legal IDs like passports or driver’s licenses to verify identity and work authorization.",
|
||||||
EntityTypeId = Guid.Parse("dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7"),
|
EntityTypeId = Guid.Parse("dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7"),
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<DocumentTypeMaster>().HasData(
|
modelBuilder.Entity<DocumentTypeMaster>().HasData(
|
||||||
new DocumentTypeMaster
|
new DocumentTypeMaster
|
||||||
@ -773,7 +888,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 2,
|
MaxSizeAllowedInMB = 2,
|
||||||
IsValidationRequired = true,
|
IsValidationRequired = true,
|
||||||
IsMandatory = true,
|
IsMandatory = true,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
@ -788,7 +903,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 2,
|
MaxSizeAllowedInMB = 2,
|
||||||
IsValidationRequired = true,
|
IsValidationRequired = true,
|
||||||
IsMandatory = true,
|
IsMandatory = true,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
@ -803,7 +918,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 2,
|
MaxSizeAllowedInMB = 2,
|
||||||
IsValidationRequired = true,
|
IsValidationRequired = true,
|
||||||
IsMandatory = true,
|
IsMandatory = true,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
@ -818,7 +933,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 2,
|
MaxSizeAllowedInMB = 2,
|
||||||
IsValidationRequired = true,
|
IsValidationRequired = true,
|
||||||
IsMandatory = true,
|
IsMandatory = true,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
@ -833,7 +948,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 2,
|
MaxSizeAllowedInMB = 2,
|
||||||
IsValidationRequired = true,
|
IsValidationRequired = true,
|
||||||
IsMandatory = true,
|
IsMandatory = true,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
DocumentCategoryId = Guid.Parse("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
@ -848,7 +963,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 1,
|
MaxSizeAllowedInMB = 1,
|
||||||
IsValidationRequired = false,
|
IsValidationRequired = false,
|
||||||
IsMandatory = false,
|
IsMandatory = false,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
@ -862,7 +977,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 1,
|
MaxSizeAllowedInMB = 1,
|
||||||
IsValidationRequired = false,
|
IsValidationRequired = false,
|
||||||
IsMandatory = false,
|
IsMandatory = false,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
@ -876,7 +991,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 1,
|
MaxSizeAllowedInMB = 1,
|
||||||
IsValidationRequired = false,
|
IsValidationRequired = false,
|
||||||
IsMandatory = false,
|
IsMandatory = false,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
@ -890,7 +1005,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 1,
|
MaxSizeAllowedInMB = 1,
|
||||||
IsValidationRequired = false,
|
IsValidationRequired = false,
|
||||||
IsMandatory = false,
|
IsMandatory = false,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
@ -904,7 +1019,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 1,
|
MaxSizeAllowedInMB = 1,
|
||||||
IsValidationRequired = false,
|
IsValidationRequired = false,
|
||||||
IsMandatory = false,
|
IsMandatory = false,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
@ -918,7 +1033,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
MaxSizeAllowedInMB = 20,
|
MaxSizeAllowedInMB = 20,
|
||||||
IsValidationRequired = false,
|
IsValidationRequired = false,
|
||||||
IsMandatory = false,
|
IsMandatory = false,
|
||||||
CreatedAt = DateTime.UtcNow,
|
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||||
IsSystem = true,
|
IsSystem = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
DocumentCategoryId = Guid.Parse("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
@ -944,6 +1059,19 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
modelBuilder.Entity<OrgTypeMaster>().HasData(
|
||||||
|
new OrgTypeMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("5ee49bcd-b6d3-482f-9aaf-484afe04abec"),
|
||||||
|
Name = "Service Provider"
|
||||||
|
},
|
||||||
|
new OrgTypeMaster
|
||||||
|
{
|
||||||
|
Id = Guid.Parse("a283356a-9b02-4029-afb7-e65c703efdd4"),
|
||||||
|
Name = "Sub-Contractor"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
modelBuilder.Entity<Module>().HasData(
|
modelBuilder.Entity<Module>().HasData(
|
||||||
new Module
|
new Module
|
||||||
{
|
{
|
||||||
@ -978,6 +1106,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
// 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("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("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 },
|
||||||
|
|
||||||
// Employee Module
|
// Employee Module
|
||||||
@ -985,9 +1114,12 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
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 },
|
||||||
new Feature { Id = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), Description = "Manage Document", Name = "Document Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
new Feature { Id = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), Description = "Manage Document", Name = "Document Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
|
||||||
|
|
||||||
|
// Master Module
|
||||||
new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
||||||
new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Managing all directory related rights", Name = "Directory Management", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
|
new Feature { Id = new Guid("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 },
|
||||||
|
|
||||||
|
// 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 }
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1029,6 +1161,7 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
new FeaturePermission { Id = new Guid("3f6d1f67-6fa5-4b7c-b17b-018d4fe4aab8"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Upload Document", Description = "Grants a user the authority to upload the document" },
|
new FeaturePermission { Id = new Guid("3f6d1f67-6fa5-4b7c-b17b-018d4fe4aab8"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Upload Document", Description = "Grants a user the authority to upload the document" },
|
||||||
new FeaturePermission { Id = new Guid("c423fd81-6273-4b9d-bb5e-76a0fb343833"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Mofify Document", Description = "Grants a user the authority to modify document" },
|
new FeaturePermission { Id = new Guid("c423fd81-6273-4b9d-bb5e-76a0fb343833"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Mofify Document", Description = "Grants a user the authority to modify document" },
|
||||||
new FeaturePermission { Id = new Guid("40863a13-5a66-469d-9b48-135bc5dbf486"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Delete Document", Description = "Grants a user the authority to delete the document" },
|
new FeaturePermission { Id = new Guid("40863a13-5a66-469d-9b48-135bc5dbf486"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Delete Document", Description = "Grants a user the authority to delete the document" },
|
||||||
|
new FeaturePermission { Id = new Guid("404373d0-860f-490e-a575-1c086ffbce1d"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Download Document", Description = "Grants a user the authority to download the document" },
|
||||||
new FeaturePermission { Id = new Guid("13a1f30f-38d1-41bf-8e7a-b75189aab8e0"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Verify Document", Description = "Grants a user the authority to verify the document" },
|
new FeaturePermission { Id = new Guid("13a1f30f-38d1-41bf-8e7a-b75189aab8e0"), FeatureId = new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), IsEnabled = true, Name = "Verify Document", Description = "Grants a user the authority to verify the document" },
|
||||||
|
|
||||||
// Directory Management Feature
|
// Directory Management Feature
|
||||||
@ -1043,7 +1176,19 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
new FeaturePermission { Id = new Guid("1f4bda08-1873-449a-bb66-3e8222bd871b"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Review", Description = "Allows a user to examine submitted expenses for accuracy, completeness, and policy compliance before they are approved or rejected." },
|
new FeaturePermission { Id = new Guid("1f4bda08-1873-449a-bb66-3e8222bd871b"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Review", Description = "Allows a user to examine submitted expenses for accuracy, completeness, and policy compliance before they are approved or rejected." },
|
||||||
new FeaturePermission { Id = new Guid("eaafdd76-8aac-45f9-a530-315589c6deca"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Approve", Description = "Allows a user to authorize or reject submitted expenses, making them officially accepted or declined within the system." },
|
new FeaturePermission { Id = new Guid("eaafdd76-8aac-45f9-a530-315589c6deca"), FeatureId = new Guid("a4e25142-449b-4334-a6e5-22f70e4732d7"), IsEnabled = true, Name = "Approve", Description = "Allows a user to authorize or reject submitted expenses, making them officially accepted or declined within the system." },
|
||||||
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." },
|
||||||
|
|
||||||
|
// 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("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" }
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,6 @@ namespace Marco.Pms.DataAccess.Initializer
|
|||||||
// State = "State",
|
// State = "State",
|
||||||
// Postalcode = "1234567890",
|
// Postalcode = "1234567890",
|
||||||
// City = "City",
|
// City = "City",
|
||||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26"),
|
|
||||||
IsRootUser = true,
|
IsRootUser = true,
|
||||||
|
|
||||||
}, "User@123").GetAwaiter().GetResult();
|
}, "User@123").GetAwaiter().GetResult();
|
||||||
@ -78,13 +77,10 @@ namespace Marco.Pms.DataAccess.Initializer
|
|||||||
Gender = "",
|
Gender = "",
|
||||||
EmergencyPhoneNumber = "1234567890",
|
EmergencyPhoneNumber = "1234567890",
|
||||||
CurrentAddress = "",
|
CurrentAddress = "",
|
||||||
AadharNumber = "1234567890",
|
|
||||||
ApplicationUserId = user.Id,
|
ApplicationUserId = user.Id,
|
||||||
BirthDate = DateTime.MinValue,
|
BirthDate = DateTime.MinValue,
|
||||||
PanNumber = "",
|
|
||||||
PermanentAddress = "",
|
PermanentAddress = "",
|
||||||
PhoneNumber = "",
|
PhoneNumber = ""
|
||||||
TenantId = user.TenantId
|
|
||||||
};
|
};
|
||||||
_db.Employees.Add(emp);
|
_db.Employees.Add(emp);
|
||||||
|
|
||||||
|
|||||||
4471
Marco.Pms.DataAccess/Migrations/20250813060211_Added_FCMTokenMApping_Table.Designer.cs
generated
Normal file
4471
Marco.Pms.DataAccess/Migrations/20250813060211_Added_FCMTokenMApping_Table.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_FCMTokenMApping_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "FCMTokenMappings",
|
||||||
|
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"),
|
||||||
|
FcmToken = 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_FCMTokenMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_FCMTokenMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_FCMTokenMappings_TenantId",
|
||||||
|
table: "FCMTokenMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "FCMTokenMappings");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
4474
Marco.Pms.DataAccess/Migrations/20250820110719_Added_Expriy_Date_In_FCMMapping_Table.Designer.cs
generated
Normal file
4474
Marco.Pms.DataAccess/Migrations/20250820110719_Added_Expriy_Date_In_FCMMapping_Table.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Expriy_Date_In_FCMMapping_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "ExpiredAt",
|
||||||
|
table: "FCMTokenMappings",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ExpiredAt",
|
||||||
|
table: "FCMTokenMappings");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
5455
Marco.Pms.DataAccess/Migrations/20250830045512_Added_New_Permission_To_Download_Document.Designer.cs
generated
Normal file
5455
Marco.Pms.DataAccess/Migrations/20250830045512_Added_New_Permission_To_Download_Document.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,211 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_New_Permission_To_Download_Document : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2627));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2617));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2718));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2700));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2710));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2695));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2684));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2731));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2690));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2727));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2722));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2714));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2705));
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
||||||
|
values: new object[] { new Guid("404373d0-860f-490e-a575-1c086ffbce1d"), "Grants a user the authority to download the document", new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), true, "Download Document" });
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("404373d0-860f-490e-a575-1c086ffbce1d"));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(8988));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(8981));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9059));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9042));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9051));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9038));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9028));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9072));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9034));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9068));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9063));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9055));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9046));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
5521
Marco.Pms.DataAccess/Migrations/20250903104652_Added_Project_Level_Permssion_Mapping_Table.Designer.cs
generated
Normal file
5521
Marco.Pms.DataAccess/Migrations/20250903104652_Added_Project_Level_Permssion_Mapping_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,264 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Project_Level_Permssion_Mapping_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ProjectLevelPermissionMappings",
|
||||||
|
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"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PermissionId = 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_ProjectLevelPermissionMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectLevelPermissionMappings_Employees_EmployeeId",
|
||||||
|
column: x => x.EmployeeId,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectLevelPermissionMappings_FeaturePermissions_Permission~",
|
||||||
|
column: x => x.PermissionId,
|
||||||
|
principalTable: "FeaturePermissions",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectLevelPermissionMappings_Projects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectLevelPermissionMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6233));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6226));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6307));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6290));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6298));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6286));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6275));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6319));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6282));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6314));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6311));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6302));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6295));
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectLevelPermissionMappings_EmployeeId",
|
||||||
|
table: "ProjectLevelPermissionMappings",
|
||||||
|
column: "EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectLevelPermissionMappings_PermissionId",
|
||||||
|
table: "ProjectLevelPermissionMappings",
|
||||||
|
column: "PermissionId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectLevelPermissionMappings_ProjectId",
|
||||||
|
table: "ProjectLevelPermissionMappings",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectLevelPermissionMappings_TenantId",
|
||||||
|
table: "ProjectLevelPermissionMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ProjectLevelPermissionMappings");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2627));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2617));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2718));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2700));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2710));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2695));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2684));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2731));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2690));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2727));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2722));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2714));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2705));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,268 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_IsAttachmentRequried_Parameter_In_ExpensesTypeMaster_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsAttachmentRequried",
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 12, 7, 6, 13, 429, DateTimeKind.Utc).AddTicks(3323));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 12, 7, 6, 13, 429, DateTimeKind.Utc).AddTicks(3316));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: true);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: false);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: true);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: true);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: true);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("77013784-9324-4d8b-bd36-d6f928e68942"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: true);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: false);
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ExpensesTypeMaster",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"),
|
||||||
|
column: "IsAttachmentRequried",
|
||||||
|
value: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsAttachmentRequried",
|
||||||
|
table: "ExpensesTypeMaster");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6233));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6226));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6307));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6290));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6298));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6286));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6275));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6319));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6282));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6314));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6311));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6302));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6295));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6079
Marco.Pms.DataAccess/Migrations/20250916051642_Added_Tables_Related_To_Organizations.Designer.cs
generated
Normal file
6079
Marco.Pms.DataAccess/Migrations/20250916051642_Added_Tables_Related_To_Organizations.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,757 @@
|
|||||||
|
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_Tables_Related_To_Organizations : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ActivityMasters",
|
||||||
|
keyColumn: "UnitOfMeasurement",
|
||||||
|
keyValue: null,
|
||||||
|
column: "UnitOfMeasurement",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "UnitOfMeasurement",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ActivityMasters",
|
||||||
|
keyColumn: "ActivityName",
|
||||||
|
keyValue: null,
|
||||||
|
column: "ActivityName",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ActivityName",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ActivityGroupId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsSystem",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "GlobalServiceMasters",
|
||||||
|
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_GlobalServiceMasters", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Organizations",
|
||||||
|
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"),
|
||||||
|
Email = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ContactPerson = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Address = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ContactNumber = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
SPRID = table.Column<double>(type: "double", nullable: false),
|
||||||
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||||
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Organizations", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Organizations_Employees_CreatedById",
|
||||||
|
column: x => x.CreatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Organizations_Employees_UpdatedById",
|
||||||
|
column: x => x.UpdatedById,
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "OrgTypeMasters",
|
||||||
|
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_OrgTypeMasters", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ServiceMasters",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ServiceMasters", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServiceMasters_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "GlobalActivityGroupMasters",
|
||||||
|
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"),
|
||||||
|
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_GlobalActivityGroupMasters", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_GlobalActivityGroupMasters_GlobalServiceMasters_ServiceId",
|
||||||
|
column: x => x.ServiceId,
|
||||||
|
principalTable: "GlobalServiceMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "OrgServiceMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = 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"),
|
||||||
|
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_OrgServiceMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrgServiceMappings_GlobalServiceMasters_ServiceId",
|
||||||
|
column: x => x.ServiceId,
|
||||||
|
principalTable: "GlobalServiceMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_OrgServiceMappings_Organizations_OrganizationId",
|
||||||
|
column: x => x.OrganizationId,
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "TenantOrgMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = 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"),
|
||||||
|
SPRID = table.Column<double>(type: "double", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
AssignedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
ReassignedDate = 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_TenantOrgMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_TenantOrgMappings_Organizations_OrganizationId",
|
||||||
|
column: x => x.OrganizationId,
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_TenantOrgMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ActivityGroupMasters",
|
||||||
|
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"),
|
||||||
|
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ActivityGroupMasters", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ActivityGroupMasters_ServiceMasters_ServiceId",
|
||||||
|
column: x => x.ServiceId,
|
||||||
|
principalTable: "ServiceMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ActivityGroupMasters_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ProjectServiceMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = 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"),
|
||||||
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
PlannedStartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
PlannedEndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
ActualStartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
ActualEndDate = 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_ProjectServiceMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectServiceMappings_Projects_ProjectId",
|
||||||
|
column: x => x.ProjectId,
|
||||||
|
principalTable: "Projects",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectServiceMappings_ServiceMasters_ServiceId",
|
||||||
|
column: x => x.ServiceId,
|
||||||
|
principalTable: "ServiceMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectServiceMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "GlobalActivityMasters",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ActivityName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
UnitOfMeasurement = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ActivityGroupId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_GlobalActivityMasters", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_GlobalActivityMasters_GlobalActivityGroupMasters_ActivityGro~",
|
||||||
|
column: x => x.ActivityGroupId,
|
||||||
|
principalTable: "GlobalActivityGroupMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ProjectOrgMappings",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = 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"),
|
||||||
|
ParentOrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
ProjectServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
OrganizationTypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
AssignedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
CompletionDate = 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_ProjectOrgMappings", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectOrgMappings_OrgTypeMasters_OrganizationTypeId",
|
||||||
|
column: x => x.OrganizationTypeId,
|
||||||
|
principalTable: "OrgTypeMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectOrgMappings_Organizations_OrganizationId",
|
||||||
|
column: x => x.OrganizationId,
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectOrgMappings_Organizations_ParentOrganizationId",
|
||||||
|
column: x => x.ParentOrganizationId,
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectOrgMappings_ProjectServiceMappings_ProjectServiceId",
|
||||||
|
column: x => x.ProjectServiceId,
|
||||||
|
principalTable: "ProjectServiceMappings",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ProjectOrgMappings_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "OrgTypeMasters",
|
||||||
|
columns: new[] { "Id", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("5ee49bcd-b6d3-482f-9aaf-484afe04abec"), "Service Provider" },
|
||||||
|
{ new Guid("743806fe-d991-4079-b223-e4e2da44f435"), "Tenant" },
|
||||||
|
{ new Guid("a283356a-9b02-4029-afb7-e65c703efdd4"), "Sub-Contractor" },
|
||||||
|
{ new Guid("b1877a3b-8832-47b1-bbe3-dc7e98672f49"), "PMC" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Organizations",
|
||||||
|
columns: new[] { "Id", "Address", "ContactNumber", "ContactPerson", "CreatedAt", "CreatedById", "Email", "IsActive", "Name", "SPRID", "UpdatedAt", "UpdatedById" },
|
||||||
|
values: new object[] { new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"), "2nd Floor, Fullora Building, Tejas CHS, behind Kothrud Stand, Tejas Society, Dahanukar Colony, Kothrud, Pune, Maharashtra 411038", "123456789", "Admin", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "admin@marcoaiot.com", true, "MarcoBMS", 5400.0, null, null });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ActivityMasters_ActivityGroupId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
column: "ActivityGroupId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ActivityGroupMasters_ServiceId",
|
||||||
|
table: "ActivityGroupMasters",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ActivityGroupMasters_TenantId",
|
||||||
|
table: "ActivityGroupMasters",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_GlobalActivityGroupMasters_ServiceId",
|
||||||
|
table: "GlobalActivityGroupMasters",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_GlobalActivityMasters_ActivityGroupId",
|
||||||
|
table: "GlobalActivityMasters",
|
||||||
|
column: "ActivityGroupId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Organizations_CreatedById",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Organizations_UpdatedById",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrgServiceMappings_OrganizationId",
|
||||||
|
table: "OrgServiceMappings",
|
||||||
|
column: "OrganizationId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OrgServiceMappings_ServiceId",
|
||||||
|
table: "OrgServiceMappings",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectOrgMappings_OrganizationId",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
column: "OrganizationId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectOrgMappings_OrganizationTypeId",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
column: "OrganizationTypeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectOrgMappings_ParentOrganizationId",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
column: "ParentOrganizationId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectOrgMappings_ProjectServiceId",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
column: "ProjectServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectOrgMappings_TenantId",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectServiceMappings_ProjectId",
|
||||||
|
table: "ProjectServiceMappings",
|
||||||
|
column: "ProjectId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectServiceMappings_ServiceId",
|
||||||
|
table: "ProjectServiceMappings",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectServiceMappings_TenantId",
|
||||||
|
table: "ProjectServiceMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServiceMasters_TenantId",
|
||||||
|
table: "ServiceMasters",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TenantOrgMappings_OrganizationId",
|
||||||
|
table: "TenantOrgMappings",
|
||||||
|
column: "OrganizationId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TenantOrgMappings_TenantId",
|
||||||
|
table: "TenantOrgMappings",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ActivityMasters_ActivityGroupMasters_ActivityGroupId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
column: "ActivityGroupId",
|
||||||
|
principalTable: "ActivityGroupMasters",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ActivityMasters_ActivityGroupMasters_ActivityGroupId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ActivityGroupMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "GlobalActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "OrgServiceMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ProjectOrgMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "TenantOrgMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "GlobalActivityGroupMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "OrgTypeMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ProjectServiceMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "GlobalServiceMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ServiceMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ActivityMasters_ActivityGroupId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ActivityGroupId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsSystem",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "UnitOfMeasurement",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ActivityName",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6233));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6226));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6307));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6290));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6298));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6286));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6275));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6319));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6282));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6314));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6311));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6302));
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "DocumentTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||||
|
column: "CreatedAt",
|
||||||
|
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6295));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6117
Marco.Pms.DataAccess/Migrations/20250917055522_Added_IsActive_In_ServiceMaster.Designer.cs
generated
Normal file
6117
Marco.Pms.DataAccess/Migrations/20250917055522_Added_IsActive_In_ServiceMaster.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,77 @@
|
|||||||
|
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_IsActive_In_ServiceMaster : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "ServiceMasters",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "ActivityGroupMasters",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "Features",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
||||||
|
values: new object[] { new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), "Managing all organization related rights", true, new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), "Organization Management" });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"), "Allow user to create new organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "Add Organization" },
|
||||||
|
{ new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"), "Allow the user to view information of the organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "View Organization" },
|
||||||
|
{ new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"), "Allow the user to update the basic information of the organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "Edit Organization" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "FeaturePermissions",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "Features",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"));
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "ServiceMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "ActivityGroupMasters");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6114
Marco.Pms.DataAccess/Migrations/20250917063934_Updated_EMployee_Table.Designer.cs
generated
Normal file
6114
Marco.Pms.DataAccess/Migrations/20250917063934_Updated_EMployee_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,136 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Updated_EMployee_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Employees_JobRoles_JobRoleId",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "AadharNumber",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PanNumber",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "RoleId",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "JobRoleId",
|
||||||
|
table: "Employees",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)",
|
||||||
|
oldNullable: true)
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Employees",
|
||||||
|
keyColumn: "FirstName",
|
||||||
|
keyValue: null,
|
||||||
|
column: "FirstName",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "FirstName",
|
||||||
|
table: "Employees",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "HasApplicationAccess",
|
||||||
|
table: "Employees",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Employees_JobRoles_JobRoleId",
|
||||||
|
table: "Employees",
|
||||||
|
column: "JobRoleId",
|
||||||
|
principalTable: "JobRoles",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Employees_JobRoles_JobRoleId",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "HasApplicationAccess",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "JobRoleId",
|
||||||
|
table: "Employees",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)")
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "FirstName",
|
||||||
|
table: "Employees",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "AadharNumber",
|
||||||
|
table: "Employees",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PanNumber",
|
||||||
|
table: "Employees",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "RoleId",
|
||||||
|
table: "Employees",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Employees_JobRoles_JobRoleId",
|
||||||
|
table: "Employees",
|
||||||
|
column: "JobRoleId",
|
||||||
|
principalTable: "JobRoles",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6098
Marco.Pms.DataAccess/Migrations/20250917072710_Added_Organization_In_Employee_Table.Designer.cs
generated
Normal file
6098
Marco.Pms.DataAccess/Migrations/20250917072710_Added_Organization_In_Employee_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,70 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Organization_In_Employee_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Organizations_Employees_CreatedById",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Organizations_Employees_UpdatedById",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Organizations_CreatedById",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Organizations_UpdatedById",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "OrganizationId",
|
||||||
|
table: "Employees",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "OrganizationId",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Organizations_CreatedById",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "CreatedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Organizations_UpdatedById",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "UpdatedById");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Organizations_Employees_CreatedById",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "CreatedById",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Organizations_Employees_UpdatedById",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "UpdatedById",
|
||||||
|
principalTable: "Employees",
|
||||||
|
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 Added_Organization_In_Employee_Table_As_Forgin_Key : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Employees_OrganizationId",
|
||||||
|
table: "Employees",
|
||||||
|
column: "OrganizationId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Employees_Organizations_OrganizationId",
|
||||||
|
table: "Employees",
|
||||||
|
column: "OrganizationId",
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Employees_Organizations_OrganizationId",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Employees_OrganizationId",
|
||||||
|
table: "Employees");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6111
Marco.Pms.DataAccess/Migrations/20250917090050_Added_IsPrimary_Parameter_In_Employee_Table.Designer.cs
generated
Normal file
6111
Marco.Pms.DataAccess/Migrations/20250917090050_Added_IsPrimary_Parameter_In_Employee_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_IsPrimary_Parameter_In_Employee_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsPrimary",
|
||||||
|
table: "Employees",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsPrimary",
|
||||||
|
table: "Employees");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6122
Marco.Pms.DataAccess/Migrations/20250917092024_Added_Organization_In_Tenant_Table_As_Forgin_Key.Designer.cs
generated
Normal file
6122
Marco.Pms.DataAccess/Migrations/20250917092024_Added_Organization_In_Tenant_Table_As_Forgin_Key.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,69 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Organization_In_Tenant_Table_As_Forgin_Key : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "AspNetUsers");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "OrganizationId",
|
||||||
|
table: "Tenants",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Tenants",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"),
|
||||||
|
column: "OrganizationId",
|
||||||
|
value: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"));
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Tenants_OrganizationId",
|
||||||
|
table: "Tenants",
|
||||||
|
column: "OrganizationId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Tenants_Organizations_OrganizationId",
|
||||||
|
table: "Tenants",
|
||||||
|
column: "OrganizationId",
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Tenants_Organizations_OrganizationId",
|
||||||
|
table: "Tenants");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Tenants_OrganizationId",
|
||||||
|
table: "Tenants");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "OrganizationId",
|
||||||
|
table: "Tenants");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "AspNetUsers",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,136 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Promoter_And_PMC_In_Project_Table_As_Forgin_Key : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Employees_Tenants_TenantId",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "PMCId",
|
||||||
|
table: "Projects",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "PromoterId",
|
||||||
|
table: "Projects",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "Employees",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)")
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Projects",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("85bf587b-7ca9-4685-b77c-d817f5847e85"),
|
||||||
|
columns: new[] { "PMCId", "PromoterId" },
|
||||||
|
values: new object[] { new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"), new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea") });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Projects_PMCId",
|
||||||
|
table: "Projects",
|
||||||
|
column: "PMCId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Projects_PromoterId",
|
||||||
|
table: "Projects",
|
||||||
|
column: "PromoterId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Employees_Tenants_TenantId",
|
||||||
|
table: "Employees",
|
||||||
|
column: "TenantId",
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Projects_Organizations_PMCId",
|
||||||
|
table: "Projects",
|
||||||
|
column: "PMCId",
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Projects_Organizations_PromoterId",
|
||||||
|
table: "Projects",
|
||||||
|
column: "PromoterId",
|
||||||
|
principalTable: "Organizations",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Employees_Tenants_TenantId",
|
||||||
|
table: "Employees");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Projects_Organizations_PMCId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Projects_Organizations_PromoterId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Projects_PMCId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Projects_PromoterId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PMCId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PromoterId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "Employees",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)",
|
||||||
|
oldNullable: true)
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Employees_Tenants_TenantId",
|
||||||
|
table: "Employees",
|
||||||
|
column: "TenantId",
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6151
Marco.Pms.DataAccess/Migrations/20250918112243_Added_IsActive_In_ProjectServiceMapping_Table.Designer.cs
generated
Normal file
6151
Marco.Pms.DataAccess/Migrations/20250918112243_Added_IsActive_In_ProjectServiceMapping_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_IsActive_In_ProjectServiceMapping_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "ProjectServiceMappings",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsActive",
|
||||||
|
table: "ProjectServiceMappings");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6119
Marco.Pms.DataAccess/Migrations/20250920041347_Removed_TenantId_From_MPIN_And_OTP.Designer.cs
generated
Normal file
6119
Marco.Pms.DataAccess/Migrations/20250920041347_Removed_TenantId_From_MPIN_And_OTP.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,85 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Removed_TenantId_From_MPIN_And_OTP : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_MPINDetails_Tenants_TenantId",
|
||||||
|
table: "MPINDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_OTPDetails_Tenants_TenantId",
|
||||||
|
table: "OTPDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_OTPDetails_TenantId",
|
||||||
|
table: "OTPDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_MPINDetails_TenantId",
|
||||||
|
table: "MPINDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "OTPDetails");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "MPINDetails");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "OTPDetails",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "TenantId",
|
||||||
|
table: "MPINDetails",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_OTPDetails_TenantId",
|
||||||
|
table: "OTPDetails",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_MPINDetails_TenantId",
|
||||||
|
table: "MPINDetails",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_MPINDetails_Tenants_TenantId",
|
||||||
|
table: "MPINDetails",
|
||||||
|
column: "TenantId",
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_OTPDetails_Tenants_TenantId",
|
||||||
|
table: "OTPDetails",
|
||||||
|
column: "TenantId",
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6133
Marco.Pms.DataAccess/Migrations/20250920105816_Added_Service_FK_In_ProjectAllocation.Designer.cs
generated
Normal file
6133
Marco.Pms.DataAccess/Migrations/20250920105816_Added_Service_FK_In_ProjectAllocation.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
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Service_FK_In_ProjectAllocation : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ServiceId",
|
||||||
|
table: "ProjectAllocations",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "logoImage",
|
||||||
|
table: "Organizations",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "Organizations",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||||
|
column: "logoImage",
|
||||||
|
value: null);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectAllocations_ServiceId",
|
||||||
|
table: "ProjectAllocations",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ProjectAllocations_ServiceMasters_ServiceId",
|
||||||
|
table: "ProjectAllocations",
|
||||||
|
column: "ServiceId",
|
||||||
|
principalTable: "ServiceMasters",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ProjectAllocations_ServiceMasters_ServiceId",
|
||||||
|
table: "ProjectAllocations");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ProjectAllocations_ServiceId",
|
||||||
|
table: "ProjectAllocations");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ServiceId",
|
||||||
|
table: "ProjectAllocations");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "logoImage",
|
||||||
|
table: "Organizations");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6207
Marco.Pms.DataAccess/Migrations/20250924103942_Added_Assigned_By_In_Mapping_Tables.Designer.cs
generated
Normal file
6207
Marco.Pms.DataAccess/Migrations/20250924103942_Added_Assigned_By_In_Mapping_Tables.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_Assigned_By_In_Mapping_Tables : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "AssignedById",
|
||||||
|
table: "TenantOrgMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("08dd8b35-d98b-44f1-896d-12aec3f035aa"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "AssignedById",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("08dd8b35-d98b-44f1-896d-12aec3f035aa"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TenantOrgMappings_AssignedById",
|
||||||
|
table: "TenantOrgMappings",
|
||||||
|
column: "AssignedById");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ProjectOrgMappings_AssignedById",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
column: "AssignedById");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ProjectOrgMappings_Employees_AssignedById",
|
||||||
|
table: "ProjectOrgMappings",
|
||||||
|
column: "AssignedById",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_TenantOrgMappings_Employees_AssignedById",
|
||||||
|
table: "TenantOrgMappings",
|
||||||
|
column: "AssignedById",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ProjectOrgMappings_Employees_AssignedById",
|
||||||
|
table: "ProjectOrgMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_TenantOrgMappings_Employees_AssignedById",
|
||||||
|
table: "TenantOrgMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_TenantOrgMappings_AssignedById",
|
||||||
|
table: "TenantOrgMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ProjectOrgMappings_AssignedById",
|
||||||
|
table: "ProjectOrgMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "AssignedById",
|
||||||
|
table: "TenantOrgMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "AssignedById",
|
||||||
|
table: "ProjectOrgMappings");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6197
Marco.Pms.DataAccess/Migrations/20250924113835_Deleted_Organization_Types.Designer.cs
generated
Normal file
6197
Marco.Pms.DataAccess/Migrations/20250924113835_Deleted_Organization_Types.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,40 @@
|
|||||||
|
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 Deleted_Organization_Types : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "OrgTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("743806fe-d991-4079-b223-e4e2da44f435"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "OrgTypeMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b1877a3b-8832-47b1-bbe3-dc7e98672f49"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "OrgTypeMasters",
|
||||||
|
columns: new[] { "Id", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("743806fe-d991-4079-b223-e4e2da44f435"), "Tenant" },
|
||||||
|
{ new Guid("b1877a3b-8832-47b1-bbe3-dc7e98672f49"), "PMC" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
6205
Marco.Pms.DataAccess/Migrations/20250927091428_Added_Forgin_Key_For_Approver.Designer.cs
generated
Normal file
6205
Marco.Pms.DataAccess/Migrations/20250927091428_Added_Forgin_Key_For_Approver.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,92 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Forgin_Key_For_Approver : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_EmployeeID",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "EmployeeID",
|
||||||
|
table: "Attendes",
|
||||||
|
newName: "EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "ApprovedBy",
|
||||||
|
table: "Attendes",
|
||||||
|
newName: "ApprovedById");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Attendes_EmployeeID",
|
||||||
|
table: "Attendes",
|
||||||
|
newName: "IX_Attendes_EmployeeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Attendes_ApprovedById",
|
||||||
|
table: "Attendes",
|
||||||
|
column: "ApprovedById");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_ApprovedById",
|
||||||
|
table: "Attendes",
|
||||||
|
column: "ApprovedById",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_EmployeeId",
|
||||||
|
table: "Attendes",
|
||||||
|
column: "EmployeeId",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_ApprovedById",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_EmployeeId",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Attendes_ApprovedById",
|
||||||
|
table: "Attendes");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "EmployeeId",
|
||||||
|
table: "Attendes",
|
||||||
|
newName: "EmployeeID");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "ApprovedById",
|
||||||
|
table: "Attendes",
|
||||||
|
newName: "ApprovedBy");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Attendes_EmployeeId",
|
||||||
|
table: "Attendes",
|
||||||
|
newName: "IX_Attendes_EmployeeID");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Attendes_Employees_EmployeeID",
|
||||||
|
table: "Attendes",
|
||||||
|
column: "EmployeeID",
|
||||||
|
principalTable: "Employees",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
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"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -20,18 +20,21 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
var mongoDB = client.GetDatabase(mongoUrl.DatabaseName); // Your MongoDB Database name
|
var mongoDB = client.GetDatabase(mongoUrl.DatabaseName); // Your MongoDB Database name
|
||||||
_collection = mongoDB.GetCollection<EmployeePermissionMongoDB>("EmployeeProfile");
|
_collection = mongoDB.GetCollection<EmployeePermissionMongoDB>("EmployeeProfile");
|
||||||
}
|
}
|
||||||
public async Task<bool> AddApplicationRoleToCache(Guid employeeId, List<string> newRoleIds, List<string> newPermissionIds)
|
public async Task<bool> AddApplicationRoleToCache(Guid employeeId, List<string> newRoleIds, List<string> newPermissionIds, Guid tenantId)
|
||||||
{
|
{
|
||||||
|
|
||||||
// 2. Perform database queries concurrently for better performance.
|
// 2. Perform database queries concurrently for better performance.
|
||||||
var employeeIdString = employeeId.ToString();
|
var employeeIdString = employeeId.ToString();
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
// 5. Build a single, efficient update operation.
|
// 5. Build a single, efficient update operation.
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeIdString);
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeIdString);
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.AddToSetEach(e => e.ApplicationRoleIds, newRoleIds)
|
.AddToSetEach(e => e.ApplicationRoleIds, newRoleIds)
|
||||||
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
||||||
|
.Set(r => r.TenantId, tenantIdString)
|
||||||
.AddToSetEach(e => e.PermissionIds, newPermissionIds);
|
.AddToSetEach(e => e.PermissionIds, newPermissionIds);
|
||||||
|
|
||||||
var options = new UpdateOptions { IsUpsert = true };
|
var options = new UpdateOptions { IsUpsert = true };
|
||||||
@ -44,14 +47,17 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
// The operation is successful if an existing document was modified OR a new one was created.
|
// The operation is successful if an existing document was modified OR a new one was created.
|
||||||
return result.IsAcknowledged && (result.ModifiedCount > 0 || result.UpsertedId != null);
|
return result.IsAcknowledged && (result.ModifiedCount > 0 || result.UpsertedId != null);
|
||||||
}
|
}
|
||||||
public async Task<bool> AddProjectsToCache(Guid employeeId, List<Guid> projectIds)
|
public async Task<bool> AddProjectsToCache(Guid employeeId, List<Guid> projectIds, Guid tenantId)
|
||||||
{
|
{
|
||||||
var newprojectIds = projectIds.Select(p => p.ToString()).ToList();
|
var newprojectIds = projectIds.Select(p => p.ToString()).ToList();
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
||||||
|
.Set(r => r.TenantId, tenantIdString)
|
||||||
.AddToSetEach(e => e.ProjectIds, newprojectIds);
|
.AddToSetEach(e => e.ProjectIds, newprojectIds);
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update, new UpdateOptions { IsUpsert = true });
|
var result = await _collection.UpdateOneAsync(filter, update, new UpdateOptions { IsUpsert = true });
|
||||||
@ -62,10 +68,12 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
await InitializeCollectionAsync();
|
await InitializeCollectionAsync();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<List<Guid>> GetProjectsFromCache(Guid employeeId)
|
public async Task<List<Guid>> GetProjectsFromCache(Guid employeeId, Guid tenantId)
|
||||||
{
|
{
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var result = await _collection
|
var result = await _collection
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
@ -79,10 +87,12 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return projectIds;
|
return projectIds;
|
||||||
}
|
}
|
||||||
public async Task<List<Guid>> GetPermissionsFromCache(Guid employeeId)
|
public async Task<List<Guid>> GetPermissionsFromCache(Guid employeeId, Guid tenantId)
|
||||||
{
|
{
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var result = await _collection
|
var result = await _collection
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
@ -96,10 +106,13 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return permissionIds;
|
return permissionIds;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllProjectIdsFromCache(Guid employeeId)
|
public async Task<bool> ClearAllProjectIdsFromCache(Guid employeeId, Guid tenantId)
|
||||||
{
|
{
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
||||||
.Eq(e => e.Id, employeeId.ToString());
|
.Eq(e => e.Id, employeeId.ToString());
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Set(e => e.ProjectIds, new List<string>());
|
.Set(e => e.ProjectIds, new List<string>());
|
||||||
@ -125,18 +138,25 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllProjectIdsByPermissionIdFromCache(Guid permissionId)
|
public async Task<bool> ClearAllProjectIdsByPermissionIdFromCache(Guid permissionId, Guid tenantId)
|
||||||
{
|
{
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.AnyEq(e => e.PermissionIds, permissionId.ToString());
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.AnyEq(e => e.PermissionIds, permissionId.ToString());
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update.Set(e => e.ProjectIds, new List<string>());
|
var update = Builders<EmployeePermissionMongoDB>.Update.Set(e => e.ProjectIds, new List<string>());
|
||||||
|
|
||||||
var result = await _collection.UpdateManyAsync(filter, update).ConfigureAwait(false);
|
var result = await _collection.UpdateManyAsync(filter, update).ConfigureAwait(false);
|
||||||
return result.IsAcknowledged && result.ModifiedCount > 0;
|
return result.IsAcknowledged && result.ModifiedCount > 0;
|
||||||
}
|
}
|
||||||
public async Task<bool> RemoveRoleIdFromCache(Guid employeeId, Guid roleId)
|
public async Task<bool> RemoveRoleIdFromCache(Guid employeeId, Guid roleId, Guid tenantId)
|
||||||
{
|
{
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
||||||
.Eq(e => e.Id, employeeId.ToString());
|
.Eq(e => e.Id, employeeId.ToString());
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Pull(e => e.ApplicationRoleIds, roleId.ToString());
|
.Pull(e => e.ApplicationRoleIds, roleId.ToString());
|
||||||
@ -151,10 +171,13 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllPermissionIdsByEmployeeIDFromCache(Guid employeeId)
|
public async Task<bool> ClearAllPermissionIdsByEmployeeIDFromCache(Guid employeeId, Guid tenantId)
|
||||||
{
|
{
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
||||||
.Eq(e => e.Id, employeeId.ToString());
|
.Eq(e => e.Id, employeeId.ToString());
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Set(e => e.PermissionIds, new List<string>());
|
.Set(e => e.PermissionIds, new List<string>());
|
||||||
@ -189,11 +212,56 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllEmployeesFromCacheByEmployeeIds(List<string> employeeIds)
|
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)
|
||||||
|
{
|
||||||
|
var tenantIdString = tenantId.ToString();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.In(x => x.Id, employeeIds);
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.In(x => x.Id, employeeIds);
|
||||||
|
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
||||||
|
|
||||||
var result = await _collection.DeleteManyAsync(filter);
|
var result = await _collection.DeleteManyAsync(filter);
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
using Marco.Pms.DataAccess.Data;
|
using Marco.Pms.DataAccess.Data;
|
||||||
using Marco.Pms.Model.Master;
|
using Marco.Pms.Model.Master;
|
||||||
|
using Marco.Pms.Model.MongoDBModels;
|
||||||
using Marco.Pms.Model.MongoDBModels.Masters;
|
using Marco.Pms.Model.MongoDBModels.Masters;
|
||||||
using Marco.Pms.Model.MongoDBModels.Project;
|
using Marco.Pms.Model.MongoDBModels.Project;
|
||||||
|
using Marco.Pms.Model.OrganizationModel;
|
||||||
using Marco.Pms.Model.Projects;
|
using Marco.Pms.Model.Projects;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
@ -55,7 +57,7 @@ namespace Marco.Pms.Helpers
|
|||||||
var indexModel = new CreateIndexModel<ProjectMongoDB>(indexKeys, indexOptions);
|
var indexModel = new CreateIndexModel<ProjectMongoDB>(indexKeys, indexOptions);
|
||||||
await _projectCollection.Indexes.CreateOneAsync(indexModel);
|
await _projectCollection.Indexes.CreateOneAsync(indexModel);
|
||||||
}
|
}
|
||||||
public async Task<bool> UpdateProjectDetailsOnlyToCache(Project project, StatusMaster projectStatus)
|
public async Task<bool> UpdateProjectDetailsOnlyToCache(Project project, StatusMaster projectStatus, Organization promotor, Organization pmc)
|
||||||
{
|
{
|
||||||
// Build the update definition
|
// Build the update definition
|
||||||
var updates = Builders<ProjectMongoDB>.Update.Combine(
|
var updates = Builders<ProjectMongoDB>.Update.Combine(
|
||||||
@ -67,6 +69,26 @@ namespace Marco.Pms.Helpers
|
|||||||
Id = projectStatus.Id.ToString(),
|
Id = projectStatus.Id.ToString(),
|
||||||
Status = projectStatus.Status
|
Status = projectStatus.Status
|
||||||
}),
|
}),
|
||||||
|
Builders<ProjectMongoDB>.Update.Set(r => r.Promoter, new OrganizationMongoDB
|
||||||
|
{
|
||||||
|
Id = promotor.Id.ToString(),
|
||||||
|
Name = promotor.Name,
|
||||||
|
ContactPerson = promotor.ContactPerson,
|
||||||
|
Email = promotor.Email,
|
||||||
|
Address = promotor.Address,
|
||||||
|
ContactNumber = promotor.ContactNumber,
|
||||||
|
SPRID = promotor.SPRID
|
||||||
|
}),
|
||||||
|
Builders<ProjectMongoDB>.Update.Set(r => r.PMC, new OrganizationMongoDB
|
||||||
|
{
|
||||||
|
Id = pmc.Id.ToString(),
|
||||||
|
Name = pmc.Name,
|
||||||
|
ContactPerson = pmc.ContactPerson,
|
||||||
|
Email = pmc.Email,
|
||||||
|
Address = promotor.Address,
|
||||||
|
ContactNumber = promotor.ContactNumber,
|
||||||
|
SPRID = promotor.SPRID
|
||||||
|
}),
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.StartDate, project.StartDate),
|
Builders<ProjectMongoDB>.Update.Set(r => r.StartDate, project.StartDate),
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.EndDate, project.EndDate),
|
Builders<ProjectMongoDB>.Update.Set(r => r.EndDate, project.EndDate),
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.ContactPerson, project.ContactPerson)
|
Builders<ProjectMongoDB>.Update.Set(r => r.ContactPerson, project.ContactPerson)
|
||||||
@ -407,10 +429,19 @@ namespace Marco.Pms.Helpers
|
|||||||
|
|
||||||
#region=================================================================== WorkItem Cache Helper ===================================================================
|
#region=================================================================== WorkItem Cache Helper ===================================================================
|
||||||
|
|
||||||
public async Task<List<WorkItemMongoDB>> GetWorkItemsByWorkAreaIdsFromCache(List<Guid> workAreaIds)
|
public async Task<List<WorkItemMongoDB>> GetWorkItemsByWorkAreaIdsFromCache(List<Guid> workAreaIds, List<Guid> serviceIds)
|
||||||
{
|
{
|
||||||
var stringWorkAreaIds = workAreaIds.Select(wa => wa.ToString()).ToList();
|
var stringWorkAreaIds = workAreaIds.Select(wa => wa.ToString()).ToList();
|
||||||
var filter = Builders<WorkItemMongoDB>.Filter.In(w => w.WorkAreaId, stringWorkAreaIds);
|
|
||||||
|
var filterBuilder = Builders<WorkItemMongoDB>.Filter;
|
||||||
|
var filter = filterBuilder.Empty;
|
||||||
|
|
||||||
|
filter &= filterBuilder.In(w => w.WorkAreaId, stringWorkAreaIds);
|
||||||
|
if (serviceIds.Any())
|
||||||
|
{
|
||||||
|
var stringServiceIds = serviceIds.Select(s => s.ToString()).ToList();
|
||||||
|
filter &= filterBuilder.In(w => w.ActivityMaster!.ActivityGroupMaster!.Service!.Id, stringServiceIds);
|
||||||
|
}
|
||||||
|
|
||||||
var workItems = await _taskCollection // replace with your actual collection name
|
var workItems = await _taskCollection // replace with your actual collection name
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
@ -449,9 +480,17 @@ namespace Marco.Pms.Helpers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public async Task<List<WorkItemMongoDB>> GetWorkItemDetailsByWorkAreaFromCache(Guid workAreaId)
|
public async Task<List<WorkItemMongoDB>> GetWorkItemDetailsByWorkAreaFromCache(Guid workAreaId, List<Guid> serviceIds)
|
||||||
{
|
{
|
||||||
var filter = Builders<WorkItemMongoDB>.Filter.Eq(p => p.WorkAreaId, workAreaId.ToString());
|
var filterBuilder = Builders<WorkItemMongoDB>.Filter;
|
||||||
|
var filter = filterBuilder.Empty;
|
||||||
|
|
||||||
|
filter &= filterBuilder.Eq(p => p.WorkAreaId, workAreaId.ToString());
|
||||||
|
if (serviceIds.Any())
|
||||||
|
{
|
||||||
|
var stringServiceIds = serviceIds.Select(s => s.ToString()).ToList();
|
||||||
|
filter &= filterBuilder.In(w => w.ActivityMaster!.ActivityGroupMaster!.Service!.Id, stringServiceIds);
|
||||||
|
}
|
||||||
|
|
||||||
var options = new UpdateOptions { IsUpsert = true };
|
var options = new UpdateOptions { IsUpsert = true };
|
||||||
var workItems = await _taskCollection
|
var workItems = await _taskCollection
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Marco.Pms.Model.MongoDBModels.Utility;
|
using Marco.Pms.Model.MongoDBModels;
|
||||||
|
using Marco.Pms.Model.MongoDBModels.Utility;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using MongoDB.Bson;
|
using MongoDB.Bson;
|
||||||
@ -25,8 +26,30 @@ namespace Marco.Pms.Helpers.Utility
|
|||||||
#region =================================================================== Update Log Helper Functions ===================================================================
|
#region =================================================================== Update Log Helper Functions ===================================================================
|
||||||
public async Task PushToUpdateLogsAsync(UpdateLogsObject oldObject, string collectionName)
|
public async Task PushToUpdateLogsAsync(UpdateLogsObject oldObject, string collectionName)
|
||||||
{
|
{
|
||||||
var collection = _mongoDatabase.GetCollection<UpdateLogsObject>(collectionName);
|
try
|
||||||
await collection.InsertOneAsync(oldObject);
|
{
|
||||||
|
var collection = _mongoDatabase.GetCollection<UpdateLogsObject>(collectionName);
|
||||||
|
await collection.InsertOneAsync(oldObject);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Exception occured while saving object of update logs in collection: {Collection}", collectionName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public async Task PushListToUpdateLogsAsync(List<UpdateLogsObject> oldObjects, string collectionName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var collection = _mongoDatabase.GetCollection<UpdateLogsObject>(collectionName);
|
||||||
|
if (oldObjects.Any())
|
||||||
|
{
|
||||||
|
await collection.InsertManyAsync(oldObjects);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Exception occured while saving list of update logs in collection: {Collection}", collectionName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<UpdateLogsObject>> GetFromUpdateLogsByEntityIdAsync(Guid entityId, string collectionName)
|
public async Task<List<UpdateLogsObject>> GetFromUpdateLogsByEntityIdAsync(Guid entityId, string collectionName)
|
||||||
@ -124,5 +147,86 @@ namespace Marco.Pms.Helpers.Utility
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region =================================================================== NotificatioBody Helper Functions ===================================================================
|
||||||
|
|
||||||
|
public async Task AddNotificationAsync(NotificationMongoDB notification)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var collection = _mongoDatabase.GetCollection<NotificationMongoDB>("NotificatioBody");
|
||||||
|
|
||||||
|
var indexKeys = Builders<NotificationMongoDB>.IndexKeys
|
||||||
|
.Ascending(doc => doc.TenantId)
|
||||||
|
.Ascending(doc => doc.Name);
|
||||||
|
|
||||||
|
// Define index options with unique constraint
|
||||||
|
var indexOptions = new CreateIndexOptions { Unique = true };
|
||||||
|
|
||||||
|
// Create the index model
|
||||||
|
var indexModel = new CreateIndexModel<NotificationMongoDB>(indexKeys, indexOptions);
|
||||||
|
|
||||||
|
// Create the index on the collection (this operation is idempotent)
|
||||||
|
collection.Indexes.CreateOne(indexModel);
|
||||||
|
|
||||||
|
await collection.InsertOneAsync(notification);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Exception occured while adding the Notification body {NotificationName} for tenant {TenantId}", notification.Name, notification.TenantId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<NotificationMongoDB> GetNotificationBodyAsync(string name, Guid tenantId)
|
||||||
|
{
|
||||||
|
var rootTenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26");
|
||||||
|
NotificationMongoDB? result = null;
|
||||||
|
NotificationMongoDB? defaultNotification = new NotificationMongoDB
|
||||||
|
{
|
||||||
|
Name = "default",
|
||||||
|
Title = "Error: Something Went Wrong",
|
||||||
|
Body = " An unexpected error occurred. Please try again. If the problem persists, contact support",
|
||||||
|
Parameters = "",
|
||||||
|
TenantId = rootTenantId
|
||||||
|
};
|
||||||
|
|
||||||
|
var collection = _mongoDatabase.GetCollection<NotificationMongoDB>("NotificatioBody");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var filter = Builders<NotificationMongoDB>.Filter.And(
|
||||||
|
Builders<NotificationMongoDB>.Filter.Eq(n => n.Name, name),
|
||||||
|
Builders<NotificationMongoDB>.Filter.Eq(n => n.TenantId, tenantId)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
result = await collection
|
||||||
|
.Find(filter)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Exception occured while fetching the Notification body {NotificationName} for tenant {TenantId}", name, tenantId);
|
||||||
|
}
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var filter = Builders<NotificationMongoDB>.Filter.And(
|
||||||
|
Builders<NotificationMongoDB>.Filter.Eq(n => n.Name, name),
|
||||||
|
Builders<NotificationMongoDB>.Filter.Eq(n => n.TenantId, rootTenantId)
|
||||||
|
|
||||||
|
);
|
||||||
|
result = await collection.Find(filter).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Exception occured while fetching the Notification body {NotificationName} for tenant {TenantId}", name, rootTenantId);
|
||||||
|
return defaultNotification;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using Marco.Pms.Model.Dtos.Attendance;
|
||||||
using Marco.Pms.Model.Dtos.Attendance;
|
|
||||||
using Marco.Pms.Model.Employees;
|
using Marco.Pms.Model.Employees;
|
||||||
using Marco.Pms.Model.Utilities;
|
using Marco.Pms.Model.Utilities;
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Marco.Pms.Model.AttendanceModule
|
namespace Marco.Pms.Model.AttendanceModule
|
||||||
{
|
{
|
||||||
@ -10,9 +10,11 @@ namespace Marco.Pms.Model.AttendanceModule
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string Comment { get; set; } = string.Empty;
|
public string Comment { get; set; } = string.Empty;
|
||||||
public Guid EmployeeID { get; set; }
|
public Guid EmployeeId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[ForeignKey("EmployeeId")]
|
||||||
|
[ValidateNever]
|
||||||
|
public Employee? Employee { get; set; }
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public Guid ProjectID { get; set; }
|
public Guid ProjectID { get; set; }
|
||||||
|
|
||||||
@ -22,9 +24,17 @@ namespace Marco.Pms.Model.AttendanceModule
|
|||||||
public bool IsApproved { get; set; }
|
public bool IsApproved { get; set; }
|
||||||
public ATTENDANCE_MARK_TYPE Activity { get; set; }
|
public ATTENDANCE_MARK_TYPE Activity { get; set; }
|
||||||
|
|
||||||
public Guid? ApprovedBy { get; set; }
|
public Guid? ApprovedById { get; set; }
|
||||||
[ForeignKey("EmployeeID")]
|
|
||||||
|
[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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
namespace Marco.Pms.Model.Authentication
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Authentication
|
|
||||||
{
|
{
|
||||||
public class MPINDetails : TenantRelation
|
public class MPINDetails
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
namespace Marco.Pms.Model.Authentication
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Authentication
|
|
||||||
{
|
{
|
||||||
public class OTPDetails : TenantRelation
|
public class OTPDetails
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
|
|||||||
41
Marco.Pms.Model/Collection/Invoice.cs
Normal file
41
Marco.Pms.Model/Collection/Invoice.cs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
using Marco.Pms.Model.Employees;
|
||||||
|
using Marco.Pms.Model.Projects;
|
||||||
|
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 string InvoiceNumber { get; set; } = default!;
|
||||||
|
public string? EInvoiceNumber { get; set; }
|
||||||
|
public Guid ProjectId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("ProjectId")]
|
||||||
|
public Project? Project { 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
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,6 +1,6 @@
|
|||||||
using System.ComponentModel;
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
namespace Marco.Pms.Model.Directory
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System.ComponentModel;
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
namespace Marco.Pms.Model.Directory
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,8 +2,9 @@
|
|||||||
{
|
{
|
||||||
public class CreateActivityMasterDto
|
public class CreateActivityMasterDto
|
||||||
{
|
{
|
||||||
public string? ActivityName { get; set; }
|
public required Guid ActivityGroupId { get; set; }
|
||||||
public string? UnitOfMeasurement { get; set; }
|
public required string ActivityName { get; set; }
|
||||||
|
public required string UnitOfMeasurement { get; set; }
|
||||||
public List<CreateCheckListDto>? CheckList { get; set; }
|
public List<CreateCheckListDto>? CheckList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
public class CreateCheckListDto
|
public class CreateCheckListDto
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public string? Description { get; set; }
|
public required string Description { get; set; }
|
||||||
public bool IsMandatory { get; set; }
|
public required bool IsMandatory { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ namespace Marco.Pms.Model.Dtos.Attendance
|
|||||||
public ATTENDANCE_MARK_TYPE Action { get; set; }
|
public ATTENDANCE_MARK_TYPE Action { get; set; }
|
||||||
|
|
||||||
public FileUploadModel? Image { get; set; }
|
public FileUploadModel? Image { get; set; }
|
||||||
|
public string DeviceToken { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ATTENDANCE_MARK_TYPE
|
public enum ATTENDANCE_MARK_TYPE
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class LoginDto
|
public class LoginDto
|
||||||
{
|
{
|
||||||
public string? Username { get; set; }
|
public required string Username { get; set; }
|
||||||
public string? Password { get; set; }
|
public required string Password { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Authentication
|
namespace Marco.Pms.Model.Dtos.Authentication
|
||||||
{
|
{
|
||||||
public class LogoutDto
|
public class LogoutDto
|
||||||
{ public string? RefreshToken { get; set; }
|
{
|
||||||
|
public required string RefreshToken { get; set; }
|
||||||
|
public string? FcmToken { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class RefreshTokenDto
|
public class RefreshTokenDto
|
||||||
{
|
{
|
||||||
public string? Token { get; set; }
|
public required string Token { get; set; }
|
||||||
public string? RefreshToken { get; set; }
|
public required string RefreshToken { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
{
|
{
|
||||||
public class VerifyMPINDto
|
public class VerifyMPINDto
|
||||||
{
|
{
|
||||||
public Guid EmployeeId { get; set; }
|
public required Guid EmployeeId { get; set; }
|
||||||
public string? MPIN { get; set; }
|
public required string MPIN { get; set; }
|
||||||
public string? MPINToken { get; set; }
|
public required string MPINToken { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
Marco.Pms.Model/Dtos/Collection/InvoiceCommentDto.cs
Normal file
8
Marco.Pms.Model/Dtos/Collection/InvoiceCommentDto.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Collection
|
||||||
|
{
|
||||||
|
public class InvoiceCommentDto
|
||||||
|
{
|
||||||
|
public required string Comment { get; set; }
|
||||||
|
public required Guid InvoiceId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Marco.Pms.Model/Dtos/Collection/InvoiceDto.cs
Normal file
20
Marco.Pms.Model/Dtos/Collection/InvoiceDto.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Dtos.Collection
|
||||||
|
{
|
||||||
|
public class InvoiceDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Title { get; set; }
|
||||||
|
public string? Description { get; set; }
|
||||||
|
public required string InvoiceNumber { get; set; }
|
||||||
|
public string? EInvoiceNumber { get; set; }
|
||||||
|
public required Guid ProjectId { get; set; }
|
||||||
|
public required DateTime InvoiceDate { get; set; }
|
||||||
|
public required DateTime ClientSubmitedDate { get; set; }
|
||||||
|
public required DateTime ExceptedPaymentDate { get; set; }
|
||||||
|
public double BasicAmount { get; set; }
|
||||||
|
public double TaxAmount { get; set; }
|
||||||
|
public List<FileUploadModel>? Attachments { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Collection
|
||||||
|
{
|
||||||
|
public class PaymentAdjustmentHeadDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public string? Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
13
Marco.Pms.Model/Dtos/Collection/ReceivedInvoicePaymentDto.cs
Normal file
13
Marco.Pms.Model/Dtos/Collection/ReceivedInvoicePaymentDto.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Collection
|
||||||
|
{
|
||||||
|
public class ReceivedInvoicePaymentDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required Guid InvoiceId { get; set; }
|
||||||
|
public required DateTime PaymentReceivedDate { get; set; }
|
||||||
|
public required string TransactionId { get; set; }
|
||||||
|
public required Guid PaymentAdjustmentHeadId { get; set; }
|
||||||
|
public required double Amount { get; set; }
|
||||||
|
public required string Comment { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@
|
|||||||
{
|
{
|
||||||
public string? Label { get; set; }
|
public string? Label { get; set; }
|
||||||
public string? EmailAddress { get; set; }
|
public string? EmailAddress { get; set; }
|
||||||
|
public bool IsPrimary { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,5 +4,6 @@
|
|||||||
{
|
{
|
||||||
public string? Label { get; set; }
|
public string? Label { get; set; }
|
||||||
public string? PhoneNumber { get; set; }
|
public string? PhoneNumber { get; set; }
|
||||||
|
public bool IsPrimary { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,10 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.DocumentManager
|
||||||
|
{
|
||||||
|
public class CreateDocumentCategoryDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Description { get; set; }
|
||||||
|
public required Guid EntityTypeId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.DocumentManager
|
||||||
|
{
|
||||||
|
public class CreateDocumentTypeDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; } = string.Empty;
|
||||||
|
public string? RegexExpression { get; set; }
|
||||||
|
public required string AllowedContentType { get; set; }
|
||||||
|
public required double MaxSizeAllowedInMB { get; set; } = 2;
|
||||||
|
public bool IsValidationRequired { get; set; }
|
||||||
|
public bool IsMandatory { get; set; }
|
||||||
|
public required Guid DocumentCategoryId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,42 +3,38 @@
|
|||||||
public class CreateUserDto
|
public class CreateUserDto
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public string? FirstName { get; set; }
|
public required string FirstName { get; set; }
|
||||||
public string? LastName { get; set; }
|
public string? LastName { get; set; }
|
||||||
public string? MiddleName { get; set; }
|
public string? MiddleName { get; set; }
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
|
|
||||||
public string? Gender { get; set; }
|
public required string Gender { get; set; }
|
||||||
public string? BirthDate { get; set; }
|
public required DateTime BirthDate { get; set; }
|
||||||
public string? JoiningDate { get; set; }
|
public required DateTime JoiningDate { get; set; }
|
||||||
|
|
||||||
public string? PermanentAddress { get; set; }
|
public required string PermanentAddress { get; set; }
|
||||||
public string? CurrentAddress { get; set; }
|
public required string CurrentAddress { get; set; }
|
||||||
public string? PhoneNumber { get; set; }
|
public required string PhoneNumber { get; set; }
|
||||||
|
|
||||||
public string? EmergencyPhoneNumber { get; set; }
|
public string? EmergencyPhoneNumber { get; set; }
|
||||||
public string? EmergencyContactPerson { get; set; }
|
public string? EmergencyContactPerson { get; set; }
|
||||||
|
public Guid JobRoleId { get; set; }
|
||||||
public string? AadharNumber { get; set; }
|
public required Guid OrganizationId { get; set; }
|
||||||
|
public required bool HasApplicationAccess { get; set; }
|
||||||
public string? PanNumber { get; set; }
|
|
||||||
|
|
||||||
//public IFormFile? Photo { get; set; } // To store the captured photo
|
|
||||||
//public List<IFormFile>? Documents { get; set; }
|
|
||||||
|
|
||||||
public Guid? JobRoleId { get; set; }
|
|
||||||
|
|
||||||
// public int TenantId { get; set; }
|
|
||||||
}
|
}
|
||||||
public class MobileUserManageDto
|
public class MobileUserManageDto
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public string FirstName { get; set; } = string.Empty;
|
public required string FirstName { get; set; }
|
||||||
public string? LastName { get; set; }
|
public required string LastName { get; set; }
|
||||||
public string PhoneNumber { get; set; } = string.Empty;
|
public required string PhoneNumber { get; set; }
|
||||||
public string? Gender { get; set; }
|
public string? Email { get; set; }
|
||||||
|
public required DateTime JoiningDate { get; set; }
|
||||||
|
public required string Gender { get; set; }
|
||||||
public Guid JobRoleId { get; set; }
|
public Guid JobRoleId { get; set; }
|
||||||
public string? ProfileImage { get; set; }
|
public string? ProfileImage { get; set; }
|
||||||
|
public required Guid OrganizationId { get; set; }
|
||||||
|
public required bool HasApplicationAccess { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
10
Marco.Pms.Model/Dtos/Master/ActivityGroupDto.cs
Normal file
10
Marco.Pms.Model/Dtos/Master/ActivityGroupDto.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Master
|
||||||
|
{
|
||||||
|
public class ActivityGroupDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Description { get; set; }
|
||||||
|
public required Guid ServiceId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class CreateContactCategoryDto
|
public class CreateContactCategoryDto
|
||||||
{
|
{
|
||||||
public string? Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public string? Description { get; set; }
|
public required string Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class CreateContactTagDto
|
public class CreateContactTagDto
|
||||||
{
|
{
|
||||||
public string? Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public string? Description { get; set; }
|
public required string Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public required bool NoOfPersonsRequired { get; set; }
|
public required bool NoOfPersonsRequired { get; set; }
|
||||||
|
public required bool IsAttachmentRequried { get; set; }
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
Marco.Pms.Model/Dtos/Master/ServiceMasterDto.cs
Normal file
9
Marco.Pms.Model/Dtos/Master/ServiceMasterDto.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Master
|
||||||
|
{
|
||||||
|
public class ServiceMasterDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,8 +2,8 @@
|
|||||||
{
|
{
|
||||||
public class UpdateContactCategoryDto
|
public class UpdateContactCategoryDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public required 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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
public class UpdateContactTagDto
|
public class UpdateContactTagDto
|
||||||
{
|
{
|
||||||
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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
Marco.Pms.Model/Dtos/Organization/AssignOrganizationDto.cs
Normal file
11
Marco.Pms.Model/Dtos/Organization/AssignOrganizationDto.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Organization
|
||||||
|
{
|
||||||
|
public class AssignOrganizationDto
|
||||||
|
{
|
||||||
|
public required Guid ProjectId { get; set; }
|
||||||
|
public required Guid OrganizationId { get; set; }
|
||||||
|
public Guid? ParentOrganizationId { get; set; }
|
||||||
|
public required List<Guid> ServiceIds { get; set; }
|
||||||
|
public required Guid OrganizationTypeId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
13
Marco.Pms.Model/Dtos/Organization/CreateOrganizationDto.cs
Normal file
13
Marco.Pms.Model/Dtos/Organization/CreateOrganizationDto.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Organization
|
||||||
|
{
|
||||||
|
public class CreateOrganizationDto
|
||||||
|
{
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Email { get; set; }
|
||||||
|
public required string ContactPerson { get; set; }
|
||||||
|
public required string Address { get; set; }
|
||||||
|
public required string ContactNumber { get; set; }
|
||||||
|
public string? logoImage { get; set; }
|
||||||
|
public List<Guid>? ServiceIds { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Marco.Pms.Model/Dtos/Organization/UpdateOrganizationDto.cs
Normal file
12
Marco.Pms.Model/Dtos/Organization/UpdateOrganizationDto.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Organization
|
||||||
|
{
|
||||||
|
public class UpdateOrganizationDto
|
||||||
|
{
|
||||||
|
public required Guid Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string ContactPerson { get; set; }
|
||||||
|
public required string Address { get; set; }
|
||||||
|
public required string ContactNumber { get; set; }
|
||||||
|
public List<Guid>? ServiceIds { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Marco.Pms.Model/Dtos/Projects/AssignServiceDto.cs
Normal file
10
Marco.Pms.Model/Dtos/Projects/AssignServiceDto.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Projects
|
||||||
|
{
|
||||||
|
public class AssignServiceDto
|
||||||
|
{
|
||||||
|
public required Guid ProjectId { get; set; }
|
||||||
|
public required List<Guid> ServiceIds { get; set; }
|
||||||
|
public DateTime PlannedStartDate { get; set; }
|
||||||
|
public DateTime PlannedEndDate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,17 +7,18 @@ namespace Marco.Pms.Model.Dtos.Project
|
|||||||
{
|
{
|
||||||
[Required(ErrorMessage = "Project Name is required!")]
|
[Required(ErrorMessage = "Project Name is required!")]
|
||||||
[DisplayName("Project Name")]
|
[DisplayName("Project Name")]
|
||||||
public string? Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
[DisplayName("Short Name")]
|
[DisplayName("Short Name")]
|
||||||
public string? ShortName { get; set; }
|
public string? ShortName { get; set; }
|
||||||
|
|
||||||
[DisplayName("Project Address")]
|
[DisplayName("Project Address")]
|
||||||
[Required(ErrorMessage = "Project Address is required!")]
|
[Required(ErrorMessage = "Project Address is required!")]
|
||||||
public string? ProjectAddress { get; set; }
|
public required string ProjectAddress { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[DisplayName("Contact Person")]
|
[DisplayName("Contact Person")]
|
||||||
public string? ContactPerson { get; set; }
|
public required string ContactPerson { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public DateTime? StartDate { get; set; }
|
public DateTime? StartDate { get; set; }
|
||||||
@ -25,6 +26,8 @@ namespace Marco.Pms.Model.Dtos.Project
|
|||||||
|
|
||||||
[DisplayName("Project Status")]
|
[DisplayName("Project Status")]
|
||||||
[Required(ErrorMessage = "Project Status is required!")]
|
[Required(ErrorMessage = "Project Status is required!")]
|
||||||
public Guid ProjectStatusId { get; set; }
|
public required Guid ProjectStatusId { get; set; }
|
||||||
|
public required Guid PromoterId { get; set; }
|
||||||
|
public required Guid PMCId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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