Compare commits
80 Commits
Upgrade_Ex
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a3ffe1d3d6 | |||
| 55c2ca73de | |||
| bcba454b6e | |||
| e73413c849 | |||
| 457e3b411e | |||
| 8f5a49deed | |||
| f1f5fc263f | |||
| 64aab7d712 | |||
| c7a73e78fb | |||
| 1b94592026 | |||
| 9c95b12a8f | |||
| df0e9f7b46 | |||
| 24e45037da | |||
| a31266ee4a | |||
| bd2f9d953f | |||
| d5a7ad0716 | |||
| 4108915b92 | |||
| dad135571d | |||
| 5a402925b1 | |||
| 0277303c54 | |||
| eed97d31c6 | |||
| a7a9fb4012 | |||
| 03ee834505 | |||
| 0349229bac | |||
| f4e6fab3d6 | |||
| 6dfbf655ef | |||
| 230267bdb9 | |||
| f171b0add6 | |||
| 5522551e67 | |||
| b74ae2d75c | |||
| 0cdabf61ad | |||
| 76e77eb50f | |||
| b247ed36ed | |||
| 88de8b218b | |||
| bb328ad980 | |||
| 92a234ff7e | |||
| 64cb2e0671 | |||
| 863f0ce8e2 | |||
| bd14424062 | |||
| 897537a60c | |||
| 08a336be37 | |||
| 4cec5860ec | |||
| 5b57c93a21 | |||
| e30aec1791 | |||
| 2c8486f0de | |||
| 2806dceab2 | |||
| c61ef92f6e | |||
| e7a21e9e2f | |||
| 62031046a1 | |||
| fbb8a2261b | |||
| ed16c0f102 | |||
| 2f04339b4d | |||
| 611d7753bb | |||
| b789b84be1 | |||
| 883a65d124 | |||
| a9f1a99e6f | |||
| 6679c5877d | |||
| 4401bc0fa2 | |||
| 3d192770e9 | |||
| 4a0144c23b | |||
| 6e945cf6c1 | |||
| 5a97cd472c | |||
| 9af4c2279a | |||
| 8ce6f1c32f | |||
| a3703ae2ca | |||
| a32515fc84 | |||
| bfe9c03147 | |||
| d18bdb1363 | |||
| 31cfe2b581 | |||
| 394b8496f9 | |||
| 2b6c886186 | |||
| 8be9b05695 | |||
| b9c8fb539f | |||
| 128417858e | |||
| 4825f24694 | |||
| b023883233 | |||
| 0b2ed71dab | |||
| 7c80e49809 | |||
| 7928c6ca36 | |||
| d1c427f7b9 |
@ -15,6 +15,7 @@ using Marco.Pms.Model.OrganizationModel;
|
||||
using Marco.Pms.Model.PaymentGetway;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Roles;
|
||||
using Marco.Pms.Model.ServiceProject;
|
||||
using Marco.Pms.Model.TenantModels;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
@ -203,6 +204,38 @@ namespace Marco.Pms.DataAccess.Data
|
||||
public DbSet<TenantOrgMapping> TenantOrgMappings { get; set; }
|
||||
public DbSet<OrgServiceMapping> OrgServiceMappings { get; set; }
|
||||
public DbSet<ProjectOrgMapping> ProjectOrgMappings { get; set; }
|
||||
public DbSet<OrganizationHierarchy> OrganizationHierarchies { get; set; }
|
||||
public DbSet<OrgHierarchyLog> OrgHierarchyLogs { get; set; }
|
||||
#endregion
|
||||
|
||||
#region ======================================================= Service Project =======================================================
|
||||
public DbSet<ServiceProject> ServiceProjects { get; set; }
|
||||
public DbSet<ServiceProjectServiceMapping> ServiceProjectServiceMapping { get; set; }
|
||||
public DbSet<TeamRoleMaster> TeamRoleMasters { get; set; }
|
||||
public DbSet<ServiceProjectTag> ServiceProjectTags { get; set; }
|
||||
//public DbSet<TalkingPoint> TalkingPoints { get; set; }
|
||||
//public DbSet<TalkingPointAttachment> TalkingPointAttachments { get; set; }
|
||||
public DbSet<ServiceProjectTagMapping> ServiceProjectTagMappings { get; set; }
|
||||
public DbSet<ServiceProjectAllocation> ServiceProjectAllocations { get; set; }
|
||||
|
||||
#region ======================================================= Project Branch =======================================================
|
||||
public DbSet<ProjectBranch> ProjectBranches { get; set; }
|
||||
#endregion
|
||||
|
||||
#region ======================================================= Job =======================================================
|
||||
public DbSet<JobTicket> JobTickets { get; set; }
|
||||
public DbSet<JobStatus> JobStatus { get; set; }
|
||||
public DbSet<JobStatusMapping> JobStatusMappings { get; set; }
|
||||
public DbSet<JobComment> JobComments { get; set; }
|
||||
public DbSet<JobEmployeeMapping> JobEmployeeMappings { get; set; }
|
||||
public DbSet<JobTag> JobTags { get; set; }
|
||||
public DbSet<JobTagMapping> JobTagMappings { get; set; }
|
||||
public DbSet<JobAttachment> JobAttachments { get; set; }
|
||||
public DbSet<JobAttendance> JobAttendance { get; set; }
|
||||
public DbSet<JobAttendanceLog> JobAttendanceLogs { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@ -530,6 +563,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
.HasOne<Tenant>() // No navigation property in ApplicationRole
|
||||
.WithMany()
|
||||
.HasForeignKey(ar => ar.TenantId);
|
||||
|
||||
// Configure the relationship between ApplicationRole and FeaturePermission via a join table
|
||||
modelBuilder.Entity<RolePermissionMappings>(entity =>
|
||||
{
|
||||
@ -1236,64 +1270,68 @@ namespace Marco.Pms.DataAccess.Data
|
||||
);
|
||||
|
||||
modelBuilder.Entity<RecurringPaymentStatus>().HasData(
|
||||
new RecurringPaymentStatus
|
||||
{
|
||||
Id = Guid.Parse("da462422-13b2-45cc-a175-910a225f6fc8"),
|
||||
Name = "Active"
|
||||
},
|
||||
new RecurringPaymentStatus
|
||||
{
|
||||
Id = Guid.Parse("3ec864d2-8bf5-42fb-ba70-5090301dd816"),
|
||||
Name = "De-Activated"
|
||||
},
|
||||
new RecurringPaymentStatus
|
||||
{
|
||||
Id = Guid.Parse("306856fb-5655-42eb-bf8b-808bb5e84725"),
|
||||
Name = "Completed"
|
||||
},
|
||||
new RecurringPaymentStatus
|
||||
{
|
||||
Id = Guid.Parse("8bfc9346-e092-4a80-acbf-515ae1ef6868"),
|
||||
Name = "Paused"
|
||||
}
|
||||
);
|
||||
new RecurringPaymentStatus { Id = Guid.Parse("da462422-13b2-45cc-a175-910a225f6fc8"), Name = "Active" },
|
||||
new RecurringPaymentStatus { Id = Guid.Parse("3ec864d2-8bf5-42fb-ba70-5090301dd816"), Name = "De-Activated" },
|
||||
new RecurringPaymentStatus { Id = Guid.Parse("306856fb-5655-42eb-bf8b-808bb5e84725"), Name = "Completed" },
|
||||
new RecurringPaymentStatus { Id = Guid.Parse("8bfc9346-e092-4a80-acbf-515ae1ef6868"), Name = "Paused" }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<TeamRoleMaster>().HasData(
|
||||
new TeamRoleMaster { Id = Guid.Parse("8cfbf16f-7d3b-4c29-af5b-18935f20aa7b"), Name = "Support", Description = "A Support role involves assisting users or customers by resolving technical or service-related issues, answering inquiries, and ensuring a positive experience with products or services." },
|
||||
new TeamRoleMaster { Id = Guid.Parse("145d7222-408b-4733-8a17-f417e070b8b8"), Name = "Service Engineer", Description = "A Service Engineer installs, maintains, repairs, and troubleshoots equipment to ensure optimal operation and customer satisfaction." },
|
||||
new TeamRoleMaster { Id = Guid.Parse("03bf5853-5e0b-4eb8-9f37-33bd999a05b3"), Name = "Manager", Description = "A Manager oversees and coordinates a team or department to achieve organizational goals through planning, decision-making, and leadership." }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<JobStatus>().HasData(
|
||||
new JobStatus { Id = Guid.Parse("32d76a02-8f44-4aa0-9b66-c3716c45a918"), Name = "New", DisplayName = "New", Level = 1 },
|
||||
new JobStatus { Id = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), Name = "Assigned", DisplayName = "Assigned", Level = 2 },
|
||||
new JobStatus { Id = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), Name = "In Progress", DisplayName = "In Progress", Level = 3 },
|
||||
new JobStatus { Id = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), Name = "Work Done", DisplayName = "Work Done", Level = 4 },
|
||||
new JobStatus { Id = Guid.Parse("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), Name = "Review Done", DisplayName = "Review Done", Level = 5 },
|
||||
new JobStatus { Id = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), Name = "Closed", DisplayName = "Closed", Level = 6 },
|
||||
new JobStatus { Id = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), Name = "On Hold", DisplayName = "On Hold", Level = 7 }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<JobStatusMapping>().HasData(
|
||||
// New to Assigned
|
||||
new JobStatusMapping { Id = Guid.Parse("024e1810-6a57-4a0d-8d2e-be88da79fcd4"), StatusId = Guid.Parse("32d76a02-8f44-4aa0-9b66-c3716c45a918"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Assinged to In Progress
|
||||
new JobStatusMapping { Id = Guid.Parse("cb0db140-87fa-4a6f-812d-2834bd0f53a9"), StatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), NextStatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Assinged to On Hold
|
||||
new JobStatusMapping { Id = Guid.Parse("42f24930-387e-4f51-9c2d-3e29ffaaf02a"), StatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), NextStatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Assigned to closed
|
||||
new JobStatusMapping { Id = Guid.Parse("16c83c23-09be-40fd-9d05-f44795d8dee8"), StatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// In Progress to Resolved
|
||||
new JobStatusMapping { Id = Guid.Parse("8c4ecdae-7435-4475-8389-15bc453561a1"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// In Progress to Assigned
|
||||
new JobStatusMapping { Id = Guid.Parse("a44b0a66-ee33-47e7-a01f-6b8d9b621543"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// In Progress to Closed
|
||||
new JobStatusMapping { Id = Guid.Parse("7165ecee-10e3-4fc0-85d2-6d93d5b11776"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// In Progress to On Hold
|
||||
new JobStatusMapping { Id = Guid.Parse("87891499-e45d-406b-bf22-722db1beedc9"), StatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), NextStatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Resolved to Done
|
||||
new JobStatusMapping { Id = Guid.Parse("dc986ec4-858e-4c98-b330-4a5c98c91f07"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Resolved to Assigned
|
||||
new JobStatusMapping { Id = Guid.Parse("ca8b4358-3122-4aaa-bcf8-0b66e4ab313a"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Resolved to In Progress
|
||||
new JobStatusMapping { Id = Guid.Parse("5602d32c-290e-48a3-83dd-91af6d12ed46"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Resolved to Closed
|
||||
new JobStatusMapping { Id = Guid.Parse("9c2918be-b3c1-46fb-a03b-14dd613e1021"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Resolved to On Hold
|
||||
new JobStatusMapping { Id = Guid.Parse("ab974bdb-2d8f-4ddc-9b71-bd6d198bae75"), StatusId = Guid.Parse("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), NextStatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// On Hold to Assigned
|
||||
new JobStatusMapping { Id = Guid.Parse("2787c903-1b39-4e7d-a0f2-3bb2309bb341"), StatusId = Guid.Parse("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), NextStatusId = Guid.Parse("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
// Done to Close
|
||||
new JobStatusMapping { Id = Guid.Parse("76bc5551-8f80-469d-ba23-95d7e746c9a9"), StatusId = Guid.Parse("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), NextStatusId = Guid.Parse("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<Module>().HasData(
|
||||
new Module
|
||||
{
|
||||
Id = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"),
|
||||
Name = "Project",
|
||||
Description = "Project Module",
|
||||
Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02"
|
||||
},
|
||||
new Module
|
||||
{
|
||||
Id = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"),
|
||||
Name = "Employee",
|
||||
Description = "Employee Module",
|
||||
Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637"
|
||||
},
|
||||
new Module
|
||||
{
|
||||
Id = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
|
||||
Name = "Masters",
|
||||
Description = "Masters Module",
|
||||
Key = "504ec132-e6a9-422f-8f85-050602cfce05"
|
||||
},
|
||||
new Module
|
||||
{
|
||||
Id = new Guid("f482a079-4dec-4f2d-9867-6baf2a4f23d9"),
|
||||
Name = "Tenant",
|
||||
Description = "Tenant Module",
|
||||
Key = "504ec132-e6a9-422f-8f85-050602cfce05"
|
||||
},
|
||||
new Module
|
||||
{
|
||||
Id = new Guid("0a79687a-86d7-430d-a2d7-8b8603cc76a1"),
|
||||
Name = "Finance",
|
||||
Description = "Finance Module",
|
||||
Key = "504ec132-e6a9-422f-8f85-050602cfce05"
|
||||
});
|
||||
new Module { Id = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), Name = "Project", Description = "Project Module", Key = "b04da7e9-0406-409c-ac7f-b97256e6ea02" },
|
||||
new Module { Id = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), Name = "Employee", Description = "Employee Module", Key = "0971c7fb-6ce1-458a-ae3f-8d3205893637" },
|
||||
new Module { Id = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), Name = "Masters", Description = "Masters Module", Key = "504ec132-e6a9-422f-8f85-050602cfce05" },
|
||||
new Module { Id = new Guid("f482a079-4dec-4f2d-9867-6baf2a4f23d9"), Name = "Tenant", Description = "Tenant Module", Key = "504ec132-e6a9-422f-8f85-050602cfce05" },
|
||||
new Module { Id = new Guid("0a79687a-86d7-430d-a2d7-8b8603cc76a1"), Name = "Finance", Description = "Finance Module", Key = "504ec132-e6a9-422f-8f85-050602cfce05" }
|
||||
);
|
||||
|
||||
modelBuilder.Entity<Feature>().HasData(
|
||||
// Project Module
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_ServiceProject_And_ServiceProjectServiceMapping_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServiceProjects",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ShortName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ClientId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Address = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
AssignedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ContactName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ContactPhone = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ContactEmail = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServiceProjects", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjects_Employees_CreatedById",
|
||||
column: x => x.CreatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjects_Employees_UpdatedById",
|
||||
column: x => x.UpdatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjects_Organizations_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "Organizations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjects_StatusMasters_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "StatusMasters",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjects_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServiceProjectServiceMapping",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServiceProjectServiceMapping", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectServiceMapping_ServiceMasters_ServiceId",
|
||||
column: x => x.ServiceId,
|
||||
principalTable: "ServiceMasters",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectServiceMapping_ServiceProjects_ProjectId",
|
||||
column: x => x.ProjectId,
|
||||
principalTable: "ServiceProjects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectServiceMapping_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjects_ClientId",
|
||||
table: "ServiceProjects",
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjects_CreatedById",
|
||||
table: "ServiceProjects",
|
||||
column: "CreatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjects_StatusId",
|
||||
table: "ServiceProjects",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjects_TenantId",
|
||||
table: "ServiceProjects",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjects_UpdatedById",
|
||||
table: "ServiceProjects",
|
||||
column: "UpdatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectServiceMapping_ProjectId",
|
||||
table: "ServiceProjectServiceMapping",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectServiceMapping_ServiceId",
|
||||
table: "ServiceProjectServiceMapping",
|
||||
column: "ServiceId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectServiceMapping_TenantId",
|
||||
table: "ServiceProjectServiceMapping",
|
||||
column: "TenantId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProjectServiceMapping");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProjects");
|
||||
}
|
||||
}
|
||||
}
|
||||
7628
Marco.Pms.DataAccess/Migrations/20251111065550_Added_OrganiazationHierarchy_Related_Table.Designer.cs
generated
Normal file
7628
Marco.Pms.DataAccess/Migrations/20251111065550_Added_OrganiazationHierarchy_Related_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,137 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_OrganiazationHierarchy_Related_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrganizationHierarchies",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ReportToId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
IsPrimary = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
AssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
AssignedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrganizationHierarchies", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationHierarchies_Employees_AssignedById",
|
||||
column: x => x.AssignedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationHierarchies_Employees_EmployeeId",
|
||||
column: x => x.EmployeeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationHierarchies_Employees_ReportToId",
|
||||
column: x => x.ReportToId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationHierarchies_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrgHierarchyLogs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
OrganizationHierarchyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ReAssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
ReAssignedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrgHierarchyLogs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrgHierarchyLogs_Employees_ReAssignedById",
|
||||
column: x => x.ReAssignedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrgHierarchyLogs_OrganizationHierarchies_OrganizationHierarc~",
|
||||
column: x => x.OrganizationHierarchyId,
|
||||
principalTable: "OrganizationHierarchies",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrgHierarchyLogs_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationHierarchies_AssignedById",
|
||||
table: "OrganizationHierarchies",
|
||||
column: "AssignedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationHierarchies_EmployeeId",
|
||||
table: "OrganizationHierarchies",
|
||||
column: "EmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationHierarchies_ReportToId",
|
||||
table: "OrganizationHierarchies",
|
||||
column: "ReportToId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationHierarchies_TenantId",
|
||||
table: "OrganizationHierarchies",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrgHierarchyLogs_OrganizationHierarchyId",
|
||||
table: "OrgHierarchyLogs",
|
||||
column: "OrganizationHierarchyId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrgHierarchyLogs_ReAssignedById",
|
||||
table: "OrgHierarchyLogs",
|
||||
column: "ReAssignedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrgHierarchyLogs_TenantId",
|
||||
table: "OrgHierarchyLogs",
|
||||
column: "TenantId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrgHierarchyLogs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrganizationHierarchies");
|
||||
}
|
||||
}
|
||||
}
|
||||
8341
Marco.Pms.DataAccess/Migrations/20251112134339_Added_JobTicket_Related_Tables.Designer.cs
generated
Normal file
8341
Marco.Pms.DataAccess/Migrations/20251112134339_Added_JobTicket_Related_Tables.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,538 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_JobTicket_Related_Tables : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobStatus",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DisplayName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobStatus", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobTags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobTags", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTags_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServiceProjectTags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServiceProjectTags", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectTags_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TeamRoleMasters",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Name = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TeamRoleMasters", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobTickets",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
AssigneeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
DueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobTickets", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTickets_Employees_AssigneeId",
|
||||
column: x => x.AssigneeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTickets_Employees_CreatedById",
|
||||
column: x => x.CreatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTickets_Employees_UpdatedById",
|
||||
column: x => x.UpdatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTickets_JobStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTickets_ServiceProjects_ProjectId",
|
||||
column: x => x.ProjectId,
|
||||
principalTable: "ServiceProjects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTickets_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServiceProjectTagMappings",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ServiceProjectTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ServiceProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServiceProjectTagMappings", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectTagMappings_ServiceProjectTags_ServiceProjectT~",
|
||||
column: x => x.ServiceProjectTagId,
|
||||
principalTable: "ServiceProjectTags",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectTagMappings_ServiceProjects_ServiceProjectId",
|
||||
column: x => x.ServiceProjectId,
|
||||
principalTable: "ServiceProjects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobStatusMappings",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TeamRoleId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobStatusMappings", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobStatusMappings_JobStatus_NextStatusId",
|
||||
column: x => x.NextStatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobStatusMappings_JobStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobStatusMappings_TeamRoleMasters_TeamRoleId",
|
||||
column: x => x.TeamRoleId,
|
||||
principalTable: "TeamRoleMasters",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobStatusMappings_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobEmployeeMappings",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
AssigneeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobEmployeeMappings", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobEmployeeMappings_Employees_AssigneeId",
|
||||
column: x => x.AssigneeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobEmployeeMappings_JobTickets_JobTicketId",
|
||||
column: x => x.JobTicketId,
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobEmployeeMappings_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobTagMappings",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobTagMappings", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTagMappings_JobTags_JobTagId",
|
||||
column: x => x.JobTagId,
|
||||
principalTable: "JobTags",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTagMappings_JobTickets_JobTicketId",
|
||||
column: x => x.JobTicketId,
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobTagMappings_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobUpdateLogs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobUpdateLogs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_Employees_UpdatedById",
|
||||
column: x => x.UpdatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_JobStatus_NextStatusId",
|
||||
column: x => x.NextStatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_JobStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_JobTickets_JobTicketId",
|
||||
column: x => x.JobTicketId,
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "JobStatus",
|
||||
columns: new[] { "Id", "DisplayName", "Name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"), "New", "New" },
|
||||
{ new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), "Closed", "Closed" },
|
||||
{ new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), "In Progress", "In Progress" },
|
||||
{ new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), "On Hold", "On Hold" },
|
||||
{ new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), "Resolved", "Resolved" },
|
||||
{ new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), "Assigned", "Assigned" },
|
||||
{ new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), "Done", "Done" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "TeamRoleMasters",
|
||||
columns: new[] { "Id", "Description", "Name" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("03bf5853-5e0b-4eb8-9f37-33bd999a05b3"), "A Manager oversees and coordinates a team or department to achieve organizational goals through planning, decision-making, and leadership.", "Manager" },
|
||||
{ new Guid("145d7222-408b-4733-8a17-f417e070b8b8"), "A Service Engineer installs, maintains, repairs, and troubleshoots equipment to ensure optimal operation and customer satisfaction.", "Service Engineer" },
|
||||
{ new Guid("8cfbf16f-7d3b-4c29-af5b-18935f20aa7b"), "A Support role involves assisting users or customers by resolving technical or service-related issues, answering inquiries, and ensuring a positive experience with products or services.", "Support" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "JobStatusMappings",
|
||||
columns: new[] { "Id", "NextStatusId", "StatusId", "TeamRoleId", "TenantId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("024e1810-6a57-4a0d-8d2e-be88da79fcd4"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("16c83c23-09be-40fd-9d05-f44795d8dee8"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("2787c903-1b39-4e7d-a0f2-3bb2309bb341"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("42f24930-387e-4f51-9c2d-3e29ffaaf02a"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("5602d32c-290e-48a3-83dd-91af6d12ed46"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("7165ecee-10e3-4fc0-85d2-6d93d5b11776"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("76bc5551-8f80-469d-ba23-95d7e746c9a9"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("87891499-e45d-406b-bf22-722db1beedc9"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("8c4ecdae-7435-4475-8389-15bc453561a1"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("9c2918be-b3c1-46fb-a03b-14dd613e1021"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("a44b0a66-ee33-47e7-a01f-6b8d9b621543"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("ab974bdb-2d8f-4ddc-9b71-bd6d198bae75"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("ca8b4358-3122-4aaa-bcf8-0b66e4ab313a"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("cb0db140-87fa-4a6f-812d-2834bd0f53a9"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||
{ new Guid("dc986ec4-858e-4c98-b330-4a5c98c91f07"), new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobEmployeeMappings_AssigneeId",
|
||||
table: "JobEmployeeMappings",
|
||||
column: "AssigneeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobEmployeeMappings_JobTicketId",
|
||||
table: "JobEmployeeMappings",
|
||||
column: "JobTicketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobEmployeeMappings_TenantId",
|
||||
table: "JobEmployeeMappings",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobStatusMappings_NextStatusId",
|
||||
table: "JobStatusMappings",
|
||||
column: "NextStatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobStatusMappings_StatusId",
|
||||
table: "JobStatusMappings",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobStatusMappings_TeamRoleId",
|
||||
table: "JobStatusMappings",
|
||||
column: "TeamRoleId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobStatusMappings_TenantId",
|
||||
table: "JobStatusMappings",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTagMappings_JobTagId",
|
||||
table: "JobTagMappings",
|
||||
column: "JobTagId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTagMappings_JobTicketId",
|
||||
table: "JobTagMappings",
|
||||
column: "JobTicketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTagMappings_TenantId",
|
||||
table: "JobTagMappings",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTags_TenantId",
|
||||
table: "JobTags",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_AssigneeId",
|
||||
table: "JobTickets",
|
||||
column: "AssigneeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_CreatedById",
|
||||
table: "JobTickets",
|
||||
column: "CreatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_ProjectId",
|
||||
table: "JobTickets",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_StatusId",
|
||||
table: "JobTickets",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_TenantId",
|
||||
table: "JobTickets",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_UpdatedById",
|
||||
table: "JobTickets",
|
||||
column: "UpdatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_JobTicketId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "JobTicketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_NextStatusId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "NextStatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_StatusId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_TenantId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_UpdatedById",
|
||||
table: "JobUpdateLogs",
|
||||
column: "UpdatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectTagMappings_ServiceProjectId",
|
||||
table: "ServiceProjectTagMappings",
|
||||
column: "ServiceProjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectTagMappings_ServiceProjectTagId",
|
||||
table: "ServiceProjectTagMappings",
|
||||
column: "ServiceProjectTagId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectTags_TenantId",
|
||||
table: "ServiceProjectTags",
|
||||
column: "TenantId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobEmployeeMappings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobStatusMappings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobTagMappings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobUpdateLogs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProjectTagMappings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TeamRoleMasters");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobTags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobTickets");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProjectTags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobStatus");
|
||||
}
|
||||
}
|
||||
}
|
||||
8461
Marco.Pms.DataAccess/Migrations/20251113051300_Removed_Assignee_From_JobTicket_Table.Designer.cs
generated
Normal file
8461
Marco.Pms.DataAccess/Migrations/20251113051300_Removed_Assignee_From_JobTicket_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Removed_Assignee_From_JobTicket_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_JobTickets_Employees_AssigneeId",
|
||||
table: "JobTickets");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_JobTickets_AssigneeId",
|
||||
table: "JobTickets");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AssigneeId",
|
||||
table: "JobTickets");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "AssigneeId",
|
||||
table: "JobTickets",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_AssigneeId",
|
||||
table: "JobTickets",
|
||||
column: "AssigneeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_JobTickets_Employees_AssigneeId",
|
||||
table: "JobTickets",
|
||||
column: "AssigneeId",
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,151 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Removed_JobUpdateLog_Table_And_Added_JobComments_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobUpdateLogs");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobComments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobComments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobComments_Employees_CreatedById",
|
||||
column: x => x.CreatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobComments_JobTickets_JobTicketId",
|
||||
column: x => x.JobTicketId,
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobComments_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobComments_CreatedById",
|
||||
table: "JobComments",
|
||||
column: "CreatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobComments_JobTicketId",
|
||||
table: "JobComments",
|
||||
column: "JobTicketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobComments_TenantId",
|
||||
table: "JobComments",
|
||||
column: "TenantId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobComments");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobUpdateLogs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Comment = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobUpdateLogs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_Employees_UpdatedById",
|
||||
column: x => x.UpdatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_JobStatus_NextStatusId",
|
||||
column: x => x.NextStatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_JobStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_JobTickets_JobTicketId",
|
||||
column: x => x.JobTicketId,
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobUpdateLogs_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_JobTicketId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "JobTicketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_NextStatusId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "NextStatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_StatusId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_TenantId",
|
||||
table: "JobUpdateLogs",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobUpdateLogs_UpdatedById",
|
||||
table: "JobUpdateLogs",
|
||||
column: "UpdatedById");
|
||||
}
|
||||
}
|
||||
}
|
||||
8615
Marco.Pms.DataAccess/Migrations/20251113113335_Added_JobAttcahments_Table.Designer.cs
generated
Normal file
8615
Marco.Pms.DataAccess/Migrations/20251113113335_Added_JobAttcahments_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,222 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_JobAttcahments_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsActive",
|
||||
table: "JobComments",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "UpdatedAt",
|
||||
table: "JobComments",
|
||||
type: "datetime(6)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "UpdatedById",
|
||||
table: "JobComments",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobAttachments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobCommentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobAttachments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttachments_Documents_DocumentId",
|
||||
column: x => x.DocumentId,
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttachments_JobComments_JobCommentId",
|
||||
column: x => x.JobCommentId,
|
||||
principalTable: "JobComments",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttachments_JobStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "JobStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttachments_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServiceProjectAllocations",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TeamRoleId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
AssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
AssignedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ReAssignedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
ReAssignedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServiceProjectAllocations", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectAllocations_Employees_AssignedById",
|
||||
column: x => x.AssignedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectAllocations_Employees_EmployeeId",
|
||||
column: x => x.EmployeeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectAllocations_Employees_ReAssignedById",
|
||||
column: x => x.ReAssignedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectAllocations_ServiceProjects_ProjectId",
|
||||
column: x => x.ProjectId,
|
||||
principalTable: "ServiceProjects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectAllocations_TeamRoleMasters_TeamRoleId",
|
||||
column: x => x.TeamRoleId,
|
||||
principalTable: "TeamRoleMasters",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ServiceProjectAllocations_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobComments_UpdatedById",
|
||||
table: "JobComments",
|
||||
column: "UpdatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttachments_DocumentId",
|
||||
table: "JobAttachments",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttachments_JobCommentId",
|
||||
table: "JobAttachments",
|
||||
column: "JobCommentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttachments_StatusId",
|
||||
table: "JobAttachments",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttachments_TenantId",
|
||||
table: "JobAttachments",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectAllocations_AssignedById",
|
||||
table: "ServiceProjectAllocations",
|
||||
column: "AssignedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectAllocations_EmployeeId",
|
||||
table: "ServiceProjectAllocations",
|
||||
column: "EmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectAllocations_ProjectId",
|
||||
table: "ServiceProjectAllocations",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectAllocations_ReAssignedById",
|
||||
table: "ServiceProjectAllocations",
|
||||
column: "ReAssignedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectAllocations_TeamRoleId",
|
||||
table: "ServiceProjectAllocations",
|
||||
column: "TeamRoleId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServiceProjectAllocations_TenantId",
|
||||
table: "ServiceProjectAllocations",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_JobComments_Employees_UpdatedById",
|
||||
table: "JobComments",
|
||||
column: "UpdatedById",
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_JobComments_Employees_UpdatedById",
|
||||
table: "JobComments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobAttachments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServiceProjectAllocations");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_JobComments_UpdatedById",
|
||||
table: "JobComments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsActive",
|
||||
table: "JobComments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UpdatedAt",
|
||||
table: "JobComments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UpdatedById",
|
||||
table: "JobComments");
|
||||
}
|
||||
}
|
||||
}
|
||||
8625
Marco.Pms.DataAccess/Migrations/20251113114720_Added_Level_In_JobStatus_Table.Designer.cs
generated
Normal file
8625
Marco.Pms.DataAccess/Migrations/20251113114720_Added_Level_In_JobStatus_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,85 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_Level_In_JobStatus_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Level",
|
||||
table: "JobStatus",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 1);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"),
|
||||
column: "Level",
|
||||
value: 1);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"),
|
||||
column: "Level",
|
||||
value: 6);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"),
|
||||
column: "Level",
|
||||
value: 3);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"),
|
||||
column: "Level",
|
||||
value: 7);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||
columns: new[] { "DisplayName", "Level", "Name" },
|
||||
values: new object[] { "Review", 4, "Review" });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"),
|
||||
column: "Level",
|
||||
value: 2);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"),
|
||||
column: "Level",
|
||||
value: 5);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Level",
|
||||
table: "JobStatus");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||
columns: new[] { "DisplayName", "Name" },
|
||||
values: new object[] { "Resolved", "Resolved" });
|
||||
}
|
||||
}
|
||||
}
|
||||
8628
Marco.Pms.DataAccess/Migrations/20251114120630_Added_GoogleMapUrl_In_ServiceProject_Table.Designer.cs
generated
Normal file
8628
Marco.Pms.DataAccess/Migrations/20251114120630_Added_GoogleMapUrl_In_ServiceProject_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_GoogleMapUrl_In_ServiceProject_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "GoogleMapUrl",
|
||||
table: "ServiceProjects",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GoogleMapUrl",
|
||||
table: "ServiceProjects");
|
||||
}
|
||||
}
|
||||
}
|
||||
8631
Marco.Pms.DataAccess/Migrations/20251115101806_Added_GSTNumber_In_Organization_Table.Designer.cs
generated
Normal file
8631
Marco.Pms.DataAccess/Migrations/20251115101806_Added_GSTNumber_In_Organization_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_GSTNumber_In_Organization_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "SPRID",
|
||||
table: "TenantOrgMappings",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "SPRID",
|
||||
table: "Organizations",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double),
|
||||
oldType: "double");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "GSTNumber",
|
||||
table: "Organizations",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Organizations",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||
columns: new[] { "GSTNumber", "SPRID" },
|
||||
values: new object[] { null, 5400L });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GSTNumber",
|
||||
table: "Organizations");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "SPRID",
|
||||
table: "TenantOrgMappings",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "SPRID",
|
||||
table: "Organizations",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Organizations",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
||||
column: "SPRID",
|
||||
value: 5400.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
8794
Marco.Pms.DataAccess/Migrations/20251117045622_Added_JobAttendance_Related_Table.Designer.cs
generated
Normal file
8794
Marco.Pms.DataAccess/Migrations/20251117045622_Added_JobAttendance_Related_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_JobAttendance_Related_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobAttendance",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTcketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Action = table.Column<int>(type: "int", nullable: false),
|
||||
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
TaggedInTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
TaggedOutTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
TaggedInAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
TaggedOutAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobAttendance", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendance_Employees_EmployeeId",
|
||||
column: x => x.EmployeeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendance_JobTickets_JobTcketId",
|
||||
column: x => x.JobTcketId,
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendance_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "JobAttendanceLogs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobAttendanceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
JobTcketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
Latitude = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Longitude = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Action = table.Column<int>(type: "int", nullable: false),
|
||||
Comment = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
MarkedTIme = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
MarkedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_JobAttendanceLogs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendanceLogs_Documents_DocumentId",
|
||||
column: x => x.DocumentId,
|
||||
principalTable: "Documents",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendanceLogs_Employees_EmployeeId",
|
||||
column: x => x.EmployeeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendanceLogs_JobAttendance_JobAttendanceId",
|
||||
column: x => x.JobAttendanceId,
|
||||
principalTable: "JobAttendance",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendanceLogs_JobTickets_JobTcketId",
|
||||
column: x => x.JobTcketId,
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_JobAttendanceLogs_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendance_EmployeeId",
|
||||
table: "JobAttendance",
|
||||
column: "EmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendance_JobTcketId",
|
||||
table: "JobAttendance",
|
||||
column: "JobTcketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendance_TenantId",
|
||||
table: "JobAttendance",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendanceLogs_DocumentId",
|
||||
table: "JobAttendanceLogs",
|
||||
column: "DocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendanceLogs_EmployeeId",
|
||||
table: "JobAttendanceLogs",
|
||||
column: "EmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendanceLogs_JobAttendanceId",
|
||||
table: "JobAttendanceLogs",
|
||||
column: "JobAttendanceId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendanceLogs_JobTcketId",
|
||||
table: "JobAttendanceLogs",
|
||||
column: "JobTcketId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobAttendanceLogs_TenantId",
|
||||
table: "JobAttendanceLogs",
|
||||
column: "TenantId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobAttendanceLogs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "JobAttendance");
|
||||
}
|
||||
}
|
||||
}
|
||||
8801
Marco.Pms.DataAccess/Migrations/20251117074609_Added_UID_In_JobTicket_Table.Designer.cs
generated
Normal file
8801
Marco.Pms.DataAccess/Migrations/20251117074609_Added_UID_In_JobTicket_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_UID_In_JobTicket_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "UIDPostfix",
|
||||
table: "JobTickets",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "UIDPrefix",
|
||||
table: "JobTickets",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UIDPostfix",
|
||||
table: "JobTickets");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UIDPrefix",
|
||||
table: "JobTickets");
|
||||
}
|
||||
}
|
||||
}
|
||||
8802
Marco.Pms.DataAccess/Migrations/20251117135930_Added_BilledTo_In_Invoice_Table.Designer.cs
generated
Normal file
8802
Marco.Pms.DataAccess/Migrations/20251117135930_Added_BilledTo_In_Invoice_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_BilledTo_In_Invoice_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Invoices_Projects_ProjectId",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Invoices_ProjectId",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "BilledToId",
|
||||
table: "Invoices",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Invoices_BilledToId",
|
||||
table: "Invoices",
|
||||
column: "BilledToId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Invoices_Organizations_BilledToId",
|
||||
table: "Invoices",
|
||||
column: "BilledToId",
|
||||
principalTable: "Organizations",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Invoices_Organizations_BilledToId",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Invoices_BilledToId",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BilledToId",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Invoices_ProjectId",
|
||||
table: "Invoices",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Invoices_Projects_ProjectId",
|
||||
table: "Invoices",
|
||||
column: "ProjectId",
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
8895
Marco.Pms.DataAccess/Migrations/20251119065548_Added_ProjectBranches_Table.Designer.cs
generated
Normal file
8895
Marco.Pms.DataAccess/Migrations/20251119065548_Added_ProjectBranches_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_ProjectBranches_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Projects",
|
||||
keyColumn: "ContactPerson",
|
||||
keyValue: null,
|
||||
column: "ContactPerson",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactPerson",
|
||||
table: "Projects",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProjectBranches",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
BranchName = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ContactInformation = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Address = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
BranchType = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
GoogleMapUrl = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProjectBranches", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectBranches_Employees_CreatedById",
|
||||
column: x => x.CreatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectBranches_Employees_UpdatedById",
|
||||
column: x => x.UpdatedById,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectBranches_ServiceProjects_ProjectId",
|
||||
column: x => x.ProjectId,
|
||||
principalTable: "ServiceProjects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectBranches_Tenants_TenantId",
|
||||
column: x => x.TenantId,
|
||||
principalTable: "Tenants",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectBranches_CreatedById",
|
||||
table: "ProjectBranches",
|
||||
column: "CreatedById");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectBranches_ProjectId",
|
||||
table: "ProjectBranches",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectBranches_TenantId",
|
||||
table: "ProjectBranches",
|
||||
column: "TenantId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectBranches_UpdatedById",
|
||||
table: "ProjectBranches",
|
||||
column: "UpdatedById");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProjectBranches");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ContactPerson",
|
||||
table: "Projects",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_ProjectBranch_As_ForignKey_In_JobTickets_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProjectBranchId",
|
||||
table: "JobTickets",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||
columns: new[] { "DisplayName", "Name" },
|
||||
values: new object[] { "Work Done", "Work Done" });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"),
|
||||
columns: new[] { "DisplayName", "Name" },
|
||||
values: new object[] { "Review Done", "Review Done" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_JobTickets_ProjectBranchId",
|
||||
table: "JobTickets",
|
||||
column: "ProjectBranchId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_JobTickets_ProjectBranches_ProjectBranchId",
|
||||
table: "JobTickets",
|
||||
column: "ProjectBranchId",
|
||||
principalTable: "ProjectBranches",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_JobTickets_ProjectBranches_ProjectBranchId",
|
||||
table: "JobTickets");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_JobTickets_ProjectBranchId",
|
||||
table: "JobTickets");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectBranchId",
|
||||
table: "JobTickets");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"),
|
||||
columns: new[] { "DisplayName", "Name" },
|
||||
values: new object[] { "Review", "Review" });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "JobStatus",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"),
|
||||
columns: new[] { "DisplayName", "Name" },
|
||||
values: new object[] { "Done", "Done" });
|
||||
}
|
||||
}
|
||||
}
|
||||
8909
Marco.Pms.DataAccess/Migrations/20251120051203_Added_IsArchive_In_JobTicket_Table.Designer.cs
generated
Normal file
8909
Marco.Pms.DataAccess/Migrations/20251120051203_Added_IsArchive_In_JobTicket_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_IsArchive_In_JobTicket_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsArchive",
|
||||
table: "JobTickets",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsArchive",
|
||||
table: "JobTickets");
|
||||
}
|
||||
}
|
||||
}
|
||||
8899
Marco.Pms.DataAccess/Migrations/20251120111120_Removed_Project_ForignKey_From_Expenses_Table.Designer.cs
generated
Normal file
8899
Marco.Pms.DataAccess/Migrations/20251120111120_Removed_Project_ForignKey_From_Expenses_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Removed_Project_ForignKey_From_Expenses_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Expenses_Projects_ProjectId",
|
||||
table: "Expenses");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Expenses_ProjectId",
|
||||
table: "Expenses");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Expenses_ProjectId",
|
||||
table: "Expenses",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Expenses_Projects_ProjectId",
|
||||
table: "Expenses",
|
||||
column: "ProjectId",
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Removed_Project_ForignKey_From_PaymentRequest_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PaymentRequests_Projects_ProjectId",
|
||||
table: "PaymentRequests");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PaymentRequests_ProjectId",
|
||||
table: "PaymentRequests");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PaymentRequests_ProjectId",
|
||||
table: "PaymentRequests",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PaymentRequests_Projects_ProjectId",
|
||||
table: "PaymentRequests",
|
||||
column: "ProjectId",
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Removed_Project_ForignKey_From_RecurringPayment_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_RecurringPayments_Projects_ProjectId",
|
||||
table: "RecurringPayments");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_RecurringPayments_ProjectId",
|
||||
table: "RecurringPayments");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RecurringPayments_ProjectId",
|
||||
table: "RecurringPayments",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RecurringPayments_Projects_ProjectId",
|
||||
table: "RecurringPayments",
|
||||
column: "ProjectId",
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Removed_Project_ForignKey_From_ProjectContactMapping_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ContactProjectMappings_Projects_ProjectId",
|
||||
table: "ContactProjectMappings");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ContactProjectMappings_ProjectId",
|
||||
table: "ContactProjectMappings");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ContactProjectMappings_ProjectId",
|
||||
table: "ContactProjectMappings",
|
||||
column: "ProjectId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ContactProjectMappings_Projects_ProjectId",
|
||||
table: "ContactProjectMappings",
|
||||
column: "ProjectId",
|
||||
principalTable: "Projects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
8873
Marco.Pms.DataAccess/Migrations/20251125072208_Corrected_JobTicketId_Spelling_In_JobAttendance.Designer.cs
generated
Normal file
8873
Marco.Pms.DataAccess/Migrations/20251125072208_Corrected_JobTicketId_Spelling_In_JobAttendance.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,106 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Corrected_JobTicketId_Spelling_In_JobAttendance : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_JobAttendance_JobTickets_JobTcketId",
|
||||
table: "JobAttendance");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_JobAttendanceLogs_JobTickets_JobTcketId",
|
||||
table: "JobAttendanceLogs");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "JobTcketId",
|
||||
table: "JobAttendanceLogs",
|
||||
newName: "JobTicketId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_JobAttendanceLogs_JobTcketId",
|
||||
table: "JobAttendanceLogs",
|
||||
newName: "IX_JobAttendanceLogs_JobTicketId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "JobTcketId",
|
||||
table: "JobAttendance",
|
||||
newName: "JobTicketId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_JobAttendance_JobTcketId",
|
||||
table: "JobAttendance",
|
||||
newName: "IX_JobAttendance_JobTicketId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_JobAttendance_JobTickets_JobTicketId",
|
||||
table: "JobAttendance",
|
||||
column: "JobTicketId",
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_JobAttendanceLogs_JobTickets_JobTicketId",
|
||||
table: "JobAttendanceLogs",
|
||||
column: "JobTicketId",
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_JobAttendance_JobTickets_JobTicketId",
|
||||
table: "JobAttendance");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_JobAttendanceLogs_JobTickets_JobTicketId",
|
||||
table: "JobAttendanceLogs");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "JobTicketId",
|
||||
table: "JobAttendanceLogs",
|
||||
newName: "JobTcketId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_JobAttendanceLogs_JobTicketId",
|
||||
table: "JobAttendanceLogs",
|
||||
newName: "IX_JobAttendanceLogs_JobTcketId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "JobTicketId",
|
||||
table: "JobAttendance",
|
||||
newName: "JobTcketId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_JobAttendance_JobTicketId",
|
||||
table: "JobAttendance",
|
||||
newName: "IX_JobAttendance_JobTcketId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_JobAttendance_JobTickets_JobTcketId",
|
||||
table: "JobAttendance",
|
||||
column: "JobTcketId",
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_JobAttendanceLogs_JobTickets_JobTcketId",
|
||||
table: "JobAttendanceLogs",
|
||||
column: "JobTcketId",
|
||||
principalTable: "JobTickets",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,8 @@ namespace Marco.Pms.Model.AppMenu
|
||||
public string? Icon { get; set; }
|
||||
public bool Available { get; set; } = true;
|
||||
|
||||
public string? Link { get; set; }
|
||||
public string Link { get; set; } = string.Empty;
|
||||
public string MobileLink { get; set; } = string.Empty;
|
||||
|
||||
// Changed from string → List<string>
|
||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||
|
||||
@ -13,6 +13,7 @@ namespace Marco.Pms.Model.AppMenu
|
||||
public bool Available { get; set; } = true;
|
||||
|
||||
public string Link { get; set; } = string.Empty;
|
||||
public string MobileLink { get; set; } = string.Empty;
|
||||
|
||||
// Changed from string → List<string>
|
||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.OrganizationModel;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@ -11,13 +11,14 @@ namespace Marco.Pms.Model.Collection
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = default!;
|
||||
public string Description { get; set; } = default!;
|
||||
public Guid? BilledToId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("BilledToId")]
|
||||
public Organization? BilledTo { get; set; }
|
||||
public string InvoiceNumber { get; set; } = default!;
|
||||
public string? EInvoiceNumber { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public Project? Project { get; set; }
|
||||
public DateTime InvoiceDate { get; set; }
|
||||
public DateTime ClientSubmitedDate { get; set; }
|
||||
public DateTime ExceptedPaymentDate { get; set; }
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Directory
|
||||
{
|
||||
@ -9,9 +8,6 @@ namespace Marco.Pms.Model.Directory
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public Project? Project { get; set; }
|
||||
public Guid ContactId { get; set; }
|
||||
[ValidateNever]
|
||||
[ForeignKey("ContactId")]
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
public bool Available { get; set; } = true;
|
||||
|
||||
public required string Link { get; set; }
|
||||
public string? MobileLink { get; set; }
|
||||
|
||||
// Changed from string → List<string>
|
||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
public bool Available { get; set; } = true;
|
||||
|
||||
public required string Link { get; set; } = string.Empty;
|
||||
|
||||
public string? MobileLink { get; set; }
|
||||
// Changed from string → List<string>
|
||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
public bool Available { get; set; } = true;
|
||||
|
||||
public required string Link { get; set; }
|
||||
public string? MobileLink { get; set; }
|
||||
|
||||
// Changed from string → List<string>
|
||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
public bool Available { get; set; } = true;
|
||||
|
||||
public string Link { get; set; } = string.Empty;
|
||||
public string? MobileLink { get; set; }
|
||||
|
||||
// Changed from string → List<string>
|
||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||
|
||||
@ -10,6 +10,7 @@ namespace Marco.Pms.Model.Dtos.Collection
|
||||
public required string InvoiceNumber { get; set; }
|
||||
public string? EInvoiceNumber { get; set; }
|
||||
public required Guid ProjectId { get; set; }
|
||||
public required Guid BilledToId { get; set; }
|
||||
public required DateTime InvoiceDate { get; set; }
|
||||
public required DateTime ClientSubmitedDate { get; set; }
|
||||
public required DateTime ExceptedPaymentDate { get; set; }
|
||||
|
||||
8
Marco.Pms.Model/Dtos/Employees/BasicEmployeeDto.cs
Normal file
8
Marco.Pms.Model/Dtos/Employees/BasicEmployeeDto.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace Marco.Pms.Model.Dtos.Employees
|
||||
{
|
||||
public class BasicEmployeeDto
|
||||
{
|
||||
public Guid EmployeeId { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
9
Marco.Pms.Model/Dtos/Master/TagDto.cs
Normal file
9
Marco.Pms.Model/Dtos/Master/TagDto.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Dtos.Master
|
||||
{
|
||||
public class TagDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@
|
||||
public required string ContactPerson { get; set; }
|
||||
public required string Address { get; set; }
|
||||
public required string ContactNumber { get; set; }
|
||||
public string? GSTNumber { get; set; }
|
||||
public string? logoImage { get; set; }
|
||||
public List<Guid>? ServiceIds { get; set; }
|
||||
}
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Dtos.Organization
|
||||
{
|
||||
public class OrganizationHierarchyDto
|
||||
{
|
||||
public Guid ReportToId { get; set; }
|
||||
public bool IsPrimary { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@
|
||||
public required string ContactPerson { get; set; }
|
||||
public required string Address { get; set; }
|
||||
public required string ContactNumber { get; set; }
|
||||
public string? GSTNumber { get; set; }
|
||||
public List<Guid>? ServiceIds { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class ChangeJobStatusDto
|
||||
{
|
||||
public required Guid JobTicketId { get; set; }
|
||||
public required Guid StatusId { get; set; }
|
||||
public required string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
17
Marco.Pms.Model/Dtos/ServiceProject/CreateJobTicketDto.cs
Normal file
17
Marco.Pms.Model/Dtos/ServiceProject/CreateJobTicketDto.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Marco.Pms.Model.Dtos.Employees;
|
||||
using Marco.Pms.Model.Dtos.Master;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class CreateJobTicketDto
|
||||
{
|
||||
public required string Title { get; set; }
|
||||
public required string Description { get; set; }
|
||||
public required Guid ProjectId { get; set; }
|
||||
public Guid? ProjectBranchId { get; set; }
|
||||
public List<BasicEmployeeDto>? Assignees { get; set; }
|
||||
public required DateTime StartDate { get; set; }
|
||||
public required DateTime DueDate { get; set; }
|
||||
public List<TagDto>? Tags { get; set; }
|
||||
}
|
||||
}
|
||||
16
Marco.Pms.Model/Dtos/ServiceProject/JobAttendanceDto.cs
Normal file
16
Marco.Pms.Model/Dtos/ServiceProject/JobAttendanceDto.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using Marco.Pms.Model.ServiceProject;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class JobAttendanceDto
|
||||
{
|
||||
public required Guid JobTicketId { get; set; }
|
||||
public required TAGGING_MARK_TYPE Action { get; set; }
|
||||
public string? Latitude { get; set; }
|
||||
public string? Longitude { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public DateTime? MarkedAt { get; set; }
|
||||
public FileUploadModel? Attachment { get; set; }
|
||||
}
|
||||
}
|
||||
12
Marco.Pms.Model/Dtos/ServiceProject/JobCommentDto.cs
Normal file
12
Marco.Pms.Model/Dtos/ServiceProject/JobCommentDto.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class JobCommentDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public required Guid JobTicketId { get; set; }
|
||||
public required string Comment { get; set; }
|
||||
public List<FileUploadModel>? Attachments { get; set; }
|
||||
}
|
||||
}
|
||||
13
Marco.Pms.Model/Dtos/ServiceProject/ProjectBranchDto.cs
Normal file
13
Marco.Pms.Model/Dtos/ServiceProject/ProjectBranchDto.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class ProjectBranchDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public required string BranchName { get; set; }
|
||||
public required Guid ProjectId { get; set; }
|
||||
public required string ContactInformation { get; set; }
|
||||
public required string Address { get; set; }
|
||||
public required string BranchType { get; set; } // HQ, ATMs, Bank Branches, Overcounter desk
|
||||
public string? GoogleMapUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class ServiceProjectAllocationDto
|
||||
{
|
||||
public Guid ProjectId { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
public Guid TeamRoleId { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
22
Marco.Pms.Model/Dtos/ServiceProject/ServiceProjectDto.cs
Normal file
22
Marco.Pms.Model/Dtos/ServiceProject/ServiceProjectDto.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Marco.Pms.Model.Dtos.Master;
|
||||
using Marco.Pms.Model.ViewModels.Master;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class ServiceProjectDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string ShortName { get; set; }
|
||||
public required Guid ClientId { get; set; }
|
||||
public required List<BasicServiceMasterDto> Services { get; set; }
|
||||
public required string Address { get; set; }
|
||||
public required DateTime AssignedDate { get; set; }
|
||||
public required Guid StatusId { get; set; }
|
||||
public List<TagDto>? Tags { get; set; }
|
||||
public required string ContactName { get; set; }
|
||||
public required string ContactPhone { get; set; }
|
||||
public required string ContactEmail { get; set; }
|
||||
public string? GoogleMapUrl { get; set; }
|
||||
}
|
||||
}
|
||||
12
Marco.Pms.Model/Dtos/ServiceProject/TalkingPointDto.cs
Normal file
12
Marco.Pms.Model/Dtos/ServiceProject/TalkingPointDto.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class TalkingPointDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public required Guid ServiceProjectId { get; set; }
|
||||
public required string Comment { get; set; }
|
||||
public List<FileUploadModel>? Attachments { get; set; }
|
||||
}
|
||||
}
|
||||
17
Marco.Pms.Model/Dtos/ServiceProject/UpdateJobTicketDto.cs
Normal file
17
Marco.Pms.Model/Dtos/ServiceProject/UpdateJobTicketDto.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Marco.Pms.Model.Dtos.Employees;
|
||||
using Marco.Pms.Model.Dtos.Master;
|
||||
|
||||
namespace Marco.Pms.Model.Dtos.ServiceProject
|
||||
{
|
||||
public class UpdateJobTicketDto
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public Guid StatusId { get; set; }
|
||||
public List<BasicEmployeeDto>? Assignees { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime DueDate { get; set; }
|
||||
public List<TagDto>? Tags { get; set; }
|
||||
public bool IsArchive { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Expenses.Masters;
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@ -14,10 +13,6 @@ namespace Marco.Pms.Model.Expenses
|
||||
public string UIDPrefix { get; set; } = default!;
|
||||
public int UIDPostfix { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public Project? Project { get; set; }
|
||||
public Guid ExpensesTypeId { get; set; }
|
||||
|
||||
//[ValidateNever]
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Expenses.Masters;
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@ -28,10 +27,6 @@ namespace Marco.Pms.Model.Expenses
|
||||
public double? TDSPercentage { get; set; }
|
||||
public DateTime DueDate { get; set; }
|
||||
public Guid? ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public Project? Project { get; set; }
|
||||
public Guid? RecurringPaymentId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Expenses.Masters;
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.TenantModels;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
@ -29,10 +28,6 @@ namespace Marco.Pms.Model.Expenses
|
||||
public DateTime? LatestPRGeneratedAt { get; set; }
|
||||
public DateTime? NextStrikeDate { get; set; }
|
||||
public Guid? ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public Project? Project { get; set; }
|
||||
public int PaymentBufferDays { get; set; }
|
||||
public Guid? ExpenseCategoryId { get; set; }
|
||||
|
||||
|
||||
11
Marco.Pms.Model/Filters/AdvanceFilter.cs
Normal file
11
Marco.Pms.Model/Filters/AdvanceFilter.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace Marco.Pms.Model.Filters
|
||||
{
|
||||
public class AdvanceFilter
|
||||
{
|
||||
// The dynamic filters from your JSON
|
||||
public List<SortItem>? SortFilters { get; set; }
|
||||
public List<SearchItem>? SearchFilters { get; set; }
|
||||
public List<AdvanceItem>? AdvanceFilters { get; set; }
|
||||
public string GroupByColumn { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
9
Marco.Pms.Model/Filters/AdvanceItem.cs
Normal file
9
Marco.Pms.Model/Filters/AdvanceItem.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.Filters
|
||||
{
|
||||
public class AdvanceItem
|
||||
{
|
||||
public string Column { get; set; } = string.Empty;
|
||||
public string Opration { get; set; } = string.Empty; // "greater than", "equal to", etc.
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
8
Marco.Pms.Model/Filters/SearchItem.cs
Normal file
8
Marco.Pms.Model/Filters/SearchItem.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace Marco.Pms.Model.Filters
|
||||
{
|
||||
public class SearchItem
|
||||
{
|
||||
public string Column { get; set; } = string.Empty;
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
8
Marco.Pms.Model/Filters/SortItem.cs
Normal file
8
Marco.Pms.Model/Filters/SortItem.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace Marco.Pms.Model.Filters
|
||||
{
|
||||
public class SortItem
|
||||
{
|
||||
public string Column { get; set; } = string.Empty;
|
||||
public bool SortDescending { get; set; }
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,8 @@
|
||||
public string? Email { get; set; }
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public string? GSTNumber { get; set; }
|
||||
public string? ContactNumber { get; set; }
|
||||
public double SPRID { get; set; }
|
||||
public long SPRID { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
23
Marco.Pms.Model/OrganizationModel/OrgHierarchyLog.cs
Normal file
23
Marco.Pms.Model/OrganizationModel/OrgHierarchyLog.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.OrganizationModel
|
||||
{
|
||||
public class OrgHierarchyLog : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid OrganizationHierarchyId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("OrganizationHierarchyId")]
|
||||
public OrganizationHierarchy? OrganizationHierarchy { get; set; }
|
||||
public DateTime ReAssignedAt { get; set; }
|
||||
public Guid ReAssignedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ReAssignedById")]
|
||||
public Employee? ReAssignedBy { get; set; }
|
||||
}
|
||||
}
|
||||
@ -8,7 +8,8 @@
|
||||
public string ContactPerson { get; set; } = string.Empty;
|
||||
public string Address { get; set; } = string.Empty;
|
||||
public string ContactNumber { get; set; } = string.Empty;
|
||||
public double SPRID { get; set; }
|
||||
public long SPRID { get; set; }
|
||||
public string? GSTNumber { get; set; }
|
||||
public string? logoImage { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public Guid? CreatedById { get; set; }
|
||||
|
||||
30
Marco.Pms.Model/OrganizationModel/OrganizationHierarchy.cs
Normal file
30
Marco.Pms.Model/OrganizationModel/OrganizationHierarchy.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.OrganizationModel
|
||||
{
|
||||
public class OrganizationHierarchy : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("EmployeeId")]
|
||||
public Employee? Employee { get; set; }
|
||||
public Guid ReportToId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ReportToId")]
|
||||
public Employee? ReportTo { get; set; }
|
||||
public bool IsPrimary { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime AssignedAt { get; set; }
|
||||
public Guid AssignedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("AssignedById")]
|
||||
public Employee? AssignedBy { get; set; }
|
||||
}
|
||||
}
|
||||
@ -13,7 +13,7 @@ namespace Marco.Pms.Model.OrganizationModel
|
||||
[ValidateNever]
|
||||
[ForeignKey("OrganizationId")]
|
||||
public Organization? Organization { get; set; }
|
||||
public double SPRID { get; set; }
|
||||
public long SPRID { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public Guid AssignedById { get; set; }
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ namespace Marco.Pms.Model.Projects
|
||||
public Guid Id { get; set; }
|
||||
[Required]
|
||||
[DisplayName("Project Name")]
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? ShortName { get; set; }
|
||||
|
||||
[DisplayName("Project Address")]
|
||||
@ -22,7 +22,7 @@ namespace Marco.Pms.Model.Projects
|
||||
|
||||
[DisplayName("Contact Person")]
|
||||
|
||||
public string? ContactPerson { get; set; }
|
||||
public string ContactPerson { get; set; } = string.Empty;
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
27
Marco.Pms.Model/ServiceProject/JobAttachment.cs
Normal file
27
Marco.Pms.Model/ServiceProject/JobAttachment.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Marco.Pms.Model.DocumentManager;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobAttachment : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid DocumentId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("DocumentId")]
|
||||
public Document? Document { get; set; }
|
||||
public Guid StatusId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("StatusId")]
|
||||
public JobStatus? Status { get; set; }
|
||||
public Guid? JobCommentId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobCommentId")]
|
||||
public JobComment? JobComment { get; set; }
|
||||
}
|
||||
}
|
||||
32
Marco.Pms.Model/ServiceProject/JobAttendance.cs
Normal file
32
Marco.Pms.Model/ServiceProject/JobAttendance.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobAttendance : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid JobTicketId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobTicketId")]
|
||||
public JobTicket? JobTicket { get; set; }
|
||||
public TAGGING_MARK_TYPE Action { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("EmployeeId")]
|
||||
public Employee? Employee { get; set; }
|
||||
public DateTime TaggedInTime { get; set; }
|
||||
public DateTime? TaggedOutTime { get; set; }
|
||||
public DateTime TaggedInAt { get; set; }
|
||||
public DateTime? TaggedOutAt { get; set; }
|
||||
}
|
||||
|
||||
public enum TAGGING_MARK_TYPE
|
||||
{
|
||||
TAG_IN = 0, TAG_OUT = 1
|
||||
}
|
||||
}
|
||||
39
Marco.Pms.Model/ServiceProject/JobAttendanceLog.cs
Normal file
39
Marco.Pms.Model/ServiceProject/JobAttendanceLog.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using Marco.Pms.Model.DocumentManager;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobAttendanceLog : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid JobAttendanceId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobAttendanceId")]
|
||||
public JobAttendance? JobAttendance { get; set; }
|
||||
public Guid JobTicketId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobTicketId")]
|
||||
public JobTicket? JobTicket { get; set; }
|
||||
public Guid? DocumentId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("DocumentId")]
|
||||
public Document? Document { get; set; }
|
||||
public string? Latitude { get; set; }
|
||||
public string? Longitude { get; set; }
|
||||
public TAGGING_MARK_TYPE Action { get; set; }
|
||||
public string? Comment { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("EmployeeId")]
|
||||
public Employee? Employee { get; set; }
|
||||
public DateTime MarkedTIme { get; set; }
|
||||
public DateTime MarkedAt { get; set; }
|
||||
}
|
||||
}
|
||||
31
Marco.Pms.Model/ServiceProject/JobComment.cs
Normal file
31
Marco.Pms.Model/ServiceProject/JobComment.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobComment : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid JobTicketId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobTicketId")]
|
||||
public JobTicket? JobTicket { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("CreatedById")]
|
||||
public Employee? CreatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
public Guid? UpdatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("UpdatedById")]
|
||||
public Employee? UpdatedBy { get; set; }
|
||||
}
|
||||
}
|
||||
22
Marco.Pms.Model/ServiceProject/JobEmployeeMapping.cs
Normal file
22
Marco.Pms.Model/ServiceProject/JobEmployeeMapping.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobEmployeeMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid AssigneeId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("AssigneeId")]
|
||||
public Employee? Assignee { get; set; }
|
||||
public Guid JobTicketId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobTicketId")]
|
||||
public JobTicket? JobTicket { get; set; }
|
||||
}
|
||||
}
|
||||
10
Marco.Pms.Model/ServiceProject/JobStatus.cs
Normal file
10
Marco.Pms.Model/ServiceProject/JobStatus.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobStatus
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
public int Level { get; set; }
|
||||
}
|
||||
}
|
||||
26
Marco.Pms.Model/ServiceProject/JobStatusMapping.cs
Normal file
26
Marco.Pms.Model/ServiceProject/JobStatusMapping.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobStatusMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid? TeamRoleId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("TeamRoleId")]
|
||||
public TeamRoleMaster? TeamRole { get; set; }
|
||||
public Guid StatusId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("StatusId")]
|
||||
public JobStatus? Status { get; set; }
|
||||
public Guid NextStatusId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("NextStatusId")]
|
||||
public JobStatus? NextStatus { get; set; }
|
||||
}
|
||||
}
|
||||
10
Marco.Pms.Model/ServiceProject/JobTag.cs
Normal file
10
Marco.Pms.Model/ServiceProject/JobTag.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobTag : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
21
Marco.Pms.Model/ServiceProject/JobTagMapping.cs
Normal file
21
Marco.Pms.Model/ServiceProject/JobTagMapping.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobTagMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid JobTagId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobTagId")]
|
||||
public JobTag? JobTag { get; set; }
|
||||
public Guid JobTicketId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("JobTicketId")]
|
||||
public JobTicket? JobTicket { get; set; }
|
||||
}
|
||||
}
|
||||
47
Marco.Pms.Model/ServiceProject/JobTicket.cs
Normal file
47
Marco.Pms.Model/ServiceProject/JobTicket.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class JobTicket : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string UIDPrefix { get; set; } = default!;
|
||||
public int UIDPostfix { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public ServiceProject? Project { get; set; }
|
||||
public Guid? ProjectBranchId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectBranchId")]
|
||||
public ProjectBranch? ProjectBranch { get; set; }
|
||||
public Guid StatusId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("StatusId")]
|
||||
public JobStatus? Status { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime DueDate { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsArchive { get; set; } = false;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("CreatedById")]
|
||||
public Employee? CreatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
public Guid? UpdatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("UpdatedById")]
|
||||
public Employee? UpdatedBy { get; set; }
|
||||
}
|
||||
}
|
||||
35
Marco.Pms.Model/ServiceProject/ProjectBranch.cs
Normal file
35
Marco.Pms.Model/ServiceProject/ProjectBranch.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class ProjectBranch : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string BranchName { get; set; } = string.Empty;
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public ServiceProject? Project { get; set; }
|
||||
public string ContactInformation { get; set; } = string.Empty; // Json string
|
||||
public string Address { get; set; } = string.Empty;
|
||||
public string BranchType { get; set; } = string.Empty; // HQ, ATMs, Bank Branches, Overcounter desk
|
||||
public string? GoogleMapUrl { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("CreatedById")]
|
||||
public Employee? CreatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
public Guid? UpdatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("UpdatedById")]
|
||||
public Employee? UpdatedBy { get; set; }
|
||||
}
|
||||
}
|
||||
45
Marco.Pms.Model/ServiceProject/ServiceProject.cs
Normal file
45
Marco.Pms.Model/ServiceProject/ServiceProject.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.OrganizationModel;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class ServiceProject : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string ShortName { get; set; } = string.Empty;
|
||||
public Guid ClientId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ClientId")]
|
||||
public Organization? Client { get; set; }
|
||||
public string Address { get; set; } = string.Empty;
|
||||
public DateTime AssignedDate { get; set; }
|
||||
public Guid StatusId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("StatusId")]
|
||||
public StatusMaster? Status { get; set; }
|
||||
public string ContactName { get; set; } = string.Empty;
|
||||
public string ContactPhone { get; set; } = string.Empty;
|
||||
public string ContactEmail { get; set; } = string.Empty;
|
||||
public string? GoogleMapUrl { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("CreatedById")]
|
||||
public Employee? CreatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
public Guid? UpdatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("UpdatedById")]
|
||||
public Employee? UpdatedBy { get; set; }
|
||||
}
|
||||
}
|
||||
40
Marco.Pms.Model/ServiceProject/ServiceProjectAllocation.cs
Normal file
40
Marco.Pms.Model/ServiceProject/ServiceProjectAllocation.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class ServiceProjectAllocation : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public ServiceProject? Project { get; set; }
|
||||
public Guid EmployeeId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("EmployeeId")]
|
||||
public Employee? Employee { get; set; }
|
||||
public Guid TeamRoleId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("TeamRoleId")]
|
||||
public TeamRoleMaster? TeamRole { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime AssignedAt { get; set; }
|
||||
public Guid AssignedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("AssignedById")]
|
||||
public Employee? AssignedBy { get; set; }
|
||||
public DateTime? ReAssignedAt { get; set; }
|
||||
public Guid? ReAssignedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ReAssignedById")]
|
||||
public Employee? ReAssignedBy { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class ServiceProjectServiceMapping : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ProjectId")]
|
||||
public ServiceProject? Project { get; set; }
|
||||
public Guid ServiceId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceId")]
|
||||
public ServiceMaster? Service { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
10
Marco.Pms.Model/ServiceProject/ServiceProjectTag.cs
Normal file
10
Marco.Pms.Model/ServiceProject/ServiceProjectTag.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using Marco.Pms.Model.Utilities;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class ServiceProjectTag : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
20
Marco.Pms.Model/ServiceProject/ServiceProjectTagMapping.cs
Normal file
20
Marco.Pms.Model/ServiceProject/ServiceProjectTagMapping.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class ServiceProjectTagMapping
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ServiceProjectTagId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceProjectTagId")]
|
||||
public ServiceProjectTag? ServiceProjectTag { get; set; }
|
||||
public Guid ServiceProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceProjectId")]
|
||||
public ServiceProject? ServiceProject { get; set; }
|
||||
}
|
||||
}
|
||||
31
Marco.Pms.Model/ServiceProject/TalkingPoint.cs
Normal file
31
Marco.Pms.Model/ServiceProject/TalkingPoint.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class TalkingPoint : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ServiceProjectId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("ServiceProjectId")]
|
||||
public ServiceProject? ServiceProject { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("CreatedById")]
|
||||
public Employee? CreatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
public Guid? UpdatedById { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("UpdatedById")]
|
||||
public Employee? UpdatedBy { get; set; }
|
||||
}
|
||||
}
|
||||
22
Marco.Pms.Model/ServiceProject/TalkingPointAttachment.cs
Normal file
22
Marco.Pms.Model/ServiceProject/TalkingPointAttachment.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Marco.Pms.Model.DocumentManager;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class TalkingPointAttachment : TenantRelation
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid DocumentId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("DocumentId")]
|
||||
public Document? Document { get; set; }
|
||||
public Guid? TalkingPointId { get; set; }
|
||||
|
||||
[ValidateNever]
|
||||
[ForeignKey("TalkingPointId")]
|
||||
public TalkingPoint? TalkingPoint { get; set; }
|
||||
}
|
||||
}
|
||||
9
Marco.Pms.Model/ServiceProject/TeamRoleMaster.cs
Normal file
9
Marco.Pms.Model/ServiceProject/TeamRoleMaster.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Marco.Pms.Model.ServiceProject
|
||||
{
|
||||
public class TeamRoleMaster
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
using Marco.Pms.Model.ViewModels.Activities;
|
||||
using Marco.Pms.Model.ViewModels.Organization;
|
||||
using Marco.Pms.Model.ViewModels.Projects;
|
||||
|
||||
namespace Marco.Pms.Model.ViewModels.Collection
|
||||
@ -11,6 +12,7 @@ namespace Marco.Pms.Model.ViewModels.Collection
|
||||
public string InvoiceNumber { get; set; } = default!;
|
||||
public string? EInvoiceNumber { get; set; }
|
||||
public BasicProjectVM? Project { get; set; }
|
||||
public BasicOrganizationVm? BilledTo { get; set; }
|
||||
public DateTime InvoiceDate { get; set; }
|
||||
public DateTime ClientSubmitedDate { get; set; }
|
||||
public DateTime ExceptedPaymentDate { get; set; }
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Marco.Pms.Model.ViewModels.Activities;
|
||||
using Marco.Pms.Model.ViewModels.Organization;
|
||||
using Marco.Pms.Model.ViewModels.Projects;
|
||||
|
||||
namespace Marco.Pms.Model.ViewModels.Collection
|
||||
@ -10,6 +11,7 @@ namespace Marco.Pms.Model.ViewModels.Collection
|
||||
public string Description { get; set; } = default!;
|
||||
public string InvoiceNumber { get; set; } = default!;
|
||||
public string? EInvoiceNumber { get; set; }
|
||||
public BasicOrganizationVm? BilledTo { get; set; }
|
||||
public BasicProjectVM? Project { get; set; }
|
||||
public DateTime InvoiceDate { get; set; }
|
||||
public DateTime ClientSubmitedDate { get; set; }
|
||||
|
||||
@ -5,5 +5,7 @@
|
||||
public Guid Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public bool Available { get; set; }
|
||||
public string? MobileLink { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user