Compare commits
74 Commits
41b8aa0126
...
7b1cce26c8
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b1cce26c8 | |||
| f2e2862b0f | |||
| fa5a8c178d | |||
| dcd39db3b0 | |||
| aa1d5020f7 | |||
| 91cffbc632 | |||
| f45f75befb | |||
| 0ac0de143d | |||
| 85319cdf49 | |||
| bda8cbc466 | |||
| 2af750fbb3 | |||
| fe503a70dc | |||
| a9f4610063 | |||
| c7304dc80b | |||
| f906e8f7d0 | |||
| b93b581d60 | |||
| 1c48ab80aa | |||
| cac50a3f06 | |||
| dbc1b721c1 | |||
| 9b1a1d1fe7 | |||
| 40d9c335c4 | |||
| be0c37588e | |||
| 832555d2b2 | |||
| 829a421ab0 | |||
| f57e40219e | |||
| 498ea6e4e7 | |||
| 3ec3618b7e | |||
| c6f3216150 | |||
| ed449fdf47 | |||
| 17994bff08 | |||
| 16a4234f75 | |||
| d1be217740 | |||
| f391806a57 | |||
| c3079258d9 | |||
| a25fa069de | |||
| dc9b696265 | |||
| ad1b2d35fb | |||
| f488109a4c | |||
| a51c11389d | |||
| e4f8e507d5 | |||
| 23322fdeb2 | |||
| 0fe811d78c | |||
| 689d5c28bb | |||
| b8e2c265be | |||
| 52d0474d45 | |||
| 3fabadc380 | |||
| b624e9ec62 | |||
| 3702dae1ac | |||
| e53d45ed77 | |||
| 38262074c4 | |||
| 90b5152bb2 | |||
| 40420d19c4 | |||
| 81d487f9f2 | |||
| c44deb439e | |||
| 5d4b1ad282 | |||
| db879495cb | |||
| 15e83346e2 | |||
| e41faf4045 | |||
| 2117b81c48 | |||
| 52a67ba15b | |||
| 58bb684c4b | |||
| ec5fba0637 | |||
| 56448cb8a2 | |||
| 7ddb1e2f8e | |||
| 727e4794da | |||
| 41edbef9d1 | |||
| 0b81a6ea62 | |||
| 745b4d2e1c | |||
| 64c4772595 | |||
| 7ddb37852e | |||
| 352b4fb40e | |||
| 9c4b1639fe | |||
| 1b16983092 | |||
| e6fb6a23b5 |
@ -5,6 +5,7 @@ using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Industries;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Marco.Pms.Utility;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
@ -39,12 +40,20 @@ namespace Marco.Pms.DataAccess.Data
|
||||
|
||||
public DbSet<WorkArea> WorkAreas { get; set; }
|
||||
public DbSet<WorkItem> WorkItems { get; set; }
|
||||
public DbSet<WorkItemMapping> WorkItemMapping { get; set; }
|
||||
//public DbSet<WorkItemMapping> WorkItemMapping { get; set; }
|
||||
|
||||
public DbSet<WorkShift> WorkShifts { get; set; }
|
||||
|
||||
|
||||
|
||||
public DbSet<TaskAllocation> TaskAllocations { get; set; }
|
||||
// public DbSet<Attendance> Attendances { get; set; }
|
||||
public DbSet<TaskComment> TaskComments { get; set; }
|
||||
public DbSet<TaskMembers> TaskMembers { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
// public DbSet<Attendance> Attendances { get; set; }
|
||||
public DbSet<Attendance> Attendes { get; set; }
|
||||
|
||||
public DbSet<AttendanceLog> AttendanceLogs { get; set; }
|
||||
@ -64,6 +73,9 @@ namespace Marco.Pms.DataAccess.Data
|
||||
public DbSet<RolePermissionMappings> RolePermissionMappings { get; set; }
|
||||
|
||||
public DbSet<Industry>Industries { get; set; }
|
||||
public DbSet<ActivityCheckList>ActivityCheckLists { get; set; }
|
||||
public DbSet<CheckListMappings> CheckListMappings { get; set; }
|
||||
public DbSet<Inquiries> Inquiries { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
||||
@ -79,7 +79,7 @@ namespace Marco.Pms.DataAccess.Initializer
|
||||
ApplicationUserId = user.Id,
|
||||
BirthDate = DateTime.MinValue,
|
||||
PanNumber = "",
|
||||
PeramnentAddress = "",
|
||||
PermanentAddress = "",
|
||||
PhoneNumber = "",
|
||||
TenantId = user.TenantId
|
||||
};
|
||||
|
||||
2128
Marco.Pms.DataAccess/Migrations/20250402124701_TaskAllocationModels.Designer.cs
generated
Normal file
2128
Marco.Pms.DataAccess/Migrations/20250402124701_TaskAllocationModels.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,543 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TaskAllocationModels : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ActivityMasters_TaskAllocations_TaskAllocationId",
|
||||
table: "ActivityMasters");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_Buildings_BuildingId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_Employees_EmployeeId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_Projects_ProjectId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_WorkAreas_WorkAreaId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TaskAllocations_BuildingId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TaskAllocations_EmployeeId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ActivityMasters_TaskAllocationId",
|
||||
table: "ActivityMasters");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BuildingId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployeeId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TaskAllocationId",
|
||||
table: "ActivityMasters");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "WorkAreaId",
|
||||
table: "TaskAllocations",
|
||||
newName: "WorkItemMappingId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ReAllocationDate",
|
||||
table: "TaskAllocations",
|
||||
newName: "ReportedDate");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ProjectId",
|
||||
table: "TaskAllocations",
|
||||
newName: "WorkItemId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "EmployeeRole",
|
||||
table: "TaskAllocations",
|
||||
newName: "AssignedBy");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "AllocationDate",
|
||||
table: "TaskAllocations",
|
||||
newName: "AssignmentDate");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_TaskAllocations_WorkAreaId",
|
||||
table: "TaskAllocations",
|
||||
newName: "IX_TaskAllocations_WorkItemMappingId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_TaskAllocations_ProjectId",
|
||||
table: "TaskAllocations",
|
||||
newName: "IX_TaskAllocations_WorkItemId");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "PlannedWork",
|
||||
table: "WorkItems",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "CompletedWork",
|
||||
table: "WorkItems",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "Id",
|
||||
table: "TaskAllocations",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "CompletedTask",
|
||||
table: "TaskAllocations",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Description",
|
||||
table: "TaskAllocations",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "PlannedTask",
|
||||
table: "TaskAllocations",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TaskComments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
TaskAllocationId = table.Column<long>(type: "bigint", nullable: false),
|
||||
CommentDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CommentedBy = table.Column<int>(type: "int", nullable: false),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TaskComments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_TaskComments_Employees_CommentedBy",
|
||||
column: x => x.CommentedBy,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_TaskComments_TaskAllocations_TaskAllocationId",
|
||||
column: x => x.TaskAllocationId,
|
||||
principalTable: "TaskAllocations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_TaskComments_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TaskMembers",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
TaskAllocationId = table.Column<long>(type: "bigint", nullable: false),
|
||||
EmployeeId = table.Column<int>(type: "int", nullable: false),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TaskMembers", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_TaskMembers_Employees_EmployeeId",
|
||||
column: x => x.EmployeeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_TaskMembers_TaskAllocations_TaskAllocationId",
|
||||
column: x => x.TaskAllocationId,
|
||||
principalTable: "TaskAllocations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_TaskMembers_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskAllocations_AssignedBy",
|
||||
table: "TaskAllocations",
|
||||
column: "AssignedBy");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskComments_CommentedBy",
|
||||
table: "TaskComments",
|
||||
column: "CommentedBy");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskComments_TaskAllocationId",
|
||||
table: "TaskComments",
|
||||
column: "TaskAllocationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskComments_TenantId",
|
||||
table: "TaskComments",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskMembers_EmployeeId",
|
||||
table: "TaskMembers",
|
||||
column: "EmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskMembers_TaskAllocationId",
|
||||
table: "TaskMembers",
|
||||
column: "TaskAllocationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskMembers_TenantId",
|
||||
table: "TaskMembers",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_Employees_AssignedBy",
|
||||
table: "TaskAllocations",
|
||||
column: "AssignedBy",
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId",
|
||||
table: "TaskAllocations",
|
||||
column: "WorkItemMappingId",
|
||||
principalTable: "WorkItemMapping",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_WorkItems_WorkItemId",
|
||||
table: "TaskAllocations",
|
||||
column: "WorkItemId",
|
||||
principalTable: "WorkItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_Employees_AssignedBy",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_WorkItems_WorkItemId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TaskComments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TaskMembers");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TaskAllocations_AssignedBy",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CompletedTask",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Description",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PlannedTask",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "WorkItemMappingId",
|
||||
table: "TaskAllocations",
|
||||
newName: "WorkAreaId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "WorkItemId",
|
||||
table: "TaskAllocations",
|
||||
newName: "ProjectId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ReportedDate",
|
||||
table: "TaskAllocations",
|
||||
newName: "ReAllocationDate");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "AssignmentDate",
|
||||
table: "TaskAllocations",
|
||||
newName: "AllocationDate");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "AssignedBy",
|
||||
table: "TaskAllocations",
|
||||
newName: "EmployeeRole");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_TaskAllocations_WorkItemMappingId",
|
||||
table: "TaskAllocations",
|
||||
newName: "IX_TaskAllocations_WorkAreaId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_TaskAllocations_WorkItemId",
|
||||
table: "TaskAllocations",
|
||||
newName: "IX_TaskAllocations_ProjectId");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "PlannedWork",
|
||||
table: "WorkItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "CompletedWork",
|
||||
table: "WorkItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Id",
|
||||
table: "TaskAllocations",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "BuildingId",
|
||||
table: "TaskAllocations",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "EmployeeId",
|
||||
table: "TaskAllocations",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TaskAllocationId",
|
||||
table: "ActivityMasters",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 3,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 4,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 5,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 6,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 7,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 8,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 9,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 10,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 11,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 12,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 13,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 14,
|
||||
column: "TaskAllocationId",
|
||||
value: null);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskAllocations_BuildingId",
|
||||
table: "TaskAllocations",
|
||||
column: "BuildingId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskAllocations_EmployeeId",
|
||||
table: "TaskAllocations",
|
||||
column: "EmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ActivityMasters_TaskAllocationId",
|
||||
table: "ActivityMasters",
|
||||
column: "TaskAllocationId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ActivityMasters_TaskAllocations_TaskAllocationId",
|
||||
table: "ActivityMasters",
|
||||
column: "TaskAllocationId",
|
||||
principalTable: "TaskAllocations",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_Buildings_BuildingId",
|
||||
table: "TaskAllocations",
|
||||
column: "BuildingId",
|
||||
principalTable: "Buildings",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_Employees_EmployeeId",
|
||||
table: "TaskAllocations",
|
||||
column: "EmployeeId",
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_Projects_ProjectId",
|
||||
table: "TaskAllocations",
|
||||
column: "ProjectId",
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_WorkAreas_WorkAreaId",
|
||||
table: "TaskAllocations",
|
||||
column: "WorkAreaId",
|
||||
principalTable: "WorkAreas",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
2128
Marco.Pms.DataAccess/Migrations/20250403055023_Make_ReportDate_Nullable.Designer.cs
generated
Normal file
2128
Marco.Pms.DataAccess/Migrations/20250403055023_Make_ReportDate_Nullable.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Make_ReportDate_Nullable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ReportedDate",
|
||||
table: "TaskAllocations",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ReportedDate",
|
||||
table: "TaskAllocations",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
2059
Marco.Pms.DataAccess/Migrations/20250403133824_Removed_WorkItemMapping.Designer.cs
generated
Normal file
2059
Marco.Pms.DataAccess/Migrations/20250403133824_Removed_WorkItemMapping.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,131 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Removed_WorkItemMapping : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WorkItemMapping");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TaskAllocations_WorkItemMappingId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "WorkItemMappingId",
|
||||
table: "TaskAllocations");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "TaskAllocations",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "TaskAllocations",
|
||||
keyColumn: "Description",
|
||||
keyValue: null,
|
||||
column: "Description",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "TaskAllocations",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "WorkItemMappingId",
|
||||
table: "TaskAllocations",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WorkItemMapping",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false),
|
||||
WorkAreaId = table.Column<int>(type: "int", nullable: false),
|
||||
WorkItemId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WorkItemMapping", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_WorkItemMapping_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_WorkItemMapping_WorkAreas_WorkAreaId",
|
||||
column: x => x.WorkAreaId,
|
||||
principalTable: "WorkAreas",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_WorkItemMapping_WorkItems_WorkItemId",
|
||||
column: x => x.WorkItemId,
|
||||
principalTable: "WorkItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskAllocations_WorkItemMappingId",
|
||||
table: "TaskAllocations",
|
||||
column: "WorkItemMappingId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WorkItemMapping_TenantId",
|
||||
table: "WorkItemMapping",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WorkItemMapping_WorkAreaId",
|
||||
table: "WorkItemMapping",
|
||||
column: "WorkAreaId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_WorkItemMapping_WorkItemId",
|
||||
table: "WorkItemMapping",
|
||||
column: "WorkItemId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TaskAllocations_WorkItemMapping_WorkItemMappingId",
|
||||
table: "TaskAllocations",
|
||||
column: "WorkItemMappingId",
|
||||
principalTable: "WorkItemMapping",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
2073
Marco.Pms.DataAccess/Migrations/20250414053152_Added_Check_List_Table.Designer.cs
generated
Normal file
2073
Marco.Pms.DataAccess/Migrations/20250414053152_Added_Check_List_Table.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,984 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_Check_List_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PeramnentAddress",
|
||||
table: "Employees");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "WorkShifts",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DomainName",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactNumber",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactName",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Status",
|
||||
table: "StatusMasters",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UserId",
|
||||
table: "RefreshTokens",
|
||||
type: "varchar(255)",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Token",
|
||||
table: "RefreshTokens",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ProjectAddress",
|
||||
table: "Projects",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactPerson",
|
||||
table: "Projects",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "Modules",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "JobRoles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Industries",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Features",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "Features",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "FeaturePermissions",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "FeaturePermissions",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PhoneNumber",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LastName",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Gender",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FirstName",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "EmergencyPhoneNumber",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "EmergencyContactPerson",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CurrentAddress",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PermanentAddress",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Role",
|
||||
table: "ApplicationRoles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "ApplicationRoles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UnitOfMeasurement",
|
||||
table: "ActivityMasters",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ActivityName",
|
||||
table: "ActivityMasters",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsActive",
|
||||
table: "ActivityMasters",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ActivityCheckLists",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
ActivityId = table.Column<int>(type: "int", nullable: false),
|
||||
Description = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsChecked = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
IsMandatory = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
TenantId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ActivityCheckLists", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 3,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 4,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 5,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 6,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 7,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 8,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 9,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 10,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 11,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 12,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 13,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "Id",
|
||||
keyValue: 14,
|
||||
column: "IsActive",
|
||||
value: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ActivityCheckLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PermanentAddress",
|
||||
table: "Employees");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsActive",
|
||||
table: "ActivityMasters");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "WorkShifts",
|
||||
keyColumn: "Name",
|
||||
keyValue: null,
|
||||
column: "Name",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "WorkShifts",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Tenants",
|
||||
keyColumn: "Name",
|
||||
keyValue: null,
|
||||
column: "Name",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Tenants",
|
||||
keyColumn: "DomainName",
|
||||
keyValue: null,
|
||||
column: "DomainName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DomainName",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Tenants",
|
||||
keyColumn: "Description",
|
||||
keyValue: null,
|
||||
column: "Description",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Tenants",
|
||||
keyColumn: "ContactNumber",
|
||||
keyValue: null,
|
||||
column: "ContactNumber",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactNumber",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Tenants",
|
||||
keyColumn: "ContactName",
|
||||
keyValue: null,
|
||||
column: "ContactName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactName",
|
||||
table: "Tenants",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "StatusMasters",
|
||||
keyColumn: "Status",
|
||||
keyValue: null,
|
||||
column: "Status",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Status",
|
||||
table: "StatusMasters",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "RefreshTokens",
|
||||
keyColumn: "UserId",
|
||||
keyValue: null,
|
||||
column: "UserId",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UserId",
|
||||
table: "RefreshTokens",
|
||||
type: "varchar(255)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "RefreshTokens",
|
||||
keyColumn: "Token",
|
||||
keyValue: null,
|
||||
column: "Token",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Token",
|
||||
table: "RefreshTokens",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Projects",
|
||||
keyColumn: "ProjectAddress",
|
||||
keyValue: null,
|
||||
column: "ProjectAddress",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ProjectAddress",
|
||||
table: "Projects",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Projects",
|
||||
keyColumn: "ContactPerson",
|
||||
keyValue: null,
|
||||
column: "ContactPerson",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactPerson",
|
||||
table: "Projects",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Modules",
|
||||
keyColumn: "Description",
|
||||
keyValue: null,
|
||||
column: "Description",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "Modules",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobRoles",
|
||||
keyColumn: "Name",
|
||||
keyValue: null,
|
||||
column: "Name",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "JobRoles",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Industries",
|
||||
keyColumn: "Name",
|
||||
keyValue: null,
|
||||
column: "Name",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Industries",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Features",
|
||||
keyColumn: "Name",
|
||||
keyValue: null,
|
||||
column: "Name",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Features",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Features",
|
||||
keyColumn: "Description",
|
||||
keyValue: null,
|
||||
column: "Description",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "Features",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "FeaturePermissions",
|
||||
keyColumn: "Name",
|
||||
keyValue: null,
|
||||
column: "Name",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "FeaturePermissions",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "FeaturePermissions",
|
||||
keyColumn: "Description",
|
||||
keyValue: null,
|
||||
column: "Description",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "FeaturePermissions",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Employees",
|
||||
keyColumn: "PhoneNumber",
|
||||
keyValue: null,
|
||||
column: "PhoneNumber",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PhoneNumber",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Employees",
|
||||
keyColumn: "LastName",
|
||||
keyValue: null,
|
||||
column: "LastName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LastName",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Employees",
|
||||
keyColumn: "Gender",
|
||||
keyValue: null,
|
||||
column: "Gender",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Gender",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Employees",
|
||||
keyColumn: "FirstName",
|
||||
keyValue: null,
|
||||
column: "FirstName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FirstName",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Employees",
|
||||
keyColumn: "EmergencyPhoneNumber",
|
||||
keyValue: null,
|
||||
column: "EmergencyPhoneNumber",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "EmergencyPhoneNumber",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Employees",
|
||||
keyColumn: "EmergencyContactPerson",
|
||||
keyValue: null,
|
||||
column: "EmergencyContactPerson",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "EmergencyContactPerson",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Employees",
|
||||
keyColumn: "CurrentAddress",
|
||||
keyValue: null,
|
||||
column: "CurrentAddress",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CurrentAddress",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PeramnentAddress",
|
||||
table: "Employees",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ApplicationRoles",
|
||||
keyColumn: "Role",
|
||||
keyValue: null,
|
||||
column: "Role",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Role",
|
||||
table: "ApplicationRoles",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ApplicationRoles",
|
||||
keyColumn: "Description",
|
||||
keyValue: null,
|
||||
column: "Description",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Description",
|
||||
table: "ApplicationRoles",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "UnitOfMeasurement",
|
||||
keyValue: null,
|
||||
column: "UnitOfMeasurement",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UnitOfMeasurement",
|
||||
table: "ActivityMasters",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ActivityMasters",
|
||||
keyColumn: "ActivityName",
|
||||
keyValue: null,
|
||||
column: "ActivityName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ActivityName",
|
||||
table: "ActivityMasters",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
2092
Marco.Pms.DataAccess/Migrations/20250415111241_Added_CheckListMappings_Table.Designer.cs
generated
Normal file
2092
Marco.Pms.DataAccess/Migrations/20250415111241_Added_CheckListMappings_Table.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,37 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_CheckListMappings_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CheckListMappings",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
TaskAllocationId = table.Column<long>(type: "bigint", nullable: false),
|
||||
CheckListId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CheckListMappings", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CheckListMappings");
|
||||
}
|
||||
}
|
||||
}
|
||||
2126
Marco.Pms.DataAccess/Migrations/20250418073455_Added_Inquiries_table.Designer.cs
generated
Normal file
2126
Marco.Pms.DataAccess/Migrations/20250418073455_Added_Inquiries_table.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_Inquiries_table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Inquiries",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
OrganizatioinName = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Email = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
About = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
OragnizationSize = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IndustryId = table.Column<int>(type: "int", nullable: false),
|
||||
ContactPerson = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ContactNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Inquiries", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Inquiries");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -24,114 +24,108 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.TaskAllocation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<int>("AssignedBy")
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("AllocationDate")
|
||||
b.Property<DateTime>("AssignmentDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("BuildingId")
|
||||
.HasColumnType("int");
|
||||
b.Property<double>("CompletedTask")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("EmployeeId")
|
||||
.HasColumnType("int");
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("EmployeeRole")
|
||||
.HasColumnType("int");
|
||||
b.Property<double>("PlannedTask")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("ProjectId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("ReAllocationDate")
|
||||
b.Property<DateTime?>("ReportedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkAreaId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BuildingId");
|
||||
|
||||
b.HasIndex("EmployeeId");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.HasIndex("WorkAreaId");
|
||||
|
||||
b.ToTable("TaskAllocations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.WorkItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ActivityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CompletedWork")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("PlannedWork")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("TaskDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkAreaId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.HasIndex("WorkAreaId");
|
||||
|
||||
b.ToTable("WorkItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.WorkItemMapping", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkAreaId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkItemId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
b.HasIndex("AssignedBy");
|
||||
|
||||
b.HasIndex("WorkAreaId");
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.HasIndex("WorkItemId");
|
||||
|
||||
b.ToTable("WorkItemMapping");
|
||||
b.ToTable("TaskAllocations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.TaskComment", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("CommentDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("CommentedBy")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("TaskAllocationId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CommentedBy");
|
||||
|
||||
b.HasIndex("TaskAllocationId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("TaskComments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.TaskMembers", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<int>("EmployeeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("TaskAllocationId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("EmployeeId");
|
||||
|
||||
b.HasIndex("TaskAllocationId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("TaskMembers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.AttendanceModule.Attendance", b =>
|
||||
@ -264,11 +258,9 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Token")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(255)");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -296,26 +288,21 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("CurrentAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("EmergencyContactPerson")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("EmergencyPhoneNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Gender")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
@ -328,7 +315,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("MiddleName")
|
||||
@ -337,12 +323,10 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Property<string>("PanNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PeramnentAddress")
|
||||
.IsRequired()
|
||||
b.Property<string>("PermanentAddress")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<byte[]>("Photo")
|
||||
@ -377,7 +361,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("time(6)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<TimeOnly>("StartTime")
|
||||
@ -393,6 +376,34 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.ToTable("WorkShifts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Entitlements.ActivityCheckList", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ActivityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsChecked")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsMandatory")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("ActivityCheckLists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Entitlements.ActivityMaster", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -402,23 +413,19 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ActivityName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int?>("TaskAllocationId")
|
||||
.HasColumnType("int");
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UnitOfMeasurement")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("TaskAllocationId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.ToTable("ActivityMasters");
|
||||
@ -428,6 +435,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 1,
|
||||
ActivityName = "Core Cutting",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Number"
|
||||
},
|
||||
@ -435,6 +443,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 2,
|
||||
ActivityName = "Fabrication",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Meter"
|
||||
},
|
||||
@ -442,6 +451,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 3,
|
||||
ActivityName = "Lifting",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Meter"
|
||||
},
|
||||
@ -449,6 +459,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 4,
|
||||
ActivityName = "Hanging",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Meter"
|
||||
},
|
||||
@ -456,6 +467,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 5,
|
||||
ActivityName = "Tapping",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Meter"
|
||||
},
|
||||
@ -463,6 +475,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 6,
|
||||
ActivityName = "Welding",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Meter"
|
||||
},
|
||||
@ -470,6 +483,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 7,
|
||||
ActivityName = "Testing",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Area"
|
||||
},
|
||||
@ -477,6 +491,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 8,
|
||||
ActivityName = "Painting",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Meter"
|
||||
},
|
||||
@ -484,6 +499,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 9,
|
||||
ActivityName = "Marking Area",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Meter"
|
||||
},
|
||||
@ -491,6 +507,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 10,
|
||||
ActivityName = "Drilling",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Number"
|
||||
},
|
||||
@ -498,6 +515,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 11,
|
||||
ActivityName = "MS Support Fabrication",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Number"
|
||||
},
|
||||
@ -505,6 +523,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 12,
|
||||
ActivityName = "MS Support Hanging",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Number"
|
||||
},
|
||||
@ -512,6 +531,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 13,
|
||||
ActivityName = "Hydrant Volve",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Number"
|
||||
},
|
||||
@ -519,6 +539,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
Id = 14,
|
||||
ActivityName = "Sprinkler Installation",
|
||||
IsActive = true,
|
||||
TenantId = 1,
|
||||
UnitOfMeasurement = "Number"
|
||||
});
|
||||
@ -531,11 +552,9 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Role")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
@ -585,6 +604,25 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Entitlements.CheckListMappings", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CheckListId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("TaskAllocationId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("CheckListMappings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Entitlements.EmployeeRoleMapping", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -621,7 +659,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
@ -631,7 +668,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -714,7 +750,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("FeatureId")
|
||||
@ -724,7 +759,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -892,7 +926,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
@ -914,7 +947,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Key")
|
||||
@ -977,7 +1009,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
@ -1025,19 +1056,15 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ContactNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("DomainName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int?>("IndustryId")
|
||||
@ -1047,7 +1074,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("OnBoardingDate")
|
||||
@ -1086,7 +1112,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
@ -1205,7 +1230,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("EndDate")
|
||||
@ -1216,7 +1240,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ProjectAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("ProjectStatusId")
|
||||
@ -1333,6 +1356,77 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.ToTable("WorkAreas");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Projects.WorkItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ActivityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("CompletedWork")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("PlannedWork")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<DateTime>("TaskDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("TenantId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkAreaId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
|
||||
b.HasIndex("WorkAreaId");
|
||||
|
||||
b.ToTable("WorkItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Utilities.Inquiries", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("About")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ContactNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ContactPerson")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("IndustryId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OragnizationSize")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("OrganizatioinName")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Inquiries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
@ -1556,21 +1650,69 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.TaskAllocation", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Projects.Building", "Building")
|
||||
b.HasOne("Marco.Pms.Model.Employees.Employee", "Employee")
|
||||
.WithMany()
|
||||
.HasForeignKey("BuildingId")
|
||||
.HasForeignKey("AssignedBy")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Projects.WorkItem", "WorkItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Employee");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
|
||||
b.Navigation("WorkItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.TaskComment", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Employees.Employee", "Employee")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommentedBy")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Activities.TaskAllocation", "TaskAllocation")
|
||||
.WithMany()
|
||||
.HasForeignKey("TaskAllocationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Employee");
|
||||
|
||||
b.Navigation("TaskAllocation");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.TaskMembers", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Employees.Employee", "Employee")
|
||||
.WithMany()
|
||||
.HasForeignKey("EmployeeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Projects.Project", "Project")
|
||||
b.HasOne("Marco.Pms.Model.Activities.TaskAllocation", "TaskAllocation")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProjectId")
|
||||
.HasForeignKey("TaskAllocationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
@ -1580,75 +1722,11 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Projects.WorkArea", "WorkArea")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkAreaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Building");
|
||||
|
||||
b.Navigation("Employee");
|
||||
|
||||
b.Navigation("Project");
|
||||
b.Navigation("TaskAllocation");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
|
||||
b.Navigation("WorkArea");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.WorkItem", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.ActivityMaster", "ActivityMaster")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Projects.WorkArea", "WorkArea")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkAreaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ActivityMaster");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
|
||||
b.Navigation("WorkArea");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.WorkItemMapping", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Projects.WorkArea", "WorkArea")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkAreaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Activities.WorkItem", "WorkItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Tenant");
|
||||
|
||||
b.Navigation("WorkArea");
|
||||
|
||||
b.Navigation("WorkItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.AttendanceModule.Attendance", b =>
|
||||
@ -1708,8 +1786,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
@ -1750,10 +1827,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Entitlements.ActivityMaster", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Activities.TaskAllocation", null)
|
||||
.WithMany("AllotedTask")
|
||||
.HasForeignKey("TaskAllocationId");
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
@ -1962,6 +2035,33 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Navigation("Tenant");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Projects.WorkItem", b =>
|
||||
{
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.ActivityMaster", "ActivityMaster")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
|
||||
.WithMany()
|
||||
.HasForeignKey("TenantId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.Projects.WorkArea", "WorkArea")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkAreaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ActivityMaster");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
|
||||
b.Navigation("WorkArea");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
@ -2013,11 +2113,6 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Activities.TaskAllocation", b =>
|
||||
{
|
||||
b.Navigation("AllotedTask");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Marco.Pms.Model.Entitlements.Feature", b =>
|
||||
{
|
||||
b.Navigation("FeaturePermissions");
|
||||
|
||||
@ -1,52 +1,43 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Utility;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
{
|
||||
public class TaskAllocation
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
[ForeignKey("EmployeeId")]
|
||||
public long Id { get; set; }
|
||||
|
||||
|
||||
public DateTime AssignmentDate { get; set; }
|
||||
public double PlannedTask { get; set; }
|
||||
public double CompletedTask { get; set; }
|
||||
public DateTime? ReportedDate { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
//public int? WorkItemMappingId { get; set; }
|
||||
//[ForeignKey("WorkItemMappingId")]
|
||||
//[ValidateNever]
|
||||
//public WorkItemMapping? WorkItemMapping { get; set; }
|
||||
|
||||
public int AssignedBy { get; set; } //Employee Id
|
||||
[ForeignKey("AssignedBy")]
|
||||
[ValidateNever]
|
||||
public Employee Employee { get; set; }
|
||||
public EMP_ROLES EmployeeRole { get; set; }
|
||||
public Employee? Employee { get; set; }
|
||||
|
||||
public int ProjectId { get; set; }
|
||||
[ForeignKey("ProjectId")]
|
||||
public int WorkItemId { get; set; }
|
||||
[ForeignKey("WorkItemId")]
|
||||
[ValidateNever]
|
||||
public Project Project { get; set; }
|
||||
public WorkItem? WorkItem { get; set; }
|
||||
|
||||
public int BuildingId { get; set; }
|
||||
|
||||
[ForeignKey("BuildingId")]
|
||||
[ValidateNever]
|
||||
public Building Building { get; set; }
|
||||
|
||||
public DateTime AllocationDate { get; set; }
|
||||
public DateTime ReAllocationDate { get; set; }
|
||||
|
||||
public int WorkAreaId { get; set; }
|
||||
|
||||
[ForeignKey("WorkAreaId")]
|
||||
[ValidateNever]
|
||||
public WorkArea WorkArea { get; set; }
|
||||
|
||||
public List<ActivityMaster> AllotedTask { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
|
||||
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
26
Marco.Pms.Model/Activities/TaskComment.cs
Normal file
26
Marco.Pms.Model/Activities/TaskComment.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
{
|
||||
public class TaskComment : TenantTest
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public long TaskAllocationId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TaskAllocationId))]
|
||||
public TaskAllocation? TaskAllocation { get; set; }
|
||||
|
||||
public DateTime CommentDate { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public int CommentedBy { get; set; }
|
||||
[ForeignKey("CommentedBy")]
|
||||
[ValidateNever]
|
||||
public Employee? Employee { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
17
Marco.Pms.Model/Activities/TaskImages.cs
Normal file
17
Marco.Pms.Model/Activities/TaskImages.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
{
|
||||
public class TaskImages
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public long TaskAllocationId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TaskAllocationId))]
|
||||
public TaskAllocation? TaskAllocation { get; set; }
|
||||
|
||||
public string? ImagePath { get; set; }
|
||||
}
|
||||
}
|
||||
27
Marco.Pms.Model/Activities/TaskMembers.cs
Normal file
27
Marco.Pms.Model/Activities/TaskMembers.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
{
|
||||
public class TaskMembers
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public long TaskAllocationId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TaskAllocationId))]
|
||||
public TaskAllocation? TaskAllocation { get; set; }
|
||||
|
||||
public int EmployeeId { get; set; }
|
||||
[ForeignKey("EmployeeId")]
|
||||
[ValidateNever]
|
||||
public Employee? Employee { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,9 @@
|
||||
using Marco.Pms.Model.Dtos.Attendance;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Dtos.Attendance;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.AttendanceModule
|
||||
{
|
||||
@ -27,14 +26,14 @@ namespace Marco.Pms.Model.AttendanceModule
|
||||
public int? ApprovedBy { get; set; }
|
||||
[ForeignKey("EmployeeID")]
|
||||
[ValidateNever]
|
||||
public Employee Approver { get; set; }
|
||||
public Employee? Approver { get; set; }
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
using Marco.Pms.Model.Dtos.Attendance;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Dtos.Attendance;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
namespace Marco.Pms.Model.AttendanceModule
|
||||
@ -46,6 +46,6 @@ namespace Marco.Pms.Model.AttendanceModule
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
{
|
||||
public class JwtSettings
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string Issuer { get; set; }
|
||||
public string Audience { get; set; }
|
||||
public string? Key { get; set; }
|
||||
public string? Issuer { get; set; }
|
||||
public string? Audience { get; set; }
|
||||
public int ExpiresInMinutes { get; set; }
|
||||
public int RefreshTokenExpiresInDays { get; set; }
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ namespace Marco.Pms.Model.Authentication
|
||||
public class RefreshToken
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Token { get; set; }
|
||||
public string UserId { get; set; }
|
||||
public string? Token { get; set; }
|
||||
public string? UserId { get; set; }
|
||||
public DateTime ExpiryDate { get; set; }
|
||||
public bool IsRevoked { get; set; }
|
||||
public bool IsUsed { get; set; }
|
||||
@ -15,6 +15,6 @@ namespace Marco.Pms.Model.Authentication
|
||||
|
||||
|
||||
// Relationship with the User
|
||||
public IdentityUser User { get; set; }
|
||||
public IdentityUser? User { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
12
Marco.Pms.Model/Dtos/Activities/AssignTaskDto.cs
Normal file
12
Marco.Pms.Model/Dtos/Activities/AssignTaskDto.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace Marco.Pms.Model.Dtos.Activities
|
||||
{
|
||||
public class AssignTaskDto
|
||||
{
|
||||
public DateTime AssignmentDate { get; set; }
|
||||
public double PlannedTask { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public List<int>? TaskTeam { get; set; } //Employee Ids
|
||||
public int WorkItemId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Dtos.Activities
|
||||
{
|
||||
public class CreateActivityMasterDto
|
||||
{
|
||||
public string? ActivityName { get; set; }
|
||||
public string? UnitOfMeasurement { get; set; }
|
||||
public List<CreateCheckListDto>? CheckList { get; set; }
|
||||
}
|
||||
}
|
||||
9
Marco.Pms.Model/Dtos/Activities/CreateCheckListDto.cs
Normal file
9
Marco.Pms.Model/Dtos/Activities/CreateCheckListDto.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Dtos.Activities
|
||||
{
|
||||
public class CreateCheckListDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public bool IsMandatory { get; set; }
|
||||
}
|
||||
}
|
||||
11
Marco.Pms.Model/Dtos/Activities/CreateCommentDto.cs
Normal file
11
Marco.Pms.Model/Dtos/Activities/CreateCommentDto.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Marco.Pms.Model.Dtos.Activities
|
||||
{
|
||||
public class CreateCommentDto
|
||||
{
|
||||
public long TaskAllocationId { get; set; }
|
||||
|
||||
public DateTime CommentDate { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
10
Marco.Pms.Model/Dtos/Activities/ReportCheckListDto.cs
Normal file
10
Marco.Pms.Model/Dtos/Activities/ReportCheckListDto.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Marco.Pms.Model.Dtos.Activities
|
||||
{
|
||||
public class ReportCheckListDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Description { get; set; }= string.Empty;
|
||||
public bool IsMandatory { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
}
|
||||
}
|
||||
11
Marco.Pms.Model/Dtos/Activities/ReportTaskDto.cs
Normal file
11
Marco.Pms.Model/Dtos/Activities/ReportTaskDto.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Marco.Pms.Model.Dtos.Activities
|
||||
{
|
||||
public class ReportTaskDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public double CompletedTask { get; set; }
|
||||
public DateTime ReportedDate { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public List<ReportCheckListDto>? CheckList { get; set; }
|
||||
}
|
||||
}
|
||||
@ -5,15 +5,15 @@ namespace Marco.Pms.Model.Dtos.Attendance
|
||||
public class RecordAttendanceDot
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public int EmployeeID { get; set; }
|
||||
public int ProjectID { get; set; }
|
||||
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
public string? MarkTime { get; set; }
|
||||
public string Latitude { get; set; }
|
||||
public string Longitude { get; set; }
|
||||
public string? Latitude { get; set; }
|
||||
public string? Longitude { get; set; }
|
||||
|
||||
|
||||
public ATTENDANCE_MARK_TYPE Action { get; set; }
|
||||
|
||||
@ -7,27 +7,27 @@ namespace Marco.Pms.Model.Dtos.Employees
|
||||
{
|
||||
public ApplicationUserDto() { }
|
||||
public int? Id { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public string? MiddleName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string Gender { get; set; }
|
||||
public string? Gender { get; set; }
|
||||
public DateTime? BirthDate { get; set; }
|
||||
public DateTime? JoiningDate { get; set; }
|
||||
|
||||
public string PeramnentAddress { get; set; }
|
||||
public string CurrentAddress { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string? PermanentAddress { get; set; }
|
||||
public string? CurrentAddress { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
public string EmergencyPhoneNumber { get; set; }
|
||||
public string? EmergencyPhoneNumber { get; set; }
|
||||
|
||||
public string? AadharNumber { get; set; }
|
||||
|
||||
public string? PanNumber { get; set; }
|
||||
|
||||
public IFormFile? Photo { get; set; } // To store the captured photo
|
||||
public List<IFormFile> Documents { get; set; }
|
||||
public List<IFormFile>? Documents { get; set; }
|
||||
public string? ApplicationUserId { get; set; }
|
||||
|
||||
public Guid RoleId { get; set; }
|
||||
|
||||
@ -1,19 +1,8 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Employees
|
||||
namespace Marco.Pms.Model.Dtos.Employees
|
||||
{
|
||||
public class AttendanceDto
|
||||
{
|
||||
public string Comment { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public int EmployeeID { get; set; }
|
||||
public DateTime? InTime { get; set; }
|
||||
public DateTime? OutTime { get; set; }
|
||||
|
||||
@ -1,30 +1,23 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Employees
|
||||
namespace Marco.Pms.Model.Dtos.Employees
|
||||
{
|
||||
public class CreateUserDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public string? MiddleName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string Gender { get; set; }
|
||||
public string? Gender { get; set; }
|
||||
public string? BirthDate { get; set; }
|
||||
public string JoiningDate { get; set; }
|
||||
public string? JoiningDate { get; set; }
|
||||
|
||||
public string? PeramnentAddress { get; set; }
|
||||
public string? PermanentAddress { get; set; }
|
||||
public string? CurrentAddress { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
public string EmergencyPhoneNumber { get; set; }
|
||||
public string EmergencyContactPerson { get; set; }
|
||||
public string? EmergencyPhoneNumber { get; set; }
|
||||
public string? EmergencyContactPerson { get; set; }
|
||||
|
||||
public string? AadharNumber { get; set; }
|
||||
|
||||
@ -33,25 +26,25 @@ namespace Marco.Pms.Model.Dtos.Employees
|
||||
//public IFormFile? Photo { get; set; } // To store the captured photo
|
||||
//public List<IFormFile>? Documents { get; set; }
|
||||
|
||||
public string JobRoleId { get; set; }
|
||||
public string? JobRoleId { get; set; }
|
||||
|
||||
// public int TenantId { get; set; }
|
||||
}
|
||||
public class CreateQuickUserDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
|
||||
public string Gender { get; set; }
|
||||
public string? Gender { get; set; }
|
||||
|
||||
public string? CurrentAddress { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
public string EmergencyPhoneNumber { get; set; }
|
||||
public string EmergencyContactPerson { get; set; }
|
||||
public string? EmergencyPhoneNumber { get; set; }
|
||||
public string? EmergencyContactPerson { get; set; }
|
||||
|
||||
public string JobRoleId { get; set; }
|
||||
public string? JobRoleId { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos
|
||||
{
|
||||
@ -11,6 +6,6 @@ namespace Marco.Pms.Model.Dtos
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
public string Email { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos
|
||||
namespace Marco.Pms.Model.Dtos
|
||||
{
|
||||
public class LoginDto
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string? Username { get; set; }
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
namespace Marco.Pms.Model.Dtos
|
||||
{
|
||||
public class LogoutDto
|
||||
{ public string RefreshToken { get; set; }
|
||||
{ public string? RefreshToken { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,5 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
@ -17,7 +9,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
[DisplayName("Building Name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public int ProjectId { get; set; }
|
||||
|
||||
|
||||
@ -5,10 +5,10 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public class BuildingVM
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public List<FloorsVM> Floors { get; set; }
|
||||
public List<FloorsVM>? Floors { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,15 +8,15 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
//public int Id { get; set; }
|
||||
[Required(ErrorMessage = "Project Name is required!")]
|
||||
[DisplayName("Project Name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
[DisplayName("Project Address")]
|
||||
[Required(ErrorMessage = "Project Address is required!")]
|
||||
public string ProjectAddress { get; set; }
|
||||
public string? ProjectAddress { get; set; }
|
||||
|
||||
|
||||
[DisplayName("Contact Person")]
|
||||
public string ContactPerson { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
@ -1,14 +1,5 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
@ -18,7 +9,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
|
||||
[Required]
|
||||
[DisplayName("Floor Name")]
|
||||
public string FloorName { get; set; }
|
||||
public string? FloorName { get; set; }
|
||||
|
||||
|
||||
public int BuildingId { get; set; }
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
@ -14,9 +9,9 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
|
||||
[Required]
|
||||
[DisplayName("Floor Name")]
|
||||
public string FloorName { get; set; }
|
||||
public string? FloorName { get; set; }
|
||||
|
||||
public List<WorkAreaVM> WorkAreas { get; set; }
|
||||
public List<WorkAreaVM>? WorkAreas { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,4 @@
|
||||
using Marco.Pms.Model.Projects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class InfraDot
|
||||
{
|
||||
|
||||
@ -1,14 +1,5 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
@ -17,15 +8,15 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public int Id { get; set; }
|
||||
[Required(ErrorMessage = "Project Name is required!")]
|
||||
[DisplayName("Project Name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
[DisplayName("Project Address")]
|
||||
[Required(ErrorMessage = "Project Address is required!")]
|
||||
public string ProjectAddress { get; set; }
|
||||
public string? ProjectAddress { get; set; }
|
||||
|
||||
|
||||
[DisplayName("Contact Person")]
|
||||
public string ContactPerson { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
@ -1,15 +1,8 @@
|
||||
using Marco.Pms.Model.Projects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class ProjectVM : ProjectDto
|
||||
{
|
||||
public List<BuildingVM> Buildings { get; set; }
|
||||
public List<BuildingVM>? Buildings { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,15 +8,15 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
public int Id { get; set; }
|
||||
[Required(ErrorMessage = "Project Name is required!")]
|
||||
[DisplayName("Project Name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
[DisplayName("Project Address")]
|
||||
[Required(ErrorMessage = "Project Address is required!")]
|
||||
public string ProjectAddress { get; set; }
|
||||
public string? ProjectAddress { get; set; }
|
||||
|
||||
|
||||
[DisplayName("Contact Person")]
|
||||
public string ContactPerson { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
@ -1,14 +1,5 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
@ -19,7 +10,7 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
|
||||
[Required]
|
||||
[DisplayName("Area Name")]
|
||||
public string AreaName { get; set; }
|
||||
public string? AreaName { get; set; }
|
||||
|
||||
public int FloorId { get; set; }
|
||||
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
@ -14,9 +9,9 @@ namespace Marco.Pms.Model.Dtos.Project
|
||||
|
||||
[Required]
|
||||
[DisplayName("Area Name")]
|
||||
public string AreaName { get; set; }
|
||||
public string? AreaName { get; set; }
|
||||
|
||||
public List<WorkItemVM> WorkItems { get; set; }
|
||||
public List<WorkItemVM>? WorkItems { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
using Marco.Pms.Model.Activities;
|
||||
using Marco.Pms.Model.Projects;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Project
|
||||
{
|
||||
public class WorkItemVM
|
||||
{
|
||||
public int WorkItemId { get; set; }
|
||||
public WorkItem WorkItem { get; set; }
|
||||
public WorkItem? WorkItem { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos
|
||||
namespace Marco.Pms.Model.Dtos
|
||||
{
|
||||
public class RefreshTokenDto
|
||||
{
|
||||
public string Token { get; set; }
|
||||
public string RefreshToken { get; set; }
|
||||
public string? Token { get; set; }
|
||||
public string? RefreshToken { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,26 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos
|
||||
{
|
||||
public class RegisterDto
|
||||
{
|
||||
[Required]
|
||||
public string Username { get; set; }
|
||||
public string? Username { get; set; }
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[MinLength(6)]
|
||||
public string Password { get; set; }
|
||||
public string? Password { get; set; }
|
||||
|
||||
[Compare("Password", ErrorMessage = "Passwords do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
public string? ConfirmPassword { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,13 +6,13 @@ namespace Marco.Pms.Model.Dtos
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Token { get; set; }
|
||||
public string Token { get; set; }= string.Empty;
|
||||
|
||||
[Required]
|
||||
[MinLength(6)]
|
||||
public string NewPassword { get; set; }
|
||||
public string? NewPassword { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Roles
|
||||
{
|
||||
@ -11,13 +8,13 @@ namespace Marco.Pms.Model.Dtos.Roles
|
||||
[Required(ErrorMessage = "Role Name is required!")]
|
||||
[DisplayName("Name")]
|
||||
|
||||
public string Role { get; set; }
|
||||
public string? Role { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Role Description is required!")]
|
||||
[DisplayName("Description")]
|
||||
|
||||
public string Description { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public List<FeaturesPermissionDto> FeaturesPermission { get; set; } // Features assigned to this role
|
||||
public List<FeaturesPermissionDto>? FeaturesPermission { get; set; } // Features assigned to this role
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Roles
|
||||
namespace Marco.Pms.Model.Dtos.Roles
|
||||
{
|
||||
public class CreateJobRoleDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Roles
|
||||
@ -11,15 +10,15 @@ namespace Marco.Pms.Model.Dtos.Roles
|
||||
[Required(ErrorMessage = "Role Name is required!")]
|
||||
[DisplayName("Name")]
|
||||
|
||||
public string Role { get; set; }
|
||||
public string? Role { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Role Description is required!")]
|
||||
[DisplayName("Description")]
|
||||
|
||||
public string Description { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
public List<FeaturesPermissionDto> FeaturesPermission { get; set; } // Features assigned to this role
|
||||
public List<FeaturesPermissionDto>? FeaturesPermission { get; set; } // Features assigned to this role
|
||||
}
|
||||
|
||||
public class FeaturesPermissionDto
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.Roles
|
||||
namespace Marco.Pms.Model.Dtos.Roles
|
||||
{
|
||||
public class UpdateJobRoleDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
{
|
||||
public class EmailDot
|
||||
{
|
||||
public string ToEmail { get; set; }
|
||||
public string FromEmail { get; set; }
|
||||
public string MailBody { get; set; }
|
||||
public string MailSubject { get; set; }
|
||||
public string? ToEmail { get; set; }
|
||||
public string? FromEmail { get; set; }
|
||||
public string? MailBody { get; set; }
|
||||
public string? MailSubject { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
13
Marco.Pms.Model/Dtos/Util/InquiryDto.cs
Normal file
13
Marco.Pms.Model/Dtos/Util/InquiryDto.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Marco.Pms.Model.Dtos.Util
|
||||
{
|
||||
public class InquiryDto
|
||||
{
|
||||
public string? OrganizatioinName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? About { get; set; }
|
||||
public string? OragnizationSize { get; set; }
|
||||
public int IndustryId { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? ContactNumber { get; set; }
|
||||
}
|
||||
}
|
||||
@ -8,21 +8,21 @@ namespace Marco.Pms.Model.Employees
|
||||
public class Employee
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public string? MiddleName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string Gender { get; set; }
|
||||
public string? Gender { get; set; }
|
||||
public DateTime? BirthDate { get; set; }
|
||||
public DateTime? JoiningDate { get; set; }
|
||||
|
||||
public string PeramnentAddress { get; set; }
|
||||
public string CurrentAddress { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string? PermanentAddress { get; set; }
|
||||
public string? CurrentAddress { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
public string EmergencyPhoneNumber { get; set; }
|
||||
public string EmergencyContactPerson { get; set; }
|
||||
public string? EmergencyPhoneNumber { get; set; }
|
||||
public string? EmergencyContactPerson { get; set; }
|
||||
|
||||
|
||||
public string? AadharNumber { get; set; }
|
||||
@ -42,8 +42,7 @@ namespace Marco.Pms.Model.Employees
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
|
||||
public Tenant? Tenant { get; set; }
|
||||
public Guid RoleId { get; set; }
|
||||
//[ForeignKey(nameof(RoleId))]
|
||||
//public EmployeeRole EmployeeRole { get; set; }
|
||||
|
||||
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Employees
|
||||
namespace Marco.Pms.Model.Employees
|
||||
{
|
||||
public class EmployeeDetails : Employee
|
||||
{
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Employees
|
||||
{
|
||||
public class EmployeeDocument
|
||||
{
|
||||
public Guid Id { get; set; } // Unique identifier for the document
|
||||
public string FileName { get; set; } // Original file name
|
||||
public string FilePath { get; set; } // Path to the stored file
|
||||
public string FileType { get; set; } // Type of the document (e.g., PDF, JPG)
|
||||
public string? FileName { get; set; } // Original file name
|
||||
public string? FilePath { get; set; } // Path to the stored file
|
||||
public string? FileType { get; set; } // Type of the document (e.g., PDF, JPG)
|
||||
public long FileSize { get; set; } // File size in bytes
|
||||
public DateTime UploadedAt { get; set; } // Timestamp of upload
|
||||
|
||||
public Guid EmployeeId { get; set; } // Foreign key to Employee
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(EmployeeId))]
|
||||
public Employee Employee { get; set; } // Navigation property to Employee
|
||||
public Employee? Employee { get; set; } // Navigation property to Employee
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ namespace Marco.Pms.Model.Employees
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Shift Name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public TimeOnly StartTime { get; set; }
|
||||
public TimeOnly EndTime { get; set; }
|
||||
|
||||
@ -18,7 +18,7 @@ namespace Marco.Pms.Model.Employees
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
12
Marco.Pms.Model/Entitlements/ActivityCheckList.cs
Normal file
12
Marco.Pms.Model/Entitlements/ActivityCheckList.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class ActivityCheckList
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ActivityId { get; set; }
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
public bool IsChecked { get; set; } = false;
|
||||
public bool IsMandatory { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,26 +1,22 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class ActivityMaster
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string ActivityName { get; set; }
|
||||
public string? ActivityName { get; set; }
|
||||
|
||||
public string UnitOfMeasurement { get; set; }
|
||||
public string? UnitOfMeasurement { get; set; }
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class ApplicationRole
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Role { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string? Role { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public int TenantId { get; set; }
|
||||
|
||||
|
||||
9
Marco.Pms.Model/Entitlements/CheckListMappings.cs
Normal file
9
Marco.Pms.Model/Entitlements/CheckListMappings.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class CheckListMappings
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public long TaskAllocationId { get; set; }
|
||||
public int CheckListId { get; set; }
|
||||
}
|
||||
}
|
||||
@ -7,18 +7,18 @@ namespace Marco.Pms.Model.Entitlements
|
||||
public class Tenant
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string DomainName { get; set; }
|
||||
public string ContactName { get; set; }
|
||||
public string ContactNumber { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? DomainName { get; set; }
|
||||
public string? ContactName { get; set; }
|
||||
public string? ContactNumber { get; set; }
|
||||
public DateTime OnBoardingDate { get; set; }
|
||||
public string? OragnizationSize { get; set; }
|
||||
public int? IndustryId { get;set; }
|
||||
|
||||
[ForeignKey("IndustryId")]
|
||||
[ValidateNever]
|
||||
public Industry Industry{ get; set; }
|
||||
public Industry? Industry{ get; set; }
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
@ -11,19 +10,19 @@ namespace Marco.Pms.Model.Entitlements
|
||||
public int EmployeeId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(EmployeeId))]
|
||||
public Employee Employee { get; set; } // Navigation property to Employee
|
||||
public Employee? Employee { get; set; } // Navigation property to Employee
|
||||
|
||||
public Guid RoleId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(RoleId))]
|
||||
public ApplicationRole Role { get; set; }
|
||||
public ApplicationRole? Role { get; set; }
|
||||
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,12 +9,12 @@ namespace Marco.Pms.Model.Entitlements
|
||||
public int ModuleId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(ModuleId))]
|
||||
public Module Module { get; set; }
|
||||
public string Name { get; set; } // Feature name
|
||||
public string Description { get; set; } // Feature description
|
||||
public Module? Module { get; set; }
|
||||
public string? Name { get; set; } // Feature name
|
||||
public string? Description { get; set; } // Feature description
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<FeaturePermission> FeaturePermissions { get; set; } // Features assigned to this role
|
||||
public ICollection<FeaturePermission>? FeaturePermissions { get; set; }// Features assigned to this role
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,12 +1,5 @@
|
||||
using Marco.Pms.Model.Projects;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
@ -17,10 +10,10 @@ namespace Marco.Pms.Model.Entitlements
|
||||
public Guid FeatureId { get; set; } // Foreign key to Feature
|
||||
[ForeignKey("FeatureId")]
|
||||
[ValidateNever]
|
||||
public Feature Feature { get; set; }
|
||||
public Feature? Feature { get; set; }
|
||||
|
||||
public string Name { get; set; } // Feature name
|
||||
public string Description { get; set; } // Feature description
|
||||
public string? Name { get; set; } // Feature name
|
||||
public string? Description { get; set; } // Feature description
|
||||
|
||||
public bool IsEnabled { get; set; } // Whether the feature is enabled for this role
|
||||
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class JobRole
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,9 +13,9 @@ namespace Marco.Pms.Model.Entitlements
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,24 +1,19 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
{
|
||||
public class StatusMaster
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string? Status { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,6 @@
|
||||
public class Industry
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
170
Marco.Pms.Model/Mapper/ActivitiesMapper.cs
Normal file
170
Marco.Pms.Model/Mapper/ActivitiesMapper.cs
Normal file
@ -0,0 +1,170 @@
|
||||
using Marco.Pms.Model.Activities;
|
||||
using Marco.Pms.Model.Dtos.Activities;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.ViewModels.Activities;
|
||||
#nullable disable
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
public static class ActivitiesMapper
|
||||
{
|
||||
public static TaskAllocation ToTaskAllocationFromAssignTaskDto(this AssignTaskDto assignTask, int EmployeeId,int tenantId)
|
||||
{
|
||||
return new TaskAllocation
|
||||
{
|
||||
AssignmentDate = assignTask.AssignmentDate,
|
||||
PlannedTask = assignTask.PlannedTask,
|
||||
CompletedTask = 0,
|
||||
Description = assignTask.Description,
|
||||
AssignedBy = EmployeeId,
|
||||
WorkItemId = assignTask.WorkItemId,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TaskComment ToCommentFromReportTaskDto(this ReportTaskDto reportTask, int tenantId, int EmployeeId)
|
||||
{
|
||||
return new TaskComment
|
||||
{
|
||||
TaskAllocationId = reportTask.Id,
|
||||
CommentDate = reportTask.ReportedDate,
|
||||
Comment = reportTask.Comment,
|
||||
CommentedBy = EmployeeId,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TaskComment ToCommentFromCommentDto(this CreateCommentDto createComment, int tenantId, int EmployeeId) {
|
||||
return new TaskComment {
|
||||
TaskAllocationId = createComment.TaskAllocationId,
|
||||
CommentDate = createComment.CommentDate,
|
||||
Comment = createComment.Comment,
|
||||
CommentedBy = EmployeeId,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static TaskVM TaskAllocationToTaskVM(this TaskAllocation taskAllocation,string employeeName,string tenant )
|
||||
{
|
||||
return new TaskVM
|
||||
{
|
||||
Id = taskAllocation.Id,
|
||||
AssignmentDate = taskAllocation.AssignmentDate,
|
||||
PlannedTask = taskAllocation.PlannedTask,
|
||||
CompletedTask = taskAllocation.CompletedTask,
|
||||
ReportedDate = taskAllocation.ReportedDate,
|
||||
Description = taskAllocation.Description,
|
||||
AssignBy = employeeName,
|
||||
Tenant = tenant,
|
||||
WorkItem = taskAllocation.WorkItem
|
||||
};
|
||||
}
|
||||
public static AssignedTaskVM ToAssignTaskVMFromTaskAllocation(this TaskAllocation taskAllocation)
|
||||
{
|
||||
return new AssignedTaskVM
|
||||
{
|
||||
Id = taskAllocation.Id,
|
||||
AssignmentDate = taskAllocation.AssignmentDate,
|
||||
PlannedTask = taskAllocation.PlannedTask,
|
||||
CompletedTask = taskAllocation.CompletedTask,
|
||||
ReportedDate= taskAllocation.ReportedDate,
|
||||
Description = taskAllocation.Description,
|
||||
AssignedBy = taskAllocation.Employee.ToEmployeeVMFromEmployee(),
|
||||
WorkItemId = taskAllocation.WorkItemId,
|
||||
TenantId = taskAllocation.TenantId
|
||||
};
|
||||
}
|
||||
public static ReportTaskVM ToReportTaskVMFromTaskAllocation(this TaskAllocation taskAllocation)
|
||||
{
|
||||
return new ReportTaskVM
|
||||
{
|
||||
Id = taskAllocation.Id,
|
||||
AssignmentDate = taskAllocation.AssignmentDate,
|
||||
PlannedTask = taskAllocation.PlannedTask,
|
||||
CompletedTask = taskAllocation.CompletedTask,
|
||||
ReportedDate = taskAllocation.ReportedDate,
|
||||
Description = taskAllocation.Description,
|
||||
AssignedBy = taskAllocation.AssignedBy,
|
||||
WorkItemId = taskAllocation.WorkItemId,
|
||||
TenantId = taskAllocation.TenantId
|
||||
};
|
||||
}
|
||||
public static ActivityMaster ToActivityMasterFromCreateActivityMasterDto(this CreateActivityMasterDto createActivity,int tenantId)
|
||||
{
|
||||
return new ActivityMaster
|
||||
{
|
||||
ActivityName = createActivity.ActivityName,
|
||||
UnitOfMeasurement = createActivity.UnitOfMeasurement,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
|
||||
public static ListTaskVM ToListTaskVMFromTaskAllocation(this TaskAllocation taskAllocation)
|
||||
{
|
||||
return new ListTaskVM
|
||||
{
|
||||
Id = taskAllocation.Id,
|
||||
AssignmentDate = taskAllocation.AssignmentDate,
|
||||
PlannedTask = taskAllocation.PlannedTask,
|
||||
CompletedTask = taskAllocation.CompletedTask,
|
||||
AssignedBy = taskAllocation.Employee.ToBasicEmployeeVMFromEmployee(),
|
||||
WorkItemId = taskAllocation.WorkItemId,
|
||||
WorkItem = taskAllocation.WorkItem,
|
||||
TenantId = taskAllocation.TenantId,
|
||||
//CheckList =
|
||||
};
|
||||
}
|
||||
public static CommentVM ToCommentVMFromTaskComment(this TaskComment comment)
|
||||
{
|
||||
return new CommentVM
|
||||
{
|
||||
Id = comment.Id,
|
||||
TaskAllocationId = comment.TaskAllocationId,
|
||||
CommentDate = comment.CommentDate,
|
||||
Comment = comment.Comment,
|
||||
CommentedBy = comment.CommentedBy,
|
||||
Employee = comment.Employee.ToBasicEmployeeVMFromEmployee()
|
||||
};
|
||||
}
|
||||
|
||||
public static ActivityVM ToActivityVMFromActivityMaster(this ActivityMaster activity,List<CheckListVM> checkList)
|
||||
{
|
||||
return new ActivityVM
|
||||
{
|
||||
Id = activity.Id,
|
||||
ActivityName = activity.ActivityName,
|
||||
UnitOfMeasurement = activity.UnitOfMeasurement,
|
||||
CheckLists = checkList,
|
||||
};
|
||||
}
|
||||
public static CheckListVM ToCheckListVMFromActivityCheckList(this ActivityCheckList checkList,int activityId,bool IsChecked)
|
||||
{
|
||||
return new CheckListVM
|
||||
{
|
||||
Id = checkList.Id,
|
||||
Description = checkList.Description,
|
||||
ActivityId = activityId,
|
||||
IsChecked = IsChecked,
|
||||
IsMandatory = checkList.IsMandatory,
|
||||
};
|
||||
}
|
||||
public static ActivityCheckList ToActivityCheckListFromCreateCheckListDto(this CreateCheckListDto checkListDto,int tenantId,int activityId)
|
||||
{
|
||||
return new ActivityCheckList
|
||||
{
|
||||
Id = checkListDto.Id,
|
||||
Description = checkListDto.Description,
|
||||
ActivityId = activityId,
|
||||
IsMandatory = checkListDto.IsMandatory,
|
||||
TenantId = tenantId
|
||||
};
|
||||
}
|
||||
public static CheckListVM ToCheckListVMFromReportCheckListDto(this ReportCheckListDto checkListDto, int activityId)
|
||||
{
|
||||
return new CheckListVM
|
||||
{
|
||||
Id = checkListDto.Id,
|
||||
Description = checkListDto.Description,
|
||||
ActivityId = activityId,
|
||||
IsChecked = checkListDto.IsChecked,
|
||||
IsMandatory = checkListDto.IsMandatory,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
using Marco.Pms.Model.Dtos.Roles;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.ViewModels;
|
||||
|
||||
#nullable disable
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
public static class ApplicationRoleMapper
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.ViewModels.Activities;
|
||||
using Marco.Pms.Model.ViewModels.Employee;
|
||||
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
@ -24,12 +25,36 @@ namespace Marco.Pms.Model.Mapper
|
||||
JobRole = (model.JobRole != null ? model.JobRole.Name : null),
|
||||
JobRoleId = model.JobRoleId,
|
||||
PanNumber = model.PanNumber,
|
||||
PeramnentAddress = model.PeramnentAddress,
|
||||
PermanentAddress = model.PermanentAddress,
|
||||
PhoneNumber = model.PhoneNumber,
|
||||
Photo = model.Photo,
|
||||
IsActive = model.IsActive,
|
||||
JoiningDate = model.JoiningDate
|
||||
};
|
||||
}
|
||||
public static BasicEmployeeVM ToBasicEmployeeVMFromEmployee(this Employee employee)
|
||||
{
|
||||
if (employee.JobRole == null)
|
||||
{
|
||||
return new BasicEmployeeVM
|
||||
{
|
||||
Id = employee.Id,
|
||||
FirstName = employee.FirstName,
|
||||
LastName = employee.LastName,
|
||||
Photo = employee.Photo,
|
||||
JobRoleId = employee.JobRoleId,
|
||||
JobRoleName = ""
|
||||
};
|
||||
}
|
||||
return new BasicEmployeeVM
|
||||
{
|
||||
Id = employee.Id,
|
||||
FirstName = employee.FirstName,
|
||||
LastName = employee.LastName,
|
||||
Photo = employee.Photo,
|
||||
JobRoleId = employee.JobRoleId,
|
||||
JobRoleName = employee.JobRole.Name
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
using Marco.Pms.Model.Dtos.Employees;
|
||||
using Marco.Pms.Model.Dtos.Roles;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.ViewModels;
|
||||
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Marco.Pms.Model.Dtos.Roles;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.ViewModels;
|
||||
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
|
||||
@ -1,11 +1,5 @@
|
||||
using Marco.Pms.Model.Activities;
|
||||
using Marco.Pms.Model.Dtos.Project;
|
||||
using Marco.Pms.Model.Dtos.Project;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
@ -68,5 +62,12 @@ namespace Marco.Pms.Model.Mapper
|
||||
|
||||
};
|
||||
}
|
||||
//public static WorkItemVm ToWorkItemVMFromWorkItem(this WorkItem workItem)
|
||||
//{
|
||||
// return new WorkItemVm
|
||||
// {
|
||||
// Id
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
36
Marco.Pms.Model/Mapper/InquiryMapper.cs
Normal file
36
Marco.Pms.Model/Mapper/InquiryMapper.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Marco.Pms.Model.Dtos.Util;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
public static class InquiryMapper
|
||||
{
|
||||
public static Inquiries ToInquiriesFromInquiriesDto(this InquiryDto inquiryDto) {
|
||||
return new Inquiries
|
||||
{
|
||||
Id = 0,
|
||||
OrganizatioinName = inquiryDto.OrganizatioinName,
|
||||
OragnizationSize = inquiryDto.OragnizationSize,
|
||||
IndustryId = inquiryDto.IndustryId,
|
||||
Email = inquiryDto.Email,
|
||||
ContactPerson = inquiryDto.ContactPerson,
|
||||
ContactNumber = inquiryDto.ContactNumber,
|
||||
About = inquiryDto.About
|
||||
};
|
||||
}
|
||||
|
||||
public static InquiryEmailObject ToInquiryEmailObjectFromInquiriesDto(this InquiryDto inquiryDto,string industryName)
|
||||
{
|
||||
return new InquiryEmailObject
|
||||
{
|
||||
OrganizatioinName = inquiryDto.OrganizatioinName,
|
||||
OragnizationSize = inquiryDto.OragnizationSize,
|
||||
IndustryName = industryName,
|
||||
Email = inquiryDto.Email,
|
||||
ContactPerson = inquiryDto.ContactPerson,
|
||||
ContactNumber = inquiryDto.ContactNumber,
|
||||
About = inquiryDto.About
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
using Marco.Pms.Model.Dtos.Project;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.ViewModels;
|
||||
|
||||
namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
@ -24,9 +25,9 @@ namespace Marco.Pms.Model.Mapper
|
||||
{
|
||||
return new Project
|
||||
{
|
||||
ContactPerson = projectModel.ContactPerson,
|
||||
ProjectAddress = projectModel.ProjectAddress,
|
||||
Name = projectModel.Name,
|
||||
ContactPerson = projectModel.ContactPerson ?? "",
|
||||
ProjectAddress = projectModel.ProjectAddress ?? "",
|
||||
Name = projectModel.Name ?? "",
|
||||
EndDate = projectModel.EndDate,
|
||||
StartDate = projectModel.StartDate,
|
||||
TenantId = TenantId,
|
||||
@ -39,9 +40,9 @@ namespace Marco.Pms.Model.Mapper
|
||||
return new Project
|
||||
{
|
||||
Id = id,
|
||||
ContactPerson = projectModel.ContactPerson,
|
||||
ProjectAddress = projectModel.ProjectAddress,
|
||||
Name = projectModel.Name,
|
||||
ContactPerson = projectModel.ContactPerson ?? "",
|
||||
ProjectAddress = projectModel.ProjectAddress ?? "",
|
||||
Name = projectModel.Name ?? "",
|
||||
EndDate = projectModel.EndDate,
|
||||
StartDate = projectModel.StartDate,
|
||||
TenantId = TenantId,
|
||||
@ -61,6 +62,19 @@ namespace Marco.Pms.Model.Mapper
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public static ProjectListVM ToProjectListVMFromProject(this Project project)
|
||||
{
|
||||
return new ProjectListVM
|
||||
{
|
||||
Id = project.Id,
|
||||
Name = project.Name,
|
||||
ProjectAddress = project.ProjectAddress,
|
||||
ProjectStatusId = project.ProjectStatusId,
|
||||
ContactPerson = project.ContactPerson,
|
||||
StartDate = project.StartDate,
|
||||
EndDate = project.EndDate,
|
||||
TenantId = project.TenantId
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ namespace Marco.Pms.Model.Projects
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
[DisplayName("Building Name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public int ProjectId { get; set; }
|
||||
@ -23,6 +23,6 @@ namespace Marco.Pms.Model.Projects
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
@ -17,14 +12,14 @@ namespace Marco.Pms.Model.Projects
|
||||
|
||||
[Required]
|
||||
[DisplayName("Floor Name")]
|
||||
public string FloorName { get; set; }
|
||||
public string? FloorName { get; set; }
|
||||
|
||||
|
||||
public int BuildingId { get; set; }
|
||||
|
||||
[ForeignKey("BuildingId")]
|
||||
[ValidateNever]
|
||||
public Building Building { get; set; }
|
||||
public Building? Building { get; set; }
|
||||
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
@ -32,6 +27,6 @@ namespace Marco.Pms.Model.Projects
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,15 +7,15 @@ namespace Marco.Pms.Model.Projects
|
||||
public class PhotoGallary
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public int ProjectId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(ProjectId))]
|
||||
public Project? Project { get; set; }
|
||||
public string AddedBy { get; set; }
|
||||
public string? AddedBy { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(AddedBy))]
|
||||
public ApplicationUser? ApplicationUser { get; set; }
|
||||
public ApplicationUser? ApplicationUser { get; set; }
|
||||
public DateTime AddedOn { get; set; }
|
||||
public required string Imagebase64 { get; set; }
|
||||
}
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
@ -18,14 +12,14 @@ namespace Marco.Pms.Model.Projects
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
[DisplayName("Project Name")]
|
||||
public string Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
[DisplayName("Project Address")]
|
||||
public string ProjectAddress { get; set; }
|
||||
public string? ProjectAddress { get; set; }
|
||||
|
||||
[DisplayName("Contact Person")]
|
||||
|
||||
public string ContactPerson { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
@ -35,13 +29,13 @@ namespace Marco.Pms.Model.Projects
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(ProjectStatusId))]
|
||||
public StatusMaster ProjectStatus { get; set; }
|
||||
public StatusMaster? ProjectStatus { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
@ -12,7 +12,7 @@ namespace Marco.Pms.Model.Projects
|
||||
public int EmployeeId { get; set; }
|
||||
[ForeignKey("EmployeeId")]
|
||||
[ValidateNever]
|
||||
public Employee Employee { get; set; }
|
||||
public Employee? Employee { get; set; }
|
||||
|
||||
public int? JobRoleId { get; set; }
|
||||
//[ForeignKey("EmployeeRoleId")]
|
||||
@ -24,7 +24,7 @@ namespace Marco.Pms.Model.Projects
|
||||
public int ProjectId { get; set; }
|
||||
[ForeignKey("ProjectId")]
|
||||
[ValidateNever]
|
||||
public Project Project { get; set; }
|
||||
public Project? Project { get; set; }
|
||||
|
||||
|
||||
public DateTime AllocationDate { get; set; }
|
||||
@ -35,6 +35,6 @@ namespace Marco.Pms.Model.Projects
|
||||
public int TenantId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,8 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Activities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
@ -19,13 +13,13 @@ namespace Marco.Pms.Model.Projects
|
||||
|
||||
[Required]
|
||||
[DisplayName("Area Name")]
|
||||
public string AreaName { get; set; }
|
||||
public string? AreaName { get; set; }
|
||||
|
||||
public int FloorId { get; set; }
|
||||
|
||||
[ForeignKey("FloorId")]
|
||||
[ValidateNever]
|
||||
public Floor Floor { get; set; }
|
||||
public Floor? Floor { get; set; }
|
||||
|
||||
//[ValidateNever]
|
||||
//public List<WorkItem> WorkItems { get; set; }
|
||||
@ -35,6 +29,7 @@ namespace Marco.Pms.Model.Projects
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
public class WorkItem
|
||||
{
|
||||
@ -14,15 +13,15 @@ namespace Marco.Pms.Model.Activities
|
||||
public int WorkAreaId { get; set; }
|
||||
[ForeignKey("WorkAreaId")]
|
||||
[ValidateNever]
|
||||
public WorkArea WorkArea { get; set; }
|
||||
public WorkArea? WorkArea { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("ActivityId")]
|
||||
[ValidateNever]
|
||||
public ActivityMaster ActivityMaster { get; set; }
|
||||
public ActivityMaster? ActivityMaster { get; set; }
|
||||
|
||||
public int PlannedWork { get; set; }
|
||||
public int CompletedWork { get; set; }
|
||||
public double PlannedWork { get; set; }
|
||||
public double CompletedWork { get; set; }
|
||||
public DateTime TaskDate { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
@ -30,6 +29,6 @@ namespace Marco.Pms.Model.Activities
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,29 +1,28 @@
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Activities
|
||||
namespace Marco.Pms.Model.Projects
|
||||
{
|
||||
public class WorkItemMapping
|
||||
public class WorkItemMapping1
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int WorkAreaId { get; set; }
|
||||
[ForeignKey("WorkAreaId")]
|
||||
[ValidateNever]
|
||||
public WorkArea WorkArea { get; set; }
|
||||
public WorkArea? WorkArea { get; set; }
|
||||
public int WorkItemId { get; set; }
|
||||
[ForeignKey("WorkItemId")]
|
||||
[ValidateNever]
|
||||
public WorkItem WorkItem { get; set; }
|
||||
public WorkItem? WorkItem { get; set; }
|
||||
|
||||
[DisplayName("TenantId")]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant Tenant { get; set; }
|
||||
public Tenant? Tenant { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,5 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
#nullable disable
|
||||
namespace Marco.Pms.Model.Providers
|
||||
{
|
||||
public sealed class TenantProvider
|
||||
|
||||
@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
#nullable disable
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
{
|
||||
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
{
|
||||
public class AuthResponse
|
||||
{
|
||||
public string AccessToken { get; set; }
|
||||
public string RefreshToken { get; set; }
|
||||
public string? AccessToken { get; set; }
|
||||
public string? RefreshToken { get; set; }
|
||||
public int ExpiresIn { get; set; }
|
||||
public object User { get; set; }
|
||||
public object? User { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,13 +9,13 @@ namespace Marco.Pms.Model.Utilities
|
||||
public class FileDetails
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public byte[] FileData { get; set; } // Byte array for the file
|
||||
public string FileName { get; set; }
|
||||
public string ContentType { get; set; }
|
||||
public byte[]? FileData { get; set; } // Byte array for the file
|
||||
public string? FileName { get; set; }
|
||||
public string? ContentType { get; set; }
|
||||
/// <summary>
|
||||
/// Name of the file as stored on disk
|
||||
/// </summary>
|
||||
public string StoredName { get; set; }
|
||||
public string? StoredName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
{
|
||||
public class FileUploadModel
|
||||
{
|
||||
public string FileName { get; set; } // Name of the file (e.g., "image1.png")
|
||||
public string Base64Data { get; set; } // Base64-encoded string of the file
|
||||
public string ContentType { get; set; } // MIME type (e.g., "image/png", "application/pdf")
|
||||
public string? FileName { get; set; } // Name of the file (e.g., "image1.png")
|
||||
public string? Base64Data { get; set; } // Base64-encoded string of the file
|
||||
public string? ContentType { get; set; } // MIME type (e.g., "image/png", "application/pdf")
|
||||
public long FileSize { get; set; } // File size in bytes
|
||||
public string Description { get; set; } // Optional: Description or purpose of the file
|
||||
public string? Description { get; set; } // Optional: Description or purpose of the file
|
||||
}
|
||||
}
|
||||
|
||||
14
Marco.Pms.Model/Utilities/Inquiries.cs
Normal file
14
Marco.Pms.Model/Utilities/Inquiries.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
{
|
||||
public class Inquiries
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? OrganizatioinName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? About { get; set; }
|
||||
public string? OragnizationSize { get; set; }
|
||||
public int IndustryId { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? ContactNumber { get; set; }
|
||||
}
|
||||
}
|
||||
13
Marco.Pms.Model/Utilities/InquiryEmailObject.cs
Normal file
13
Marco.Pms.Model/Utilities/InquiryEmailObject.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
{
|
||||
public class InquiryEmailObject
|
||||
{
|
||||
public string? OrganizatioinName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? About { get; set; }
|
||||
public string? OragnizationSize { get; set; }
|
||||
public string? IndustryName { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? ContactNumber { get; set; }
|
||||
}
|
||||
}
|
||||
@ -2,11 +2,11 @@
|
||||
{
|
||||
public class SmtpSettings
|
||||
{
|
||||
public string SmtpServer { get; set; }
|
||||
public string? SmtpServer { get; set; }
|
||||
public int Port { get; set; }
|
||||
public string SenderName { get; set; }
|
||||
public string SenderEmail { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string? SenderName { get; set; }
|
||||
public string? SenderEmail { get; set; }
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
15
Marco.Pms.Model/Utilities/TenantTest.cs
Normal file
15
Marco.Pms.Model/Utilities/TenantTest.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
{
|
||||
public class TenantTest
|
||||
{
|
||||
public int TenantId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey(nameof(TenantId))]
|
||||
public Tenant? Tenant { get; set; }
|
||||
}
|
||||
}
|
||||
11
Marco.Pms.Model/ViewModels/Activities/ActivityVM.cs
Normal file
11
Marco.Pms.Model/ViewModels/Activities/ActivityVM.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Marco.Pms.Model.ViewModels.Activities
|
||||
{
|
||||
public class ActivityVM
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? ActivityName { get; set; }
|
||||
|
||||
public string? UnitOfMeasurement { get; set; }
|
||||
public List<CheckListVM>? CheckLists { get; set; }
|
||||
}
|
||||
}
|
||||
26
Marco.Pms.Model/ViewModels/Activities/AssignedTaskVM.cs
Normal file
26
Marco.Pms.Model/ViewModels/Activities/AssignedTaskVM.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Marco.Pms.Model.Activities;
|
||||
using Marco.Pms.Model.ViewModels.Employee;
|
||||
|
||||
|
||||
namespace Marco.Pms.Model.ViewModels.Activities
|
||||
{
|
||||
public class AssignedTaskVM
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
|
||||
public DateTime AssignmentDate { get; set; }
|
||||
public double PlannedTask { get; set; }
|
||||
public double CompletedTask { get; set; }
|
||||
public DateTime? ReportedDate { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public EmployeeVM? AssignedBy { get; set; }
|
||||
|
||||
public int WorkItemId { get; set; }
|
||||
public int TenantId { get; set; }
|
||||
public List<EmployeeVM>? teamMembers { 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