Adding the models related to organizations
This commit is contained in:
parent
e1b045f852
commit
0ef9d66cf1
@ -9,6 +9,7 @@ using Marco.Pms.Model.Expenses;
|
||||
using Marco.Pms.Model.Forum;
|
||||
using Marco.Pms.Model.Mail;
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.OrganizationModel;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Roles;
|
||||
using Marco.Pms.Model.TenantModels;
|
||||
@ -39,6 +40,8 @@ namespace Marco.Pms.DataAccess.Data
|
||||
public DbSet<SubscriptionPlanDetails> SubscriptionPlanDetails { get; set; }
|
||||
public DbSet<TenantSubscriptions> TenantSubscriptions { 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<Project> Projects { get; set; }
|
||||
public DbSet<ProjectAllocation> ProjectAllocations { get; set; }
|
||||
@ -117,6 +120,17 @@ namespace Marco.Pms.DataAccess.Data
|
||||
public DbSet<AttachmentVersionMapping> AttachmentVersionMappings { 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; }
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@ -132,6 +146,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
.HasForeignKey(e => e.UserId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<TenantStatus>().HasData(
|
||||
new TenantStatus
|
||||
{
|
||||
@ -150,6 +165,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(
|
||||
new Tenant
|
||||
{
|
||||
@ -197,6 +227,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Status = "Completed"
|
||||
}
|
||||
);
|
||||
|
||||
modelBuilder.Entity<Project>().HasData(
|
||||
new Project
|
||||
{
|
||||
@ -226,6 +257,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
new Industry { Id = Guid.Parse("8a0d6134-2dbe-4e0a-b250-ff34cb7b9df0"), Name = "Education & Training" }
|
||||
|
||||
);
|
||||
|
||||
modelBuilder.Entity<TicketStatusMaster>().HasData(
|
||||
new TicketStatusMaster
|
||||
{
|
||||
@ -273,6 +305,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
|
||||
modelBuilder.Entity<TicketTypeMaster>().HasData(
|
||||
new TicketTypeMaster
|
||||
{
|
||||
@ -291,6 +324,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
|
||||
modelBuilder.Entity<TicketPriorityMaster>().HasData(
|
||||
new TicketPriorityMaster
|
||||
{
|
||||
@ -338,6 +372,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
|
||||
modelBuilder.Entity<TicketTagMaster>().HasData(
|
||||
new TicketTagMaster
|
||||
{
|
||||
@ -383,6 +418,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
|
||||
modelBuilder.Entity<WorkStatusMaster>().HasData(
|
||||
new WorkStatusMaster
|
||||
{
|
||||
@ -750,7 +786,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Name = "Project Documents",
|
||||
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"),
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
},
|
||||
new DocumentCategoryMaster
|
||||
@ -759,10 +795,10 @@ namespace Marco.Pms.DataAccess.Data
|
||||
Name = "Employee Documents",
|
||||
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"),
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||||
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26")
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
modelBuilder.Entity<DocumentTypeMaster>().HasData(
|
||||
new DocumentTypeMaster
|
||||
@ -945,6 +981,29 @@ namespace Marco.Pms.DataAccess.Data
|
||||
}
|
||||
);
|
||||
|
||||
modelBuilder.Entity<OrgTypeMaster>().HasData(
|
||||
new OrgTypeMaster
|
||||
{
|
||||
Id = Guid.Parse("743806fe-d991-4079-b223-e4e2da44f435"),
|
||||
Name = "Tenant"
|
||||
},
|
||||
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"
|
||||
},
|
||||
new OrgTypeMaster
|
||||
{
|
||||
Id = Guid.Parse("b1877a3b-8832-47b1-bbe3-dc7e98672f49"),
|
||||
Name = "PMC"
|
||||
}
|
||||
);
|
||||
|
||||
modelBuilder.Entity<Module>().HasData(
|
||||
new Module
|
||||
{
|
||||
@ -1109,4 +1168,4 @@ namespace Marco.Pms.DataAccess.Data
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
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));
|
||||
}
|
||||
}
|
||||
}
|
@ -931,7 +931,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
new
|
||||
{
|
||||
Id = new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6226),
|
||||
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||||
Description = "Project documents are formal records that outline the plans, progress, and details necessary to execute and manage a project effectively.",
|
||||
EntityTypeId = new Guid("c8fe7115-aa27-43bc-99f4-7b05fabe436e"),
|
||||
Name = "Project Documents",
|
||||
@ -940,7 +940,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
new
|
||||
{
|
||||
Id = new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6233),
|
||||
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||||
Description = "Employment details along with legal IDs like passports or driver’s licenses to verify identity and work authorization.",
|
||||
EntityTypeId = new Guid("dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7"),
|
||||
Name = "Employee Documents",
|
||||
@ -1026,7 +1026,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
||||
AllowedContentType = "application/pdf,image/jpeg",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6275),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||
IsActive = true,
|
||||
IsMandatory = true,
|
||||
@ -1041,7 +1041,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
||||
AllowedContentType = "application/pdf,image/jpeg",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6282),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||
IsActive = true,
|
||||
IsMandatory = true,
|
||||
@ -1056,7 +1056,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
||||
AllowedContentType = "application/pdf,image/jpeg",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6286),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||
IsActive = true,
|
||||
IsMandatory = true,
|
||||
@ -1071,7 +1071,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
||||
AllowedContentType = "application/pdf,image/jpeg",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6290),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||
IsActive = true,
|
||||
IsMandatory = true,
|
||||
@ -1086,7 +1086,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
||||
AllowedContentType = "application/pdf,image/jpeg",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6295),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
||||
IsActive = true,
|
||||
IsMandatory = true,
|
||||
@ -1101,7 +1101,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
||||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6298),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||
IsActive = true,
|
||||
IsMandatory = false,
|
||||
@ -1115,7 +1115,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
||||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6302),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||
IsActive = true,
|
||||
IsMandatory = false,
|
||||
@ -1129,7 +1129,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
||||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6307),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||
IsActive = true,
|
||||
IsMandatory = false,
|
||||
@ -1143,7 +1143,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
||||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6311),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||
IsActive = true,
|
||||
IsMandatory = false,
|
||||
@ -1157,7 +1157,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
||||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6314),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||
IsActive = true,
|
||||
IsMandatory = false,
|
||||
@ -1171,7 +1171,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
||||
AllowedContentType = "application/pdf,image/vnd.dwg,application/acad",
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6319),
|
||||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||||
DocumentCategoryId = new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
||||
IsActive = true,
|
||||
IsMandatory = false,
|
||||
@ -2346,26 +2346,68 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.ToTable("MailingList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.ActivityGroupMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsSystem")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("ServiceId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("TenantId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ServiceId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("ActivityGroupMasters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.ActivityMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("ActivityGroupId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("ActivityName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsSystem")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<Guid>("TenantId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("UnitOfMeasurement")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityGroupId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("ActivityMasters");
|
||||
@ -2796,6 +2838,76 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.GlobalActivityGroupMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("ServiceId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ServiceId");
|
||||
|
||||
b.ToTable("GlobalActivityGroupMasters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.GlobalActivityMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ActivityGroupId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("ActivityName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("UnitOfMeasurement")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityGroupId");
|
||||
|
||||
b.ToTable("GlobalActivityMasters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.GlobalServiceMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("GlobalServiceMasters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.Industry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -2970,6 +3082,33 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.ServiceMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsSystem")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("TenantId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("ServiceMasters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.StatusMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -3371,6 +3510,244 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.OrgServiceMapping", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("OrganizationId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ServiceId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.HasIndex("ServiceId");
|
||||
|
||||
b.ToTable("OrgServiceMappings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.OrgTypeMaster", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("OrgTypeMasters");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = new Guid("743806fe-d991-4079-b223-e4e2da44f435"),
|
||||
Name = "Tenant"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("5ee49bcd-b6d3-482f-9aaf-484afe04abec"),
|
||||
Name = "Service Provider"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("a283356a-9b02-4029-afb7-e65c703efdd4"),
|
||||
Name = "Sub-Contractor"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("b1877a3b-8832-47b1-bbe3-dc7e98672f49"),
|
||||
Name = "PMC"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.Organization", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ContactNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<Guid?>("CreatedById")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<double>("SPRID")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<Guid?>("UpdatedById")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedById");
|
||||
|
||||
b.HasIndex("UpdatedById");
|
||||
|
||||
b.ToTable("Organizations");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||
Address = "2nd Floor, Fullora Building, Tejas CHS, behind Kothrud Stand, Tejas Society, Dahanukar Colony, Kothrud, Pune, Maharashtra 411038",
|
||||
ContactNumber = "123456789",
|
||||
ContactPerson = "Admin",
|
||||
CreatedAt = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
Email = "admin@marcoaiot.com",
|
||||
IsActive = true,
|
||||
Name = "MarcoBMS",
|
||||
SPRID = 5400.0
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.ProjectOrgMapping", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("AssignedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("CompletionDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<Guid>("OrganizationId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("OrganizationTypeId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ParentOrganizationId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ProjectServiceId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("TenantId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.HasIndex("OrganizationTypeId");
|
||||
|
||||
b.HasIndex("ParentOrganizationId");
|
||||
|
||||
b.HasIndex("ProjectServiceId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("ProjectOrgMappings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.ProjectServiceMapping", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("ActualEndDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("ActualStartDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("PlannedEndDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("PlannedStartDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<Guid>("ProjectId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ServiceId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("TenantId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.HasIndex("ServiceId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("ProjectServiceMappings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.TenantOrgMapping", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("AssignedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<Guid>("OrganizationId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("ReassignedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<double>("SPRID")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<Guid>("TenantId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("TenantOrgMappings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Projects.Building", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -5139,14 +5516,39 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Navigation("MailBody");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.ActivityMaster", b =>
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.ActivityGroupMaster", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Master.ServiceMaster", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Service");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.ActivityMaster", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Master.ActivityGroupMaster", "ActivityGroup")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityGroupId");
|
||||
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ActivityGroup");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
@ -5172,6 +5574,28 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Navigation("Module");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.GlobalActivityGroupMaster", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Master.GlobalServiceMaster", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.GlobalActivityMaster", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Master.GlobalActivityGroupMaster", "ActivityGroup")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityGroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ActivityGroup");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.PaymentModeMatser", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
@ -5183,6 +5607,17 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.ServiceMaster", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Master.WorkCategoryMaster", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
@ -5205,6 +5640,129 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.OrgServiceMapping", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.OrganizationModel.Organization", "Organization")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Master.GlobalServiceMaster", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Organization");
|
||||
|
||||
b.Navigation("Service");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.Organization", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Employees.Employee", "CreatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedById");
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Employees.Employee", "UpdatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("UpdatedById");
|
||||
|
||||
b.Navigation("CreatedBy");
|
||||
|
||||
b.Navigation("UpdatedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.ProjectOrgMapping", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.OrganizationModel.Organization", "Organization")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.OrganizationModel.OrgTypeMaster", "OrganizationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.OrganizationModel.Organization", "ParentOrganization")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentOrganizationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.OrganizationModel.ProjectServiceMapping", "ProjectService")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProjectServiceId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Organization");
|
||||
|
||||
b.Navigation("OrganizationType");
|
||||
|
||||
b.Navigation("ParentOrganization");
|
||||
|
||||
b.Navigation("ProjectService");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.ProjectServiceMapping", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Projects.Project", "Project")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProjectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Master.ServiceMaster", "Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServiceId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
|
||||
b.Navigation("Service");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.OrganizationModel.TenantOrgMapping", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.OrganizationModel.Organization", "Organization")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Organization");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Projects.Building", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.TenantModels.Tenant", "Tenant")
|
||||
|
@ -2,8 +2,9 @@
|
||||
{
|
||||
public class CreateActivityMasterDto
|
||||
{
|
||||
public string? ActivityName { get; set; }
|
||||
public string? UnitOfMeasurement { get; set; }
|
||||
public required Guid ActitvityGroupId { get; set; }
|
||||
public required string ActivityName { get; set; }
|
||||
public required string UnitOfMeasurement { get; set; }
|
||||
public List<CreateCheckListDto>? CheckList { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
public class CreateCheckListDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public bool IsMandatory { get; set; }
|
||||
public required string Description { get; set; }
|
||||
public required bool IsMandatory { 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; }
|
||||
}
|
||||
}
|
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; }
|
||||
}
|
||||
}
|
20
Marco.Pms.Model/Master/ActivityGroupMaster.cs
Normal file
20
Marco.Pms.Model/Master/ActivityGroupMaster.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Master
|
||||
{
|
||||
public class ActivityGroupMaster : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid ServiceId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceId")]
|
||||
public ServiceMaster? Service { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsSystem { get; set; } = false;
|
||||
}
|
||||
}
|
@ -1,14 +1,20 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Master
|
||||
{
|
||||
public class ActivityMaster : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string? ActivityName { get; set; }
|
||||
|
||||
public string? UnitOfMeasurement { get; set; }
|
||||
public string ActivityName { get; set; } = string.Empty;
|
||||
public string UnitOfMeasurement { get; set; } = string.Empty;
|
||||
public Guid? ActivityGroupId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ActivityGroupId")]
|
||||
public ActivityGroupMaster? ActivityGroup { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsSystem { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
17
Marco.Pms.Model/Master/GlobalActivityGroupMaster.cs
Normal file
17
Marco.Pms.Model/Master/GlobalActivityGroupMaster.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Master
|
||||
{
|
||||
public class GlobalActivityGroupMaster
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid ServiceId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceId")]
|
||||
public GlobalServiceMaster? Service { get; set; }
|
||||
}
|
||||
}
|
18
Marco.Pms.Model/Master/GlobalActivityMaster.cs
Normal file
18
Marco.Pms.Model/Master/GlobalActivityMaster.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Master
|
||||
{
|
||||
public class GlobalActivityMaster
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string ActivityName { get; set; } = string.Empty;
|
||||
public string UnitOfMeasurement { get; set; } = string.Empty;
|
||||
public Guid ActivityGroupId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ActivityGroupId")]
|
||||
public GlobalActivityGroupMaster? ActivityGroup { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
}
|
9
Marco.Pms.Model/Master/GlobalServiceMaster.cs
Normal file
9
Marco.Pms.Model/Master/GlobalServiceMaster.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Master
|
||||
{
|
||||
public class GlobalServiceMaster
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
13
Marco.Pms.Model/Master/ServiceMaster.cs
Normal file
13
Marco.Pms.Model/Master/ServiceMaster.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Master
|
||||
{
|
||||
public class ServiceMaster : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsSystem { get; set; } = false;
|
||||
}
|
||||
}
|
21
Marco.Pms.Model/OrganizationModel/OrgServiceMapping.cs
Normal file
21
Marco.Pms.Model/OrganizationModel/OrgServiceMapping.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Marco.Pms.Model.Master;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.OrganizationModel
|
||||
{
|
||||
public class OrgServiceMapping
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid OrganizationId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("OrganizationId")]
|
||||
public Organization? Organization { get; set; }
|
||||
public Guid ServiceId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceId")]
|
||||
public GlobalServiceMaster? Service { get; set; }
|
||||
}
|
||||
}
|
8
Marco.Pms.Model/OrganizationModel/OrgTypeMaster.cs
Normal file
8
Marco.Pms.Model/OrganizationModel/OrgTypeMaster.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace Marco.Pms.Model.OrganizationModel
|
||||
{
|
||||
public class OrgTypeMaster
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
30
Marco.Pms.Model/OrganizationModel/Organization.cs
Normal file
30
Marco.Pms.Model/OrganizationModel/Organization.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.OrganizationModel
|
||||
{
|
||||
public class Organization
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string ContactPerson { get; set; } = string.Empty;
|
||||
public string Address { get; set; } = string.Empty;
|
||||
public string ContactNumber { get; set; } = string.Empty;
|
||||
public double SPRID { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public Guid? CreatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("CreatedById")]
|
||||
public Employee? CreatedBy { get; set; }
|
||||
public Guid? UpdatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("UpdatedById")]
|
||||
public Employee? UpdatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
}
|
33
Marco.Pms.Model/OrganizationModel/ProjectOrgMapping.cs
Normal file
33
Marco.Pms.Model/OrganizationModel/ProjectOrgMapping.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.OrganizationModel
|
||||
{
|
||||
public class ProjectOrgMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid OrganizationId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("OrganizationId")]
|
||||
public Organization? Organization { get; set; }
|
||||
public Guid ParentOrganizationId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ParentOrganizationId")]
|
||||
public Organization? ParentOrganization { get; set; }
|
||||
public Guid ProjectServiceId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectServiceId")]
|
||||
public ProjectServiceMapping? ProjectService { get; set; }
|
||||
public Guid OrganizationTypeId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("OrganizationTypeId")]
|
||||
public OrgTypeMaster? OrganizationType { get; set; }
|
||||
public DateTime AssignedDate { get; set; }
|
||||
public DateTime? CompletionDate { get; set; }
|
||||
}
|
||||
}
|
27
Marco.Pms.Model/OrganizationModel/ProjectServiceMapping.cs
Normal file
27
Marco.Pms.Model/OrganizationModel/ProjectServiceMapping.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Marco.Pms.Model.Master;
|
||||
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.OrganizationModel
|
||||
{
|
||||
public class ProjectServiceMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ServiceId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceId")]
|
||||
public ServiceMaster? Service { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public Project? Project { get; set; }
|
||||
public DateTime PlannedStartDate { get; set; }
|
||||
public DateTime PlannedEndDate { get; set; }
|
||||
public DateTime ActualStartDate { get; set; }
|
||||
public DateTime? ActualEndDate { get; set; }
|
||||
}
|
||||
}
|
20
Marco.Pms.Model/OrganizationModel/TenantOrgMapping.cs
Normal file
20
Marco.Pms.Model/OrganizationModel/TenantOrgMapping.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.OrganizationModel
|
||||
{
|
||||
public class TenantOrgMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid OrganizationId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("OrganizationId")]
|
||||
public Organization? Organization { get; set; }
|
||||
public double SPRID { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime AssignedDate { get; set; }
|
||||
public DateTime? ReassignedDate { get; set; }
|
||||
}
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
namespace Marco.Pms.Model.ViewModels.Activities
|
||||
using Marco.Pms.Model.ViewModels.Master;
|
||||
|
||||
namespace Marco.Pms.Model.ViewModels.Activities
|
||||
{
|
||||
public class ActivityVM
|
||||
{
|
||||
@ -7,5 +9,8 @@
|
||||
|
||||
public string? UnitOfMeasurement { get; set; }
|
||||
public List<CheckListVM>? CheckLists { get; set; }
|
||||
public ActivityGroupMasterVM? ActivityGroup { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsSystem { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
12
Marco.Pms.Model/ViewModels/Master/ActivityGroupMasterVM.cs
Normal file
12
Marco.Pms.Model/ViewModels/Master/ActivityGroupMasterVM.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace Marco.Pms.Model.ViewModels.Master
|
||||
{
|
||||
public class ActivityGroupMasterVM
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public ServiceMasterVM? Service { get; set; }
|
||||
public bool IsSystem { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
11
Marco.Pms.Model/ViewModels/Master/ServiceMasterVM.cs
Normal file
11
Marco.Pms.Model/ViewModels/Master/ServiceMasterVM.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Marco.Pms.Model.ViewModels.Master
|
||||
{
|
||||
public class ServiceMasterVM
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public bool IsSystem { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
using AutoMapper;
|
||||
using Marco.Pms.Model.Directory;
|
||||
using Marco.Pms.Model.Dtos.Directory;
|
||||
using Marco.Pms.Model.AppMenu;
|
||||
using Marco.Pms.Model.Directory;
|
||||
using Marco.Pms.Model.DocumentManager;
|
||||
using Marco.Pms.Model.Dtos.Activities;
|
||||
using Marco.Pms.Model.Dtos.AppMenu;
|
||||
using Marco.Pms.Model.Dtos.Directory;
|
||||
using Marco.Pms.Model.Dtos.DocumentManager;
|
||||
using Marco.Pms.Model.Dtos.Expenses;
|
||||
using Marco.Pms.Model.Dtos.Master;
|
||||
@ -233,6 +234,44 @@ namespace Marco.Pms.Services.MappingProfiles
|
||||
|
||||
CreateMap<FeaturePermission, FeaturePermissionVM>();
|
||||
|
||||
#region ======================================================= Service Master =======================================================
|
||||
|
||||
CreateMap<ServiceMasterDto, ServiceMaster>()
|
||||
.ForMember(
|
||||
dest => dest.Id,
|
||||
// Explicitly and safely convert nullable Guid to non-nullable Guid
|
||||
opt => opt.MapFrom(src => src.Id ?? Guid.Empty)
|
||||
);
|
||||
CreateMap<ServiceMaster, ServiceMasterVM>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region ======================================================= Activity Group Master =======================================================
|
||||
|
||||
CreateMap<ServiceMasterDto, ActivityGroupMaster>()
|
||||
.ForMember(
|
||||
dest => dest.Id,
|
||||
// Explicitly and safely convert nullable Guid to non-nullable Guid
|
||||
opt => opt.MapFrom(src => src.Id ?? Guid.Empty)
|
||||
);
|
||||
CreateMap<ActivityGroupMaster, ActivityGroupMasterVM>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region ======================================================= Activity Master =======================================================
|
||||
|
||||
CreateMap<CreateActivityMasterDto, ActivityMaster>();
|
||||
CreateMap<CreateCheckListDto, ActivityCheckList>()
|
||||
.ForMember(
|
||||
dest => dest.Id,
|
||||
// Explicitly and safely convert nullable Guid to non-nullable Guid
|
||||
opt => opt.MapFrom(src => src.Id ?? Guid.Empty)
|
||||
);
|
||||
CreateMap<ActivityCheckList, CheckListVM>();
|
||||
CreateMap<ActivityMaster, ActivityVM>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region ======================================================= Expenses Type Master =======================================================
|
||||
|
||||
CreateMap<ExpensesTypeMasterDto, ExpensesTypeMaster>()
|
||||
|
Loading…
x
Reference in New Issue
Block a user