Compare commits
16 Commits
main
...
Inventory_
| Author | SHA1 | Date | |
|---|---|---|---|
| ffb9e6508f | |||
| 8a36ffe652 | |||
| 28d64c71bd | |||
| a05f1ba5c3 | |||
| 25896d3093 | |||
| 7e90e4a703 | |||
| d1af0df27b | |||
| 511ad38c94 | |||
| ad273ed58e | |||
| ca07dea389 | |||
| 6377cee718 | |||
| 0e698a8a0d | |||
| 3d37050dff | |||
| df999ed2c5 | |||
| 468f50f2da | |||
| fba12f577d |
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@
|
|||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1,46 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_PaymentDetails_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PaymentDetails",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
PaymentId = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OrderId = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Status = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Method = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
EncryptedDetails = table.Column<byte[]>(type: "longblob", nullable: true),
|
|
||||||
Nonce = table.Column<byte[]>(type: "longblob", nullable: true),
|
|
||||||
Tag = table.Column<byte[]>(type: "longblob", nullable: true),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PaymentDetails", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PaymentDetails");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,62 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_TenantEnquire_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "TenantEnquires",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
FirstName = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
LastName = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OrganizationName = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Email = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ContactNumber = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
BillingAddress = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
OrganizationSize = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IndustryId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Reference = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_TenantEnquires", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantEnquires_Industries_IndustryId",
|
|
||||||
column: x => x.IndustryId,
|
|
||||||
principalTable: "Industries",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantEnquires_IndustryId",
|
|
||||||
table: "TenantEnquires",
|
|
||||||
column: "IndustryId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "TenantEnquires");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,50 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_PaymentDetails_In_TenantSubscription_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantSubscriptions_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "PaymentDetailId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "PaymentDetailId",
|
|
||||||
principalTable: "PaymentDetails",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_TenantSubscriptions_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,304 @@
|
|||||||
|
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_Data_In_Units_And_CompanyTypeMaster_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "CompanyTypeMasters",
|
||||||
|
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_CompanyTypeMasters", x => x.Id);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "CompanyTypeMasters",
|
||||||
|
columns: new[] { "Id", "Description", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("04f543cb-6797-41bf-bfd8-e3c399c9c071"), "Company whose shares are traded publicly", "Public Limited" },
|
||||||
|
{ new Guid("8703932e-ca8d-4ab9-876b-7c313133356d"), "Owned and run by one individual", "Sole Proprietorship" },
|
||||||
|
{ new Guid("ea0d374a-e149-4296-9f45-eb36b39047d6"), "Privately held company with limited liability", "Private Limited" },
|
||||||
|
{ new Guid("f9426132-8bc9-440d-bd4f-a9f2bc7f395a"), "Business owned by two or more partners", "Partnership" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
columns: new[] { "Id", "Description", "Name" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea"), "Measures the extent of an object or distance between two points in space.", "Length" },
|
||||||
|
{ new Guid("2ecfd89f-8c90-4664-a72e-911b7ad29646"), "Measures the flow of electric charge.", "Electric Current" },
|
||||||
|
{ new Guid("52733b8a-04bc-4eb7-bade-9f7869283473"), "Measures the three - dimensional space occupied by a substance or object.", "Volume" },
|
||||||
|
{ new Guid("7ef849c0-0979-4a6c-87ad-9aefb8675679"), "Measures the duration or interval between events.", "Time" },
|
||||||
|
{ new Guid("806e3b0a-306e-427e-8206-610c1c618cd8"), "Measures how fast an object moves, i.e., distance traveled per unit time.", "Speed" },
|
||||||
|
{ new Guid("a0dd396c-943a-49cd-87e9-24e1fc9cf1b3"), "Measures the heat or thermal energy level of a system.", "Thermodynamic Temperature" },
|
||||||
|
{ new Guid("abc1b8cc-fcaf-4e45-8b72-e47036166fbc"), "Measures the perceived brightness of light emitted from a source.", "Luminous Intensity" },
|
||||||
|
{ new Guid("b1c4b844-1b85-4601-a575-4992c47533ac"), "Counts the number of elementary entities(atoms, molecules, etc.) in a sample.", "Amount of Substance" },
|
||||||
|
{ new Guid("d1300314-3db6-48c6-b5d2-5542d30d18ea"), "Measures the size of a surface.", "Area" },
|
||||||
|
{ new Guid("d47a54aa-de46-4aec-9bd6-276b046d35ac"), "Represents the amount of matter in an object.", "Mass" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
columns: new[] { "Id", "Description", "Name", "UnitTypeId" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("088630c5-6866-49ea-afab-cb6c0d3d0ebb"), "Non-SI unit; equal to 0.3048 meters", "Foot", new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea") },
|
||||||
|
{ new Guid("0dd0fa51-36bf-4083-a7b1-901f7a3fe234"), "SI base unit of temperature", "Kelvin", new Guid("a0dd396c-943a-49cd-87e9-24e1fc9cf1b3") },
|
||||||
|
{ new Guid("131b4588-aba2-479c-a1e5-0ad461f16329"), "1000 meters; commonly used for large distances", "Kilometer", new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea") },
|
||||||
|
{ new Guid("151c7344-7b70-4bea-a04f-39b6f5b43ce0"), "SI derived unit for speed/velocity", "Meter per second", new Guid("806e3b0a-306e-427e-8206-610c1c618cd8") },
|
||||||
|
{ new Guid("15f4422e-b861-45f6-84e4-c1932b7df119"), "SI derived unit of area", "Square meter", new Guid("d1300314-3db6-48c6-b5d2-5542d30d18ea") },
|
||||||
|
{ new Guid("18e72164-8ead-45a0-9291-a5179e059c0c"), "Scale for measuring temperature; 0°C = 273.15 K", "Degree Celsius", new Guid("a0dd396c-943a-49cd-87e9-24e1fc9cf1b3") },
|
||||||
|
{ new Guid("26f6a207-5c8a-43a5-91f3-33eb1f46227f"), "0.000001 kilogram", "Milligram", new Guid("d47a54aa-de46-4aec-9bd6-276b046d35ac") },
|
||||||
|
{ new Guid("2e7d1cad-4c26-408c-9b70-dd0dc0dcc145"), "Non-SI unit; equal to 0.0254 meters", "Inch", new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea") },
|
||||||
|
{ new Guid("356a2536-5b0b-4128-baaa-306245068d3c"), "1000 kilograms", "Metric ton", new Guid("d47a54aa-de46-4aec-9bd6-276b046d35ac") },
|
||||||
|
{ new Guid("36c29f6f-70dc-4ca6-bd1e-64b578de0a0f"), "0.001 cubic meter; commonly used for liquids", "Liter", new Guid("52733b8a-04bc-4eb7-bade-9f7869283473") },
|
||||||
|
{ new Guid("45dd0601-dc09-4922-9153-ec76431ef0c5"), "0.001 ampere", "Milliampere", new Guid("2ecfd89f-8c90-4664-a72e-911b7ad29646") },
|
||||||
|
{ new Guid("4752422b-4b9b-4fca-9d78-3a372c0a8e7c"), "0.001 second", "Millisecond", new Guid("7ef849c0-0979-4a6c-87ad-9aefb8675679") },
|
||||||
|
{ new Guid("4769e008-5e0c-4b60-b434-b23060966d54"), "Non-SI unit; equal to 1609.34 meters", "Mile", new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea") },
|
||||||
|
{ new Guid("53f3a4ca-f44b-481c-92ab-a9cd49649243"), "SI base unit of electric current", "Ampere", new Guid("2ecfd89f-8c90-4664-a72e-911b7ad29646") },
|
||||||
|
{ new Guid("6df17071-6506-46dc-bd81-326391941dfa"), "0.001 kilogram", "Gram", new Guid("d47a54aa-de46-4aec-9bd6-276b046d35ac") },
|
||||||
|
{ new Guid("723496bc-500b-4938-8f25-48472446c6e9"), "SI base unit of amount of substance", "Mole", new Guid("b1c4b844-1b85-4601-a575-4992c47533ac") },
|
||||||
|
{ new Guid("78b9db6d-5bca-4d87-9d98-7a70fcc400f7"), "Common unit of speed; 1 km/h = 0.27778 m/s", "Kilometer per hour", new Guid("806e3b0a-306e-427e-8206-610c1c618cd8") },
|
||||||
|
{ new Guid("7bc508a0-c5d1-497e-859c-6a617613d9a6"), "10,000 square meters; used for land area", "Hectare", new Guid("d1300314-3db6-48c6-b5d2-5542d30d18ea") },
|
||||||
|
{ new Guid("8392eab5-7b8c-4785-873b-81072566b876"), "SI base unit of mass", "Kilogram", new Guid("d47a54aa-de46-4aec-9bd6-276b046d35ac") },
|
||||||
|
{ new Guid("8ca66275-772e-43c3-bb7b-6b68af4b1839"), "SI base unit of time", "Second", new Guid("7ef849c0-0979-4a6c-87ad-9aefb8675679") },
|
||||||
|
{ new Guid("8ce98c62-83f3-4a45-afb0-32d4e3edfb9c"), "0.001 meter; for very small lengths", "Millimeter", new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea") },
|
||||||
|
{ new Guid("93a97a4d-603d-4c00-a516-f3170656f0b2"), "60 seconds", "Minute", new Guid("7ef849c0-0979-4a6c-87ad-9aefb8675679") },
|
||||||
|
{ new Guid("94eea97c-8853-414c-b7a9-4b05b483353d"), "3600 seconds", "Hour", new Guid("7ef849c0-0979-4a6c-87ad-9aefb8675679") },
|
||||||
|
{ new Guid("98c8f101-310b-450e-b502-4cf61d9cde1a"), "SI derived unit of volume", "Cubic meter", new Guid("52733b8a-04bc-4eb7-bade-9f7869283473") },
|
||||||
|
{ new Guid("9e830840-c1f1-4dfc-aaef-74a1f464c798"), "SI base unit of luminous intensity", "Candela", new Guid("abc1b8cc-fcaf-4e45-8b72-e47036166fbc") },
|
||||||
|
{ new Guid("9f758559-e5a0-40b9-a21f-f9bd5ddd1e9b"), "0.01 meter; used for small lengths", "Centimeter", new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea") },
|
||||||
|
{ new Guid("b1aab8fe-2d78-4e65-974a-bc09a22446ee"), "0.000001 cubic meter or 0.001 liter", "Milliliter", new Guid("52733b8a-04bc-4eb7-bade-9f7869283473") },
|
||||||
|
{ new Guid("e0009850-0d6a-4ed0-bf9b-daf1354869f7"), "Non-SI unit; equal to 0.453592 kilograms", "Pound", new Guid("d47a54aa-de46-4aec-9bd6-276b046d35ac") },
|
||||||
|
{ new Guid("f968eb00-c9b3-483b-ba4b-3ed8ee89de17"), "1,000,000 square meters", "Square kilometer", new Guid("d1300314-3db6-48c6-b5d2-5542d30d18ea") },
|
||||||
|
{ new Guid("fae4dd36-e9eb-49a4-bcaa-9e723fd43069"), "SI base unit of length", "Meter", new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea") }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "CompanyTypeMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("088630c5-6866-49ea-afab-cb6c0d3d0ebb"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("0dd0fa51-36bf-4083-a7b1-901f7a3fe234"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("131b4588-aba2-479c-a1e5-0ad461f16329"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("151c7344-7b70-4bea-a04f-39b6f5b43ce0"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("15f4422e-b861-45f6-84e4-c1932b7df119"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("18e72164-8ead-45a0-9291-a5179e059c0c"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("26f6a207-5c8a-43a5-91f3-33eb1f46227f"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2e7d1cad-4c26-408c-9b70-dd0dc0dcc145"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("356a2536-5b0b-4128-baaa-306245068d3c"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("36c29f6f-70dc-4ca6-bd1e-64b578de0a0f"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("45dd0601-dc09-4922-9153-ec76431ef0c5"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("4752422b-4b9b-4fca-9d78-3a372c0a8e7c"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("4769e008-5e0c-4b60-b434-b23060966d54"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("53f3a4ca-f44b-481c-92ab-a9cd49649243"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6df17071-6506-46dc-bd81-326391941dfa"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("723496bc-500b-4938-8f25-48472446c6e9"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("78b9db6d-5bca-4d87-9d98-7a70fcc400f7"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7bc508a0-c5d1-497e-859c-6a617613d9a6"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("8392eab5-7b8c-4785-873b-81072566b876"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("8ca66275-772e-43c3-bb7b-6b68af4b1839"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("8ce98c62-83f3-4a45-afb0-32d4e3edfb9c"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("93a97a4d-603d-4c00-a516-f3170656f0b2"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("94eea97c-8853-414c-b7a9-4b05b483353d"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("98c8f101-310b-450e-b502-4cf61d9cde1a"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("9e830840-c1f1-4dfc-aaef-74a1f464c798"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("9f758559-e5a0-40b9-a21f-f9bd5ddd1e9b"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b1aab8fe-2d78-4e65-974a-bc09a22446ee"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("e0009850-0d6a-4ed0-bf9b-daf1354869f7"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("f968eb00-c9b3-483b-ba4b-3ed8ee89de17"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "TechnicalUnits",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("fae4dd36-e9eb-49a4-bcaa-9e723fd43069"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("21dc7d85-1018-479f-8e4a-3b52294903ea"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2ecfd89f-8c90-4664-a72e-911b7ad29646"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("52733b8a-04bc-4eb7-bade-9f7869283473"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("7ef849c0-0979-4a6c-87ad-9aefb8675679"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("806e3b0a-306e-427e-8206-610c1c618cd8"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a0dd396c-943a-49cd-87e9-24e1fc9cf1b3"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("abc1b8cc-fcaf-4e45-8b72-e47036166fbc"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b1c4b844-1b85-4601-a575-4992c47533ac"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("d1300314-3db6-48c6-b5d2-5542d30d18ea"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "UnitTypes",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("d47a54aa-de46-4aec-9bd6-276b046d35ac"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,280 @@
|
|||||||
|
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 Made_Status_Mapping_Nullable : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_NextPurchaseStatu~",
|
||||||
|
table: "PurchaseStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_PreviousPurchaseS~",
|
||||||
|
table: "PurchaseStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_PreviousRequisit~",
|
||||||
|
table: "RequisitionStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "CompanyTypeId",
|
||||||
|
table: "Suppliers",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "PreviousRequisitionStatusId",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)")
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "PreviousPurchaseStatusId",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)")
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "NextPurchaseStatusId",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)")
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "Name", "ShortName" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("2e097d8b-63a2-4b96-8c55-61c2826f1001"), "Materials, components, and systems used in civil and structural engineering, including concrete, steel, reinforcement, and construction accessories.", true, "Civil/Structural", "CIV" },
|
||||||
|
{ new Guid("57b4ccf4-9e34-422d-b2c9-0a16d9c91009"), "Hand tools, power tools, measuring instruments, and workshop equipment for industrial and maintenance use.", true, "Tools & Equipment", "TOO" },
|
||||||
|
{ new Guid("6089cc9c-70dd-4d3a-8b68-0c7c79371004"), "Mechanical components and systems such as pumps, motors, gearboxes, bearings, compressors, and power transmission equipment.", true, "Mechanical & Power Transmission", "MEC" },
|
||||||
|
{ new Guid("a4ad945b-9213-4f4f-b823-b8c277871005"), "Pipes, fittings, valves, sanitary fixtures, and drainage systems used for water supply and waste management.", true, "Plumbing & Sanitary", "PLU" },
|
||||||
|
{ new Guid("ac930654-b973-4d5c-b13b-06e6815c1008"), "Industrial machinery, plant equipment, forklifts, cranes, and material handling systems.", true, "Plant, Machinery & Material Handling", "PLA" },
|
||||||
|
{ new Guid("adbd1c50-e845-4b52-9406-2f1e1c881007"), "Firefighting systems, alarms, extinguishers, safety gear, and related safety infrastructure.", true, "Fire & Safety", "FIR" },
|
||||||
|
{ new Guid("b5c4f7b3-bf24-4f19-9b5c-2deb12131002"), "Cables, lighting, wiring devices, control panels, transformers, and electrical distribution systems for building and industrial use.", true, "Electrical", "ELE" },
|
||||||
|
{ new Guid("bbdc04bb-d930-428c-aabc-72e198ea100c"), "Industrial packaging materials, adhesive tapes, cleaning agents, lubricants, and operational consumables.", true, "Packaging, Consumables, Chemicals & Lubricants", "PAC" },
|
||||||
|
{ new Guid("cd59914f-4e6b-47eb-8d2a-eecb85bc100e"), "Vehicles, fleet equipment, spare parts, lubricants, and accessories for automotive applications.", true, "Automotive & Fleet", "AUT" },
|
||||||
|
{ new Guid("d77d7b2c-83a3-44e9-8dea-62ee85bb1006"), "Heating, ventilation, and air conditioning equipment including chillers, ducts, diffusers, and air handling units.", true, "HVAC", "HVA" },
|
||||||
|
{ new Guid("d9677af1-6f91-44da-b12e-0f7ab00c100d"), "Cement, tiles, paints, glass, flooring, and other architectural finishing materials.", true, "Building Materials & Finishes", "BLD" },
|
||||||
|
{ new Guid("db8c7b16-b6c4-463e-9a59-6558a837100a"), "General office supplies including stationery, furniture, printers, and consumables for daily operations.", true, "Office Supplies & Stationery", "OFF" },
|
||||||
|
{ new Guid("e0e7d2cf-0438-4acd-aa1e-09304d5b1003"), "Electronic and communication products including data cabling, networking equipment, surveillance systems, and audio-visual devices.", true, "Electronics/ICT", "ICT" },
|
||||||
|
{ new Guid("fb081cf7-fef2-4d91-a052-4922d20d100b"), "Computers, servers, storage devices, network accessories, and related IT infrastructure.", true, "IT, Computing & Networking", "ITC" }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Suppliers_CompanyTypeId",
|
||||||
|
table: "Suppliers",
|
||||||
|
column: "CompanyTypeId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_NextPurchaseStatu~",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
column: "NextPurchaseStatusId",
|
||||||
|
principalTable: "PurchaseOrderStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_PreviousPurchaseS~",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
column: "PreviousPurchaseStatusId",
|
||||||
|
principalTable: "PurchaseOrderStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_PreviousRequisit~",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
column: "PreviousRequisitionStatusId",
|
||||||
|
principalTable: "RequisitionStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Suppliers_CompanyTypeMasters_CompanyTypeId",
|
||||||
|
table: "Suppliers",
|
||||||
|
column: "CompanyTypeId",
|
||||||
|
principalTable: "CompanyTypeMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_NextPurchaseStatu~",
|
||||||
|
table: "PurchaseStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_PreviousPurchaseS~",
|
||||||
|
table: "PurchaseStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_PreviousRequisit~",
|
||||||
|
table: "RequisitionStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Suppliers_CompanyTypeMasters_CompanyTypeId",
|
||||||
|
table: "Suppliers");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Suppliers_CompanyTypeId",
|
||||||
|
table: "Suppliers");
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("2e097d8b-63a2-4b96-8c55-61c2826f1001"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("57b4ccf4-9e34-422d-b2c9-0a16d9c91009"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("6089cc9c-70dd-4d3a-8b68-0c7c79371004"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("a4ad945b-9213-4f4f-b823-b8c277871005"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("ac930654-b973-4d5c-b13b-06e6815c1008"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("adbd1c50-e845-4b52-9406-2f1e1c881007"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("b5c4f7b3-bf24-4f19-9b5c-2deb12131002"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("bbdc04bb-d930-428c-aabc-72e198ea100c"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("cd59914f-4e6b-47eb-8d2a-eecb85bc100e"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("d77d7b2c-83a3-44e9-8dea-62ee85bb1006"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("d9677af1-6f91-44da-b12e-0f7ab00c100d"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("db8c7b16-b6c4-463e-9a59-6558a837100a"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("e0e7d2cf-0438-4acd-aa1e-09304d5b1003"));
|
||||||
|
|
||||||
|
migrationBuilder.DeleteData(
|
||||||
|
table: "ProductCategoryMasters",
|
||||||
|
keyColumn: "Id",
|
||||||
|
keyValue: new Guid("fb081cf7-fef2-4d91-a052-4922d20d100b"));
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CompanyTypeId",
|
||||||
|
table: "Suppliers");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "PreviousRequisitionStatusId",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)",
|
||||||
|
oldNullable: true)
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "PreviousPurchaseStatusId",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)",
|
||||||
|
oldNullable: true)
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "NextPurchaseStatusId",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)",
|
||||||
|
oldNullable: true)
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_NextPurchaseStatu~",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
column: "NextPurchaseStatusId",
|
||||||
|
principalTable: "PurchaseOrderStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PurchaseStatusMappings_PurchaseOrderStatus_PreviousPurchaseS~",
|
||||||
|
table: "PurchaseStatusMappings",
|
||||||
|
column: "PreviousPurchaseStatusId",
|
||||||
|
principalTable: "PurchaseOrderStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_PreviousRequisit~",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
column: "PreviousRequisitionStatusId",
|
||||||
|
principalTable: "RequisitionStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,64 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Made_Requisition_Status_Mapping_Nullable : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_NextRequisitionS~",
|
||||||
|
table: "RequisitionStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "NextRequisitionStatusId",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)")
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_NextRequisitionS~",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
column: "NextRequisitionStatusId",
|
||||||
|
principalTable: "RequisitionStatus",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_NextRequisitionS~",
|
||||||
|
table: "RequisitionStatusMappings");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "NextRequisitionStatusId",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
collation: "ascii_general_ci",
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "char(36)",
|
||||||
|
oldNullable: true)
|
||||||
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RequisitionStatusMappings_RequisitionStatus_NextRequisitionS~",
|
||||||
|
table: "RequisitionStatusMappings",
|
||||||
|
column: "NextRequisitionStatusId",
|
||||||
|
principalTable: "RequisitionStatus",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -1,950 +0,0 @@
|
|||||||
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_Finance_Related_Tables : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Expenses_ExpensesTypeMaster_ExpensesTypeId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_PaymentModeMatser_Tenants_TenantId",
|
|
||||||
table: "PaymentModeMatser");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_PaymentModeMatser_TenantId",
|
|
||||||
table: "PaymentModeMatser");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Expenses_ExpensesTypeId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("77013784-9324-4d8b-bd36-d6f928e68942"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"));
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "PaymentModeMatser");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ExpenseUId",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "BaseAmount",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "double",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "CurrencyId",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("78e96e4a-7ce0-4164-ae3a-c833ad45ec2c"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "ExpenseCategoryId",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "PaymentRequestId",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "TDSPercentage",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "double",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "TaxAmount",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "double",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "UIDPostfix",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "UIDPrefix",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "AdvancePaymentTransactions",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
FinanceUIdPrefix = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
FinanceUIdPostfix = table.Column<int>(type: "int", nullable: false),
|
|
||||||
Title = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Amount = table.Column<double>(type: "double", nullable: false),
|
|
||||||
CurrentBalance = table.Column<double>(type: "double", nullable: false),
|
|
||||||
PaidAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_AdvancePaymentTransactions", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AdvancePaymentTransactions_Employees_CreatedById",
|
|
||||||
column: x => x.CreatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AdvancePaymentTransactions_Employees_EmployeeId",
|
|
||||||
column: x => x.EmployeeId,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AdvancePaymentTransactions_Projects_ProjectId",
|
|
||||||
column: x => x.ProjectId,
|
|
||||||
principalTable: "Projects",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AdvancePaymentTransactions_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ExpenseCategoryMasters",
|
|
||||||
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"),
|
|
||||||
NoOfPersonsRequired = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
IsAttachmentRequried = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_ExpenseCategoryMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ExpenseCategoryMasters_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "RecurringPaymentStatus",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Name = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_RecurringPaymentStatus", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "StatusUpdateLogs",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = 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"),
|
|
||||||
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
EntityId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Comment = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.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_StatusUpdateLogs", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_StatusUpdateLogs_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_StatusUpdateLogs_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "RecurringPayments",
|
|
||||||
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"),
|
|
||||||
UIDPrefix = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
UIDPostfix = table.Column<int>(type: "int", nullable: false),
|
|
||||||
Payee = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
NotifyTo = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
CurrencyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Amount = table.Column<double>(type: "double", nullable: false),
|
|
||||||
StrikeDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
LatestPRGeneratedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
PaymentBufferDays = table.Column<int>(type: "int", nullable: false),
|
|
||||||
NumberOfIteration = table.Column<int>(type: "int", nullable: false),
|
|
||||||
ExpenseCategoryId = 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"),
|
|
||||||
Frequency = table.Column<int>(type: "int", nullable: false),
|
|
||||||
IsVariable = table.Column<bool>(type: "tinyint(1)", 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_RecurringPayments", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RecurringPayments_CurrencyMaster_CurrencyId",
|
|
||||||
column: x => x.CurrencyId,
|
|
||||||
principalTable: "CurrencyMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RecurringPayments_Employees_CreatedById",
|
|
||||||
column: x => x.CreatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RecurringPayments_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RecurringPayments_ExpenseCategoryMasters_ExpenseCategoryId",
|
|
||||||
column: x => x.ExpenseCategoryId,
|
|
||||||
principalTable: "ExpenseCategoryMasters",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RecurringPayments_Projects_ProjectId",
|
|
||||||
column: x => x.ProjectId,
|
|
||||||
principalTable: "Projects",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RecurringPayments_RecurringPaymentStatus_StatusId",
|
|
||||||
column: x => x.StatusId,
|
|
||||||
principalTable: "RecurringPaymentStatus",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RecurringPayments_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PaymentRequests",
|
|
||||||
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"),
|
|
||||||
UIDPrefix = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
UIDPostfix = table.Column<int>(type: "int", nullable: false),
|
|
||||||
Payee = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
IsAdvancePayment = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
CurrencyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Amount = table.Column<double>(type: "double", nullable: false),
|
|
||||||
BaseAmount = table.Column<double>(type: "double", nullable: true),
|
|
||||||
TaxAmount = table.Column<double>(type: "double", nullable: true),
|
|
||||||
TDSPercentage = table.Column<double>(type: "double", nullable: true),
|
|
||||||
DueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
RecurringPaymentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
ExpenseCategoryId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
ExpenseStatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
PaidTransactionId = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PaidAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
PaidById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
IsExpenseCreated = table.Column<bool>(type: "tinyint(1)", 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_PaymentRequests", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_CurrencyMaster_CurrencyId",
|
|
||||||
column: x => x.CurrencyId,
|
|
||||||
principalTable: "CurrencyMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_Employees_CreatedById",
|
|
||||||
column: x => x.CreatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_Employees_PaidById",
|
|
||||||
column: x => x.PaidById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_ExpenseCategoryMasters_ExpenseCategoryId",
|
|
||||||
column: x => x.ExpenseCategoryId,
|
|
||||||
principalTable: "ExpenseCategoryMasters",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_ExpensesStatusMaster_ExpenseStatusId",
|
|
||||||
column: x => x.ExpenseStatusId,
|
|
||||||
principalTable: "ExpensesStatusMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_Projects_ProjectId",
|
|
||||||
column: x => x.ProjectId,
|
|
||||||
principalTable: "Projects",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_RecurringPayments_RecurringPaymentId",
|
|
||||||
column: x => x.RecurringPaymentId,
|
|
||||||
principalTable: "RecurringPayments",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequests_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PaymentRequestAttachments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
PaymentRequestId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PaymentRequestAttachments", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequestAttachments_Documents_DocumentId",
|
|
||||||
column: x => x.DocumentId,
|
|
||||||
principalTable: "Documents",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequestAttachments_PaymentRequests_PaymentRequestId",
|
|
||||||
column: x => x.PaymentRequestId,
|
|
||||||
principalTable: "PaymentRequests",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PaymentRequestAttachments_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "ExpenseCategoryMasters",
|
|
||||||
columns: new[] { "Id", "Description", "IsActive", "IsAttachmentRequried", "Name", "NoOfPersonsRequired", "TenantId" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"), "Scheduled payments for external services or goods.", true, true, "Vendor/Supplier Payments", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"), "Vehicle fuel, logistics services and delivery of goods or personnel.", true, false, "Transport", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"), "Government fees, insurance, inspections and safety-related expenditures.", true, true, "Compliance & Safety", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"), "Site setup costs including equipment deployment and temporary infrastructure.", true, true, "Mobilization", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"), "Materials, equipment and supplies purchased for site operations.", true, true, "Procurement", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("77013784-9324-4d8b-bd36-d6f928e68942"), "Machinery servicing, electricity, water, and temporary office needs.", true, true, "Maintenance & Utilities", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"), "Delivery of personnel.", true, false, "Travelling", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"), " Worker amenities like snacks, meals, safety gear, accommodation, medical support etc.", true, true, "Employee Welfare", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesStatusMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6537018f-f4e9-4cb3-a210-6c3b2da999d7"),
|
|
||||||
column: "DisplayName",
|
|
||||||
value: "Submit for Review");
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "ExpensesStatusMaster",
|
|
||||||
columns: new[] { "Id", "Color", "Description", "DisplayName", "IsActive", "IsSystem", "Name" },
|
|
||||||
values: new object[] { new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3"), "#0E9F6E", "Create new Expense.", "Create Expense", true, true, "Done" });
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "Features",
|
|
||||||
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
|
||||||
values: new object[] { new Guid("86e80017-0698-4efe-93d0-806de67266e0"), "Recurring Template Management is the automated creation and scheduling of repetitive tasks, processes, or transactions using predefined templates at set intervals to ensure consistent and efficient workflow execution without manual recreation each time.", true, new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), "Recurring Template Management" });
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "Modules",
|
|
||||||
columns: new[] { "Id", "Description", "Key", "Name" },
|
|
||||||
values: new object[] { new Guid("0a79687a-86d7-430d-a2d7-8b8603cc76a1"), "Finance Module", "504ec132-e6a9-422f-8f85-050602cfce05", "Finance" });
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
columns: new[] { "Id", "Description", "IsActive", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("95697409-baf6-4f78-86ab-42d93d9569a8"), "A debit card is a payment card that deducts funds directly from the cardholder's bank account when a purchase is made.", true, "Debit Card" },
|
|
||||||
{ new Guid("a820f240-5e9a-4ae9-9091-8a7aa7720cea"), "A credit card is a payment card that allows you to borrow funds from a financial institution to pay for goods and services", true, "Credit card" },
|
|
||||||
{ new Guid("f67beee6-6763-4108-922c-03bd86b9178d"), "When a bill is paid using the amount received in advance from a company.", true, "Advance Payment" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "RecurringPaymentStatus",
|
|
||||||
columns: new[] { "Id", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("306856fb-5655-42eb-bf8b-808bb5e84725"), "Completed" },
|
|
||||||
{ new Guid("3ec864d2-8bf5-42fb-ba70-5090301dd816"), "De-Activated" },
|
|
||||||
{ new Guid("8bfc9346-e092-4a80-acbf-515ae1ef6868"), "Paused" },
|
|
||||||
{ new Guid("da462422-13b2-45cc-a175-910a225f6fc8"), "Active" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "ExpensesStatusMapping",
|
|
||||||
columns: new[] { "Id", "NextStatusId", "StatusId" },
|
|
||||||
values: new object[] { new Guid("a1cc95ed-b276-4a3e-9f00-0a249b522d64"), new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3"), new Guid("61578360-3a49-4c34-8604-7b35a3787b95") });
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("6382ea8b-aff2-4cd2-a48f-a652b35825d8"), "Manage Recurring Template payment permission allows authorized users to set up, modify, and execute automated recurring payments using predefined templates, ensuring secure and controlled handling of repetitive financial transactions.", new Guid("86e80017-0698-4efe-93d0-806de67266e0"), true, "Manage Recurring" },
|
|
||||||
{ new Guid("7ddf2fba-c44d-4fe3-b4ec-690ff70be2e3"), "The \"View All Recurring Template payment permission\" generally allows users to see and access all recurring payment templates in the system, enabling them to review, manage, and process recurring transactions efficiently.", new Guid("86e80017-0698-4efe-93d0-806de67266e0"), true, "View All Recurring" },
|
|
||||||
{ new Guid("e5d21efe-573d-4a16-a0f8-414d3e442e78"), "View Self Recurring Template payment permission allows a user to view and access their own recurring payment templates without editing rights.", new Guid("86e80017-0698-4efe-93d0-806de67266e0"), true, "View Self Recurring" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "StatusPermissionMapping",
|
|
||||||
columns: new[] { "Id", "PermissionId", "StatusId" },
|
|
||||||
values: new object[] { new Guid("de04b6c7-a5cd-4a61-88b0-b43b0008202e"), new Guid("ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"), new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3") });
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Expenses_CurrencyId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "CurrencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Expenses_ExpenseCategoryId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "ExpenseCategoryId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Expenses_PaymentRequestId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "PaymentRequestId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AdvancePaymentTransactions_CreatedById",
|
|
||||||
table: "AdvancePaymentTransactions",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AdvancePaymentTransactions_EmployeeId",
|
|
||||||
table: "AdvancePaymentTransactions",
|
|
||||||
column: "EmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AdvancePaymentTransactions_ProjectId",
|
|
||||||
table: "AdvancePaymentTransactions",
|
|
||||||
column: "ProjectId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AdvancePaymentTransactions_TenantId",
|
|
||||||
table: "AdvancePaymentTransactions",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ExpenseCategoryMasters_TenantId",
|
|
||||||
table: "ExpenseCategoryMasters",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequestAttachments_DocumentId",
|
|
||||||
table: "PaymentRequestAttachments",
|
|
||||||
column: "DocumentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequestAttachments_PaymentRequestId",
|
|
||||||
table: "PaymentRequestAttachments",
|
|
||||||
column: "PaymentRequestId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequestAttachments_TenantId",
|
|
||||||
table: "PaymentRequestAttachments",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_CreatedById",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_CurrencyId",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "CurrencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_ExpenseCategoryId",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "ExpenseCategoryId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_ExpenseStatusId",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "ExpenseStatusId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_PaidById",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "PaidById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_ProjectId",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "ProjectId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_RecurringPaymentId",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "RecurringPaymentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_TenantId",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentRequests_UpdatedById",
|
|
||||||
table: "PaymentRequests",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RecurringPayments_CreatedById",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RecurringPayments_CurrencyId",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
column: "CurrencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RecurringPayments_ExpenseCategoryId",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
column: "ExpenseCategoryId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RecurringPayments_ProjectId",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
column: "ProjectId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RecurringPayments_StatusId",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
column: "StatusId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RecurringPayments_TenantId",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RecurringPayments_UpdatedById",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_StatusUpdateLogs_TenantId",
|
|
||||||
table: "StatusUpdateLogs",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_StatusUpdateLogs_UpdatedById",
|
|
||||||
table: "StatusUpdateLogs",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Expenses_CurrencyMaster_CurrencyId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "CurrencyId",
|
|
||||||
principalTable: "CurrencyMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Expenses_ExpenseCategoryMasters_ExpenseCategoryId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "ExpenseCategoryId",
|
|
||||||
principalTable: "ExpenseCategoryMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Expenses_PaymentRequests_PaymentRequestId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "PaymentRequestId",
|
|
||||||
principalTable: "PaymentRequests",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Expenses_CurrencyMaster_CurrencyId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Expenses_ExpenseCategoryMasters_ExpenseCategoryId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Expenses_PaymentRequests_PaymentRequestId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "AdvancePaymentTransactions");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PaymentRequestAttachments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "StatusUpdateLogs");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PaymentRequests");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "RecurringPayments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ExpenseCategoryMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "RecurringPaymentStatus");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Expenses_CurrencyId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Expenses_ExpenseCategoryId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Expenses_PaymentRequestId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesStatusMapping",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1cc95ed-b276-4a3e-9f00-0a249b522d64"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6382ea8b-aff2-4cd2-a48f-a652b35825d8"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7ddf2fba-c44d-4fe3-b4ec-690ff70be2e3"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("e5d21efe-573d-4a16-a0f8-414d3e442e78"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "Modules",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("0a79687a-86d7-430d-a2d7-8b8603cc76a1"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("95697409-baf6-4f78-86ab-42d93d9569a8"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a820f240-5e9a-4ae9-9091-8a7aa7720cea"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f67beee6-6763-4108-922c-03bd86b9178d"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "StatusPermissionMapping",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("de04b6c7-a5cd-4a61-88b0-b43b0008202e"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "ExpensesStatusMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("b8586f67-dc19-49c3-b4af-224149efe1d3"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "Features",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("86e80017-0698-4efe-93d0-806de67266e0"));
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "BaseAmount",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CurrencyId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ExpenseCategoryId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PaymentRequestId",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TDSPercentage",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TaxAmount",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "UIDPostfix",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "UIDPrefix",
|
|
||||||
table: "Expenses");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Expenses",
|
|
||||||
keyColumn: "ExpenseUId",
|
|
||||||
keyValue: null,
|
|
||||||
column: "ExpenseUId",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ExpenseUId",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesStatusMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6537018f-f4e9-4cb3-a210-6c3b2da999d7"),
|
|
||||||
column: "DisplayName",
|
|
||||||
value: "Submit");
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
columns: new[] { "Id", "Description", "IsActive", "IsAttachmentRequried", "Name", "NoOfPersonsRequired", "TenantId" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"), "Scheduled payments for external services or goods.", true, true, "Vendor/Supplier Payments", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"), "Vehicle fuel, logistics services and delivery of goods or personnel.", true, false, "Transport", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"), "Government fees, insurance, inspections and safety-related expenditures.", true, true, "Compliance & Safety", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"), "Site setup costs including equipment deployment and temporary infrastructure.", true, true, "Mobilization", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"), "Materials, equipment and supplies purchased for site operations.", true, true, "Procurement", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("77013784-9324-4d8b-bd36-d6f928e68942"), "Machinery servicing, electricity, water, and temporary office needs.", true, true, "Maintenance & Utilities", false, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"), "Delivery of personnel.", true, false, "Travelling", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"), " Worker amenities like snacks, meals, safety gear, accommodation, medical support etc.", true, true, "Employee Welfare", true, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("24e6b0df-7929-47d2-88a3-4cf14c1f28f9"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2e919e94-694c-41d9-9489-0a2b4208a027"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("48d9b462-5d87-4dec-8dec-2bc943943172"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("ed667353-8eea-4fd1-8750-719405932480"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PaymentModeMatser_TenantId",
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Expenses_ExpensesTypeId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "ExpensesTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Expenses_ExpensesTypeMaster_ExpensesTypeId",
|
|
||||||
table: "Expenses",
|
|
||||||
column: "ExpensesTypeId",
|
|
||||||
principalTable: "ExpensesTypeMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_PaymentModeMatser_Tenants_TenantId",
|
|
||||||
table: "PaymentModeMatser",
|
|
||||||
column: "TenantId",
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,41 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Made_StatusId_Nullable_In_StatusUpdateLog_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "StatusId",
|
|
||||||
table: "StatusUpdateLogs",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "StatusId",
|
|
||||||
table: "StatusUpdateLogs",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,50 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_NextStrikeDate_And_EndDate_In_RecurringPayment_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "NumberOfIteration",
|
|
||||||
table: "RecurringPayments");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "EndDate",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(2025, 11, 10, 10, 17, 0, 0, DateTimeKind.Unspecified));
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "NextStrikeDate",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "EndDate",
|
|
||||||
table: "RecurringPayments");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "NextStrikeDate",
|
|
||||||
table: "RecurringPayments");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "NumberOfIteration",
|
|
||||||
table: "RecurringPayments",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,160 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,137 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,538 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,50 +0,0 @@
|
|||||||
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
@ -1,151 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,222 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
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" });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,29 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,76 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,158 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,40 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,71 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,122 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
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" });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,39 +0,0 @@
|
|||||||
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
@ -1,38 +0,0 @@
|
|||||||
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
@ -1,38 +0,0 @@
|
|||||||
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
@ -1,39 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
@ -1,106 +0,0 @@
|
|||||||
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
@ -4,11 +4,11 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
||||||
<PackageReference Include="Razorpay" Version="3.3.2" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -13,8 +13,7 @@ namespace Marco.Pms.Model.AppMenu
|
|||||||
public string? Icon { get; set; }
|
public string? Icon { get; set; }
|
||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
public string? Link { get; set; }
|
||||||
public string MobileLink { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -13,7 +13,6 @@ namespace Marco.Pms.Model.AppMenu
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
public string Link { get; set; } = string.Empty;
|
||||||
public string MobileLink { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using Marco.Pms.Model.Employees;
|
using Marco.Pms.Model.Employees;
|
||||||
using Marco.Pms.Model.OrganizationModel;
|
using Marco.Pms.Model.Projects;
|
||||||
using Marco.Pms.Model.Utilities;
|
using Marco.Pms.Model.Utilities;
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
@ -11,14 +11,13 @@ namespace Marco.Pms.Model.Collection
|
|||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string Title { get; set; } = default!;
|
public string Title { get; set; } = default!;
|
||||||
public string Description { 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 InvoiceNumber { get; set; } = default!;
|
||||||
public string? EInvoiceNumber { get; set; }
|
public string? EInvoiceNumber { get; set; }
|
||||||
public Guid ProjectId { get; set; }
|
public Guid ProjectId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("ProjectId")]
|
||||||
|
public Project? Project { get; set; }
|
||||||
public DateTime InvoiceDate { get; set; }
|
public DateTime InvoiceDate { get; set; }
|
||||||
public DateTime ClientSubmitedDate { get; set; }
|
public DateTime ClientSubmitedDate { get; set; }
|
||||||
public DateTime ExceptedPaymentDate { get; set; }
|
public DateTime ExceptedPaymentDate { get; set; }
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Marco.Pms.Model.Projects;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
namespace Marco.Pms.Model.Directory
|
||||||
{
|
{
|
||||||
@ -8,6 +9,9 @@ namespace Marco.Pms.Model.Directory
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid ProjectId { get; set; }
|
public Guid ProjectId { get; set; }
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("ProjectId")]
|
||||||
|
public Project? Project { get; set; }
|
||||||
public Guid ContactId { get; set; }
|
public Guid ContactId { get; set; }
|
||||||
[ValidateNever]
|
[ValidateNever]
|
||||||
[ForeignKey("ContactId")]
|
[ForeignKey("ContactId")]
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public required string Link { get; set; }
|
public required string Link { get; set; }
|
||||||
public string? MobileLink { get; set; }
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public required string Link { get; set; } = string.Empty;
|
public required string Link { get; set; } = string.Empty;
|
||||||
public string? MobileLink { get; set; }
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public required string Link { get; set; }
|
public required string Link { get; set; }
|
||||||
public string? MobileLink { get; set; }
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
public bool Available { get; set; } = true;
|
public bool Available { get; set; } = true;
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
public string Link { get; set; } = string.Empty;
|
||||||
public string? MobileLink { get; set; }
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
// Changed from string → List<string>
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
public List<string> PermissionIds { get; set; } = new List<string>();
|
||||||
|
|||||||
@ -10,7 +10,6 @@ namespace Marco.Pms.Model.Dtos.Collection
|
|||||||
public required string InvoiceNumber { get; set; }
|
public required string InvoiceNumber { get; set; }
|
||||||
public string? EInvoiceNumber { get; set; }
|
public string? EInvoiceNumber { get; set; }
|
||||||
public required Guid ProjectId { get; set; }
|
public required Guid ProjectId { get; set; }
|
||||||
public required Guid BilledToId { get; set; }
|
|
||||||
public required DateTime InvoiceDate { get; set; }
|
public required DateTime InvoiceDate { get; set; }
|
||||||
public required DateTime ClientSubmitedDate { get; set; }
|
public required DateTime ClientSubmitedDate { get; set; }
|
||||||
public required DateTime ExceptedPaymentDate { get; set; }
|
public required DateTime ExceptedPaymentDate { get; set; }
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Employees
|
|
||||||
{
|
|
||||||
public class BasicEmployeeDto
|
|
||||||
{
|
|
||||||
public Guid EmployeeId { get; set; }
|
|
||||||
public bool IsActive { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -5,7 +5,7 @@ namespace Marco.Pms.Model.Dtos.Expenses
|
|||||||
public class CreateExpensesDto
|
public class CreateExpensesDto
|
||||||
{
|
{
|
||||||
public required Guid ProjectId { get; set; }
|
public required Guid ProjectId { get; set; }
|
||||||
public required Guid ExpenseCategoryId { get; set; }
|
public required Guid ExpensesTypeId { get; set; }
|
||||||
public required Guid PaymentModeId { get; set; }
|
public required Guid PaymentModeId { get; set; }
|
||||||
public required Guid PaidById { get; set; }
|
public required Guid PaidById { get; set; }
|
||||||
public DateTime TransactionDate { get; set; } = DateTime.Now;
|
public DateTime TransactionDate { get; set; } = DateTime.Now;
|
||||||
@ -15,7 +15,6 @@ namespace Marco.Pms.Model.Dtos.Expenses
|
|||||||
public string? GSTNumber { get; set; }
|
public string? GSTNumber { get; set; }
|
||||||
public required string SupplerName { get; set; }
|
public required string SupplerName { get; set; }
|
||||||
public required double Amount { get; set; }
|
public required double Amount { get; set; }
|
||||||
public Guid? CurrencyId { get; set; }
|
|
||||||
public int? NoOfPersons { get; set; } = 0;
|
public int? NoOfPersons { get; set; } = 0;
|
||||||
public bool PreApproved { get; set; } = false;
|
public bool PreApproved { get; set; } = false;
|
||||||
public required List<FileUploadModel> BillAttachments { get; set; }
|
public required List<FileUploadModel> BillAttachments { get; set; }
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
using Marco.Pms.Model.TenantModels;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Dtos.Expenses
|
|
||||||
{
|
|
||||||
public class CreateRecurringTemplateDto
|
|
||||||
{
|
|
||||||
public required string Title { get; set; }
|
|
||||||
public required string Description { get; set; }
|
|
||||||
public required string Payee { get; set; }
|
|
||||||
public required string NotifyTo { get; set; }
|
|
||||||
public required Guid CurrencyId { get; set; }
|
|
||||||
public required double Amount { get; set; }
|
|
||||||
public required DateTime StrikeDate { get; set; }
|
|
||||||
public Guid? ProjectId { get; set; }
|
|
||||||
public required int PaymentBufferDays { get; set; }
|
|
||||||
public required DateTime EndDate { get; set; }
|
|
||||||
public required Guid ExpenseCategoryId { get; set; }
|
|
||||||
public required Guid StatusId { get; set; }
|
|
||||||
public required PLAN_FREQUENCY Frequency { get; set; }
|
|
||||||
public required bool IsVariable { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Dtos.Expenses
|
|
||||||
{
|
|
||||||
public class ExpenseConversionDto
|
|
||||||
{
|
|
||||||
public required Guid PaymentRequestId { get; set; }
|
|
||||||
public required Guid PaymentModeId { get; set; }
|
|
||||||
public string? Location { get; set; }
|
|
||||||
public string? GSTNumber { get; set; }
|
|
||||||
public List<FileUploadModel>? BillAttachments { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -5,9 +5,6 @@
|
|||||||
public Guid ExpenseId { get; set; }
|
public Guid ExpenseId { get; set; }
|
||||||
public Guid StatusId { get; set; }
|
public Guid StatusId { get; set; }
|
||||||
public string? Comment { get; set; }
|
public string? Comment { get; set; }
|
||||||
public double? TDSPercentage { get; set; }
|
|
||||||
public double? BaseAmount { get; set; }
|
|
||||||
public double? TaxAmount { get; set; }
|
|
||||||
public string? ReimburseTransactionId { get; set; }
|
public string? ReimburseTransactionId { get; set; }
|
||||||
public DateTime? ReimburseDate { get; set; }
|
public DateTime? ReimburseDate { get; set; }
|
||||||
public Guid? ReimburseById { get; set; }
|
public Guid? ReimburseById { get; set; }
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Expenses.Masters
|
|
||||||
{
|
|
||||||
public class ExpenseCategoryMasterDto
|
|
||||||
{
|
|
||||||
public Guid? Id { get; set; }
|
|
||||||
public required string Name { get; set; }
|
|
||||||
public required bool NoOfPersonsRequired { get; set; }
|
|
||||||
public required bool IsAttachmentRequried { get; set; }
|
|
||||||
public string? Description { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.Expenses
|
|
||||||
{
|
|
||||||
public class PaymentRequestConversionDto
|
|
||||||
{
|
|
||||||
public required List<Guid> RecurringTemplateIds { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Dtos.Expenses
|
|
||||||
{
|
|
||||||
public class PaymentRequestDto
|
|
||||||
{
|
|
||||||
public Guid? Id { get; set; }
|
|
||||||
public required string Title { get; set; }
|
|
||||||
public required string Description { get; set; }
|
|
||||||
public required string Payee { get; set; }
|
|
||||||
public required Guid CurrencyId { get; set; }
|
|
||||||
public required double Amount { get; set; }
|
|
||||||
public required DateTime DueDate { get; set; }
|
|
||||||
public Guid? ProjectId { get; set; }
|
|
||||||
public required Guid ExpenseCategoryId { get; set; }
|
|
||||||
public bool IsAdvancePayment { get; set; }
|
|
||||||
public List<FileUploadModel>? BillAttachments { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Dtos.Expenses
|
|
||||||
{
|
|
||||||
public class PaymentRequestRecordDto
|
|
||||||
{
|
|
||||||
public Guid PaymentRequestId { get; set; }
|
|
||||||
public Guid StatusId { get; set; }
|
|
||||||
public string? Comment { get; set; }
|
|
||||||
public string? PaidTransactionId { get; set; }
|
|
||||||
public double? TDSPercentage { get; set; }
|
|
||||||
public double? BaseAmount { get; set; }
|
|
||||||
public double? TaxAmount { get; set; }
|
|
||||||
public DateTime? PaidAt { get; set; }
|
|
||||||
public Guid? PaidById { get; set; }
|
|
||||||
public Guid? PaymentModeId { get; set; }
|
|
||||||
public string? Location { get; set; }
|
|
||||||
public string? GSTNumber { get; set; }
|
|
||||||
public List<FileUploadModel>? BillAttachments { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -6,7 +6,7 @@ namespace Marco.Pms.Model.Dtos.Expenses
|
|||||||
{
|
{
|
||||||
public required Guid Id { get; set; }
|
public required Guid Id { get; set; }
|
||||||
public required Guid ProjectId { get; set; }
|
public required Guid ProjectId { get; set; }
|
||||||
public required Guid ExpenseCategoryId { get; set; }
|
public required Guid ExpensesTypeId { get; set; }
|
||||||
public required Guid PaymentModeId { get; set; }
|
public required Guid PaymentModeId { get; set; }
|
||||||
public required Guid PaidById { get; set; }
|
public required Guid PaidById { get; set; }
|
||||||
public DateTime TransactionDate { get; set; } = DateTime.Now;
|
public DateTime TransactionDate { get; set; } = DateTime.Now;
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
using Marco.Pms.Model.TenantModels;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Dtos.Expenses
|
|
||||||
{
|
|
||||||
public class UpdateRecurringTemplateDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public required string Title { get; set; }
|
|
||||||
public required string Description { get; set; }
|
|
||||||
public required string Payee { get; set; }
|
|
||||||
public required string NotifyTo { get; set; }
|
|
||||||
public required Guid CurrencyId { get; set; }
|
|
||||||
public required double Amount { get; set; }
|
|
||||||
public Guid? ProjectId { get; set; }
|
|
||||||
public required int PaymentBufferDays { get; set; }
|
|
||||||
public required DateTime EndDate { get; set; }
|
|
||||||
public required Guid ExpenseCategoryId { get; set; }
|
|
||||||
public required Guid StatusId { get; set; }
|
|
||||||
public required PLAN_FREQUENCY Frequency { get; set; }
|
|
||||||
public required bool IsVariable { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
14
Marco.Pms.Model/Dtos/Inventory/ItemDto.cs
Normal file
14
Marco.Pms.Model/Dtos/Inventory/ItemDto.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class ItemDto
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Name { get; set; } = default!;
|
||||||
|
public string Description { get; set; } = default!;
|
||||||
|
public Guid ItemGroupId { get; set; }
|
||||||
|
public Guid TechnicalUnitId { get; set; }
|
||||||
|
public int Threshold { get; set; }
|
||||||
|
public List<SupplierManufacturerDto>? Suppliers { get; set; }
|
||||||
|
public List<ItemTaxTypeDto>? TaxRates { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
8
Marco.Pms.Model/Dtos/Inventory/ItemTaxTypeDto.cs
Normal file
8
Marco.Pms.Model/Dtos/Inventory/ItemTaxTypeDto.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class ItemTaxTypeDto
|
||||||
|
{
|
||||||
|
public Guid ServicesTaxTypeId { get; set; }
|
||||||
|
public int Rate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Marco.Pms.Model/Dtos/Inventory/ProductCategoryDto.cs
Normal file
9
Marco.Pms.Model/Dtos/Inventory/ProductCategoryDto.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class ProductCategoryDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Marco.Pms.Model/Dtos/Inventory/PurchaseOrderStatusDto.cs
Normal file
9
Marco.Pms.Model/Dtos/Inventory/PurchaseOrderStatusDto.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class PurchaseOrderStatusDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class PurchaseStatusMappingDto
|
||||||
|
{
|
||||||
|
public Guid PurchaseStatusId { get; set; }
|
||||||
|
public Guid NextPurchaseStatusId { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Marco.Pms.Model/Dtos/Inventory/RequisitionStatusDto.cs
Normal file
9
Marco.Pms.Model/Dtos/Inventory/RequisitionStatusDto.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class RequisitionStatusDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class RequisitionStatusMappingDto
|
||||||
|
{
|
||||||
|
public Guid RequisitionStatusId { get; set; }
|
||||||
|
public Guid NextRequisitionStatusId { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
12
Marco.Pms.Model/Dtos/Inventory/SupplierManufacturerDto.cs
Normal file
12
Marco.Pms.Model/Dtos/Inventory/SupplierManufacturerDto.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
namespace Marco.Pms.Model.Dtos.Inventory
|
||||||
|
{
|
||||||
|
public class SupplierManufacturerDto
|
||||||
|
{
|
||||||
|
public Guid ManufacturerId { get; set; }
|
||||||
|
public Guid SupplierId { get; set; }
|
||||||
|
public double BasePrice { get; set; }
|
||||||
|
public int PurchaseLeadTime { get; set; }
|
||||||
|
public Guid CurrencyId { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,9 +0,0 @@
|
|||||||
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,7 +7,6 @@
|
|||||||
public required string ContactPerson { get; set; }
|
public required string ContactPerson { get; set; }
|
||||||
public required string Address { get; set; }
|
public required string Address { get; set; }
|
||||||
public required string ContactNumber { get; set; }
|
public required string ContactNumber { get; set; }
|
||||||
public string? GSTNumber { get; set; }
|
|
||||||
public string? logoImage { get; set; }
|
public string? logoImage { get; set; }
|
||||||
public List<Guid>? ServiceIds { get; set; }
|
public List<Guid>? ServiceIds { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
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,7 +7,6 @@
|
|||||||
public required string ContactPerson { get; set; }
|
public required string ContactPerson { get; set; }
|
||||||
public required string Address { get; set; }
|
public required string Address { get; set; }
|
||||||
public required string ContactNumber { get; set; }
|
public required string ContactNumber { get; set; }
|
||||||
public string? GSTNumber { get; set; }
|
|
||||||
public List<Guid>? ServiceIds { get; set; }
|
public List<Guid>? ServiceIds { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.PaymentGetway
|
|
||||||
{
|
|
||||||
public class CreateOrderDto
|
|
||||||
{
|
|
||||||
public double Amount { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.PaymentGetway
|
|
||||||
{
|
|
||||||
public class PaymentVerificationRequest
|
|
||||||
{
|
|
||||||
public required Guid TenantEnquireId { get; set; }
|
|
||||||
public required Guid PlanId { get; set; }
|
|
||||||
public required string OrderId { get; set; }
|
|
||||||
public required string PaymentId { get; set; }
|
|
||||||
public required string Signature { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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