Compare commits

...

74 Commits

Author SHA1 Message Date
7b1cce26c8 Merge branch 'TenantManagementV1' of https://git.marcoaiot.com/admin/marco.pms.api into TenantManagementV1 2025-04-21 12:03:38 +05:30
f2e2862b0f Perform CRUD oprations on Tenanat 2025-04-21 12:02:46 +05:30
fa5a8c178d Add API tag in controll rout path 2025-04-19 12:58:34 +05:30
dcd39db3b0 Move request demo api to separate market controller 2025-04-19 12:40:03 +05:30
aa1d5020f7 Merge pull request 'Created API to Request Demo of application and added table to store the data of user as well send to selected emails' (#22) from Ashutosh_Task_#67_Request_Demo into Feature_Task_management
Reviewed-on: #22
2025-04-19 05:31:45 +00:00
91cffbc632 Changed email seprator from "," to ";" 2025-04-18 18:10:53 +05:30
f45f75befb Created API to Request Demo of application and added table to store the data of user 2025-04-18 14:07:08 +05:30
0ac0de143d Merge pull request 'Added A new API to get list of Industries from its master table' (#21) from Ashutosh_Task_#79_Get_Industries_API into Feature_Task_management
Reviewed-on: #21
2025-04-16 11:42:45 +00:00
85319cdf49 Added A new API to get list of Industries from its master table 2025-04-16 11:42:45 +00:00
bda8cbc466 Merge pull request 'Fixed the employee duplication bug while adding the email to employee that does not have one' (#20) from Ashutosh_Bug_#75_Employee_duplicatation into Feature_Task_management
Reviewed-on: #20
2025-04-16 05:24:17 +00:00
2af750fbb3 Fixed the employee duplication bug while adding the email to employee that does not have one 2025-04-16 05:24:17 +00:00
fe503a70dc Merge pull request 'In this commit fixed the Bug #74 where when the regularization request sent it takes the date of request as checkout date' (#19) from Ashutosh_Bug_#74_Attendance_Regularization_Date into Feature_Task_management
Reviewed-on: #19
2025-04-16 05:23:49 +00:00
a9f4610063 In this commit fixed the Bug #74 where when the regularization request sent it takes the date of request as checkout date 2025-04-16 09:21:39 +05:30
c7304dc80b Renamed columns in ActivityChecklist 2025-04-15 18:05:42 +05:30
f906e8f7d0 Merge pull request 'Modify Email Templates' (#18) from vikas_64_modifyemail_template into Feature_Task_management
Reviewed-on: #18
2025-04-15 12:12:35 +00:00
b93b581d60 Modify Email Templates
- Remove address and contact number
- Add link to email
- change twitter logo to x
- link x logo to company twitter account

Add new template to inform password change success
- add code to send email on password change success
2025-04-15 12:12:35 +00:00
1c48ab80aa Added checklist and taskallocation relation table and logic to map taskallocation and checklist in that table in report task API 2025-04-15 17:11:29 +05:30
cac50a3f06 Added checklist to report api 2025-04-15 15:47:57 +05:30
dbc1b721c1 Changed the Task list View model 2025-04-14 17:26:35 +05:30
9b1a1d1fe7 Fixed the error of empty checkList in get activities 2025-04-14 17:03:56 +05:30
40d9c335c4 Fixed the error of empty checkList in get activities 2025-04-14 16:07:30 +05:30
be0c37588e In dashboard project Progress show from first task assigned if give date is older than first assign date 2025-04-14 15:58:14 +05:30
832555d2b2 Merge pull request 'Ashutosh_ActivityMaster_managenment' (#17) from Ashutosh_ActivityMaster_managenment into Feature_Task_management
Reviewed-on: #17
2025-04-14 09:23:47 +00:00
829a421ab0 Fixed Confilts 2025-04-14 13:37:27 +05:30
f57e40219e Merge branch 'Ashutosh_ActivityMaster_managenment' of https://git.marcoaiot.com/admin/marco.pms.api into Ashutosh_ActivityMaster_managenment 2025-04-14 12:57:06 +05:30
498ea6e4e7 Added the Check list in Activity Master APIs 2025-04-14 12:56:49 +05:30
3ec3618b7e Fixed code error 2025-04-14 12:55:47 +05:30
c6f3216150 Added CheckList to Update and Create API 2025-04-14 12:55:09 +05:30
ed449fdf47 Created new Api for creating and editing activities 2025-04-14 12:55:05 +05:30
17994bff08 Added CheckList to Update and Create API 2025-04-14 12:52:58 +05:30
16a4234f75 Created new Api for creating and editing activities 2025-04-14 12:52:54 +05:30
d1be217740 Fixed code error 2025-04-14 12:52:01 +05:30
f391806a57 Added CheckList to Update and Create API 2025-04-14 12:51:52 +05:30
c3079258d9 Created new Api for creating and editing activities 2025-04-14 12:51:08 +05:30
a25fa069de Merge branch 'Feature_Task_management' of https://git.marcoaiot.com/admin/marco.pms.api into Feature_Task_management 2025-04-14 12:49:20 +05:30
dc9b696265 Fixed Confilt 2025-04-14 12:48:42 +05:30
ad1b2d35fb Merge pull request 'Add code to hide server information in response header' (#15) from Ashutosh_AddServerHeade_False into Feature_Task_management
Reviewed-on: #15
2025-04-14 07:11:47 +00:00
f488109a4c Add code to hide server information in response header 2025-04-14 07:11:47 +00:00
a51c11389d Added the Check list in Activity Master APIs 2025-04-14 12:28:25 +05:30
e4f8e507d5 Merge branch 'Ashutosh_ActivityMaster_managenment' of https://git.marcoaiot.com/admin/marco.pms.api into Ashutosh_ActivityMaster_managenment 2025-04-11 17:26:25 +05:30
23322fdeb2 Fixed code error 2025-04-11 17:22:38 +05:30
0fe811d78c Added CheckList to Update and Create API 2025-04-11 17:21:04 +05:30
689d5c28bb Created new Api for creating and editing activities 2025-04-11 17:21:04 +05:30
b8e2c265be Fixed code error 2025-04-11 17:19:32 +05:30
52d0474d45 Added a filter of only date while fetching data from database 2025-04-11 16:42:51 +05:30
3fabadc380 Added the date filter while fetching data from database 2025-04-11 16:40:57 +05:30
b624e9ec62 Merge branch 'Ashutosh_ActivityMaster_managenment' of https://git.marcoaiot.com/admin/marco.pms.api into Ashutosh_ActivityMaster_managenment 2025-04-11 16:17:22 +05:30
3702dae1ac Added CheckList to Update and Create API 2025-04-11 16:16:53 +05:30
e53d45ed77 Created new Api for creating and editing activities 2025-04-11 16:16:53 +05:30
38262074c4 Merge pull request 'Added Api to send data to front-end dashboard' (#14) from Ashutosh_Dashboard into Feature_Task_management
Reviewed-on: #14
2025-04-11 10:38:54 +00:00
90b5152bb2 Added CheckList to Update and Create API 2025-04-10 19:56:30 +05:30
40420d19c4 Added api to send data to apis 2025-04-10 19:38:54 +05:30
81d487f9f2 Created new Api for creating and editing activities 2025-04-10 19:16:21 +05:30
c44deb439e Removed all warning 2025-04-09 16:29:38 +05:30
5d4b1ad282 Fixed the typo of PermanentAddress 2025-04-09 13:09:50 +05:30
db879495cb Created new view model for get projet list API 2025-04-09 12:16:41 +05:30
15e83346e2 Merge branch 'Feature_Task_management' of https://git.marcoaiot.com/admin/marco.pms.api into Feature_Task_management 2025-04-09 10:41:14 +05:30
e41faf4045 Passing role name in record attendance api 2025-04-09 10:41:00 +05:30
2117b81c48 Remove custom CORS settings to all allow all requests 2025-04-09 10:36:58 +05:30
52a67ba15b Removed null refreance warning from MOdel project 2025-04-09 10:25:44 +05:30
58bb684c4b Removed all Warnings from Services project 2025-04-09 09:18:15 +05:30
ec5fba0637 Fixed null refrenance warning 2025-04-09 08:46:29 +05:30
56448cb8a2 Created new Api fro getting Attendance of emplyee who requested regularization 2025-04-08 16:47:24 +05:30
7ddb1e2f8e Fixed the bug of Attendance Regularization 2025-04-08 16:09:50 +05:30
727e4794da Fixed some miner bugs 2025-04-07 18:07:37 +05:30
41edbef9d1 Chenaged response of manage task in project API 2025-04-07 11:34:40 +05:30
0b81a6ea62 Make changes in report api to check if user reporting second time. 2025-04-07 09:42:38 +05:30
745b4d2e1c Created new view models for showing taskAllication list and comment 2025-04-05 17:16:32 +05:30
64c4772595 fixed missing http method 2025-04-04 16:09:47 +05:30
7ddb37852e Added Apis for task allocations 2025-04-04 15:42:42 +05:30
352b4fb40e Changed Response format of all APIs 2025-04-03 15:50:54 +05:30
9c4b1639fe Merge branch 'Feature_Task_management' of https://git.marcoaiot.com/admin/marco.pms.api into Feature_Task_management 2025-04-02 18:37:29 +05:30
1b16983092 #40 - Add models and database migration for Task Allocation 2025-04-02 18:37:15 +05:30
e6fb6a23b5 #40 - Add models and database migration for Task Allocation 2025-04-02 18:35:58 +05:30
154 changed files with 18328 additions and 1332 deletions

View File

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

View File

@ -79,7 +79,7 @@ namespace Marco.Pms.DataAccess.Initializer
ApplicationUserId = user.Id,
BirthDate = DateTime.MinValue,
PanNumber = "",
PeramnentAddress = "",
PermanentAddress = "",
PhoneNumber = "",
TenantId = user.TenantId
};

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

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

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

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

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

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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,6 @@
namespace Marco.Pms.Model.Dtos
{
public class LogoutDto
{ public string RefreshToken { get; set; }
{ public string? RefreshToken { get; set; }
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,6 +3,6 @@
public class Industry
{
public int Id { get; set; }
public string Name { get; set; }
public string? Name { get; set; }
}
}

View 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,
};
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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

View File

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

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

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

View 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