deleted OldTask
This commit is contained in:
@@ -72,9 +72,6 @@ using Company.Domain.RollCallPlanAgg;
|
||||
using Company.Domain.RollCallServiceAgg;
|
||||
using Company.Domain.SmsResultAgg;
|
||||
using Company.Domain.SubtitleAgg;
|
||||
using Company.Domain.Task;
|
||||
using Company.Domain.TaskStatus;
|
||||
using Company.Domain.TaskTitle;
|
||||
using Company.Domain.TaxJobCategoryAgg;
|
||||
using Company.Domain.TaxLeftWorkCategoryAgg;
|
||||
using Company.Domain.TaxLeftWorkItemAgg;
|
||||
@@ -128,9 +125,9 @@ public class CompanyContext : DbContext
|
||||
public DbSet<FileState> FileStates { get; set; }
|
||||
public DbSet<FileAlert> FileAlerts { get; set; }
|
||||
//-------Task Manager----------------------------
|
||||
public DbSet<Task> Tasks { get; set; }
|
||||
public DbSet<TaskStatus> TaskStatuses { get; set; }
|
||||
public DbSet<TaskTitle> TaskTitles { get; set; }
|
||||
//public DbSet<Task> Tasks { get; set; }
|
||||
//public DbSet<TaskStatus> TaskStatuses { get; set; }
|
||||
//public DbSet<TaskTitle> TaskTitles { get; set; }
|
||||
//-------Main-Project----------------------------
|
||||
public DbSet<TaxLeftWorkItem> TaxLeftWorkItems { get; set; }
|
||||
public DbSet<TaxLeftWorkCategory> TaxLeftWorkCategories { get; set; }
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.ClassifiedSalaryAgg;
|
||||
using Company.Domain.ClassifiedSalaryAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.ContractingPartyAccountAgg;
|
||||
using Company.Domain.ContractingPartyAccountAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.GroupPlanJobItemAgg;
|
||||
using Company.Domain.GroupPlanJobItemAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.GroupPlanAgg;
|
||||
using Company.Domain.GroupPlanAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.InstitutionPlanAgg;
|
||||
using Company.Domain.InstitutionPlanAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.InsuranceYearlySalaryAgg;
|
||||
using Company.Domain.InsuranceYearlySalaryAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.PaymentToEmployeeItemAgg;
|
||||
using Company.Domain.PaymentToEmployeeItemAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.PaymentToEmployeeAgg;
|
||||
using Company.Domain.PaymentToEmployeeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.RollCallEmployeeAgg;
|
||||
using Company.Domain.RollCallEmployeeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.RollCallAgg;
|
||||
using Company.Domain.RollCallAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.RollCallPlanAgg;
|
||||
using Company.Domain.RollCallPlanAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.RollCallServiceAgg;
|
||||
using Company.Domain.RollCallServiceAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using Company.Domain.Task;
|
||||
using Company.Domain.TaskStatus;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class TaskMapping : IEntityTypeConfiguration<Task>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Task> builder)
|
||||
{
|
||||
builder.ToTable("Tasks");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
//TODO
|
||||
//add validations
|
||||
|
||||
//builder.HasOne(x => x.TaskTitle).WithMany(x => x.TasksList).HasForeignKey(x => x.TaskTitle_Id);
|
||||
builder.HasOne(x => x.TaskStatus).WithOne(x => x.Task).HasForeignKey<TaskStatus>(x => x.Task_Id);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Company.Domain.TaskStatus;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class TaskStatusMapping : IEntityTypeConfiguration<TaskStatus>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TaskStatus> builder)
|
||||
{
|
||||
builder.ToTable("TaskStatuses");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
//TODO
|
||||
//add validations
|
||||
|
||||
builder.HasOne(x => x.Task).WithOne(x => x.TaskStatus).HasForeignKey<TaskStatus>(x => x.Task_Id);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Company.Domain.TaskTitle;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class TaskTitleMapping : IEntityTypeConfiguration<TaskTitle>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<TaskTitle> builder)
|
||||
{
|
||||
builder.ToTable("TaskTitles");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
//TODO
|
||||
//add validations
|
||||
|
||||
//builder.HasMany(x => x.TasksList).WithOne(x => x.TaskTitle).HasForeignKey(x => x.TaskTitle_Id);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.WorkshopPlanEmployeeAgg;
|
||||
using Company.Domain.WorkshopPlanEmployeeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Company.Domain.WorkshopPlanAgg;
|
||||
using Company.Domain.WorkshopPlanAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
5572
CompanyManagment.EFCore/Migrations/20240709155634_OlTaskRemoved.Designer.cs
generated
Normal file
5572
CompanyManagment.EFCore/Migrations/20240709155634_OlTaskRemoved.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OlTaskRemoved : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "TaskStatuses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Tasks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TaskTitles");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TaskTitles",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Title = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TaskTitles", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Tasks",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Commander_Id = table.Column<long>(type: "bigint", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Customer = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Customer_Id = table.Column<long>(type: "bigint", nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SeniorUser_Id = table.Column<long>(type: "bigint", nullable: false),
|
||||
TaskDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
TaskTitle = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TaskTitleid = table.Column<long>(type: "bigint", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Tasks", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Tasks_TaskTitles_TaskTitleid",
|
||||
column: x => x.TaskTitleid,
|
||||
principalTable: "TaskTitles",
|
||||
principalColumn: "id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TaskStatuses",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Task_Id = table.Column<long>(type: "bigint", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DeadlineExtentionDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DeadlineExtentionRegDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DeadlineExtentionRegUserId = table.Column<long>(type: "bigint", nullable: false),
|
||||
DeadlineExtentionStatus = table.Column<short>(type: "smallint", nullable: false),
|
||||
DoneRegDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DoneRegUserId = table.Column<long>(type: "bigint", nullable: false),
|
||||
DoneStatus = table.Column<short>(type: "smallint", nullable: false),
|
||||
ImpossibilityDescription = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ImpossibilityRegDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ImpossibilityRegUserId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ImpossibilityStatus = table.Column<short>(type: "smallint", nullable: false),
|
||||
ReferralRegDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ReferralRegUserId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ReferralStatus = table.Column<short>(type: "smallint", nullable: false),
|
||||
ReferralUserId = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TaskStatuses", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_TaskStatuses_Tasks_Task_Id",
|
||||
column: x => x.Task_Id,
|
||||
principalTable: "Tasks",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Tasks_TaskTitleid",
|
||||
table: "Tasks",
|
||||
column: "TaskTitleid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TaskStatuses_Task_Id",
|
||||
table: "TaskStatuses",
|
||||
column: "Task_Id",
|
||||
unique: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3070,6 +3070,14 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("TypeDestinationBankNumber")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("TypeSourceBankNumber")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -3529,134 +3537,6 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.ToTable("TextManager_Subtitle", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.Task.Task", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("Commander_Id")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Customer")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long>("Customer_Id")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long>("SeniorUser_Id")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime?>("TaskDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("TaskTitle")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long?>("TaskTitleid")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("TaskTitleid");
|
||||
|
||||
b.ToTable("Tasks", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.TaskStatus.TaskStatus", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DeadlineExtentionDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DeadlineExtentionRegDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("DeadlineExtentionRegUserId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<short>("DeadlineExtentionStatus")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<DateTime?>("DoneRegDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("DoneRegUserId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<short>("DoneStatus")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<string>("ImpossibilityDescription")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("ImpossibilityRegDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("ImpossibilityRegUserId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<short>("ImpossibilityStatus")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<DateTime?>("ReferralRegDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("ReferralRegUserId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<short>("ReferralStatus")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<long>("ReferralUserId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("Task_Id")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("Task_Id")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("TaskStatuses", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.TaskTitle.TaskTitle", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("TaskTitles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.TaxJobCategoryAgg.TaxJobCategory", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
@@ -5276,24 +5156,6 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("EntityOriginalTitle");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.Task.Task", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.TaskTitle.TaskTitle", null)
|
||||
.WithMany("TasksList")
|
||||
.HasForeignKey("TaskTitleid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.TaskStatus.TaskStatus", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.Task.Task", "Task")
|
||||
.WithOne("TaskStatus")
|
||||
.HasForeignKey("Company.Domain.TaskStatus.TaskStatus", "Task_Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Task");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop")
|
||||
@@ -5632,16 +5494,6 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("Subtitles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.Task.Task", b =>
|
||||
{
|
||||
b.Navigation("TaskStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.TaskTitle.TaskTitle", b =>
|
||||
{
|
||||
b.Navigation("TasksList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.TaxLeftWorkCategoryAgg.TaxLeftWorkCategory", b =>
|
||||
{
|
||||
b.Navigation("TaxLeftWorkItemList");
|
||||
|
||||
@@ -2,20 +2,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ContractingPartyAccountAgg;
|
||||
using Company.Domain.empolyerAgg;
|
||||
using Company.Domain.InstitutionContractAgg;
|
||||
using Company.Domain.WorkshopAccountAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.FinancialStatment;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.LeftWorkInsurance;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PersianTools.Core;
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.PaymentToEmployeeItemAgg;
|
||||
using CompanyManagment.App.Contracts.PaymentToEmployee;
|
||||
using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.CheckoutAgg;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.PaymentToEmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.PaymentToEmployee;
|
||||
using CompanyManagment.EFCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
using _0_Framework.Application;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Company.Domain.ReportClientAgg;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.ReportClient;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
public class ReportClientRepository : IReportClientRepository
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.RollCallEmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using MD.PersianDateTime.Standard;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
@@ -4,7 +4,6 @@ using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.RollCallPlanAgg;
|
||||
using CompanyManagment.App.Contracts.RollCallPlan;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.Task;
|
||||
using CompanyManagment.App.Contracts.Task;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class TaskRepository : RepositoryBase<long, Task>, ITaskRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
|
||||
public TaskRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public void Remove(long id)
|
||||
{
|
||||
var task = Get(id);
|
||||
|
||||
Remove(task);
|
||||
|
||||
SaveChanges();
|
||||
}
|
||||
|
||||
public List<TaskViewModel> Search(TaskSearchModel searchModel)
|
||||
{
|
||||
var query = _context.Tasks.Select(x => new TaskViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
Commander_Id = x.Commander_Id,
|
||||
SeniorUser_Id = x.SeniorUser_Id,
|
||||
Customer_Id = x.Customer_Id,
|
||||
CustomerName = x.Customer,
|
||||
TaskTitle = x.TaskTitle,
|
||||
Description = x.Description,
|
||||
TaskDate = x.TaskDate.ToFarsi(),
|
||||
TaskGDate = x.TaskDate
|
||||
});
|
||||
|
||||
if (searchModel.Id != 0)
|
||||
{
|
||||
query = query.Where(x => x.Id == searchModel.Id);
|
||||
}
|
||||
|
||||
if (searchModel.RoleId != 0 && searchModel.RoleId != 1)
|
||||
{
|
||||
query = query.Where(x => x.SeniorUser_Id == searchModel.AccountId || x.Commander_Id == searchModel.AccountId);
|
||||
}
|
||||
|
||||
return query.OrderBy(x => x.TaskGDate).ToList();
|
||||
}
|
||||
|
||||
public void UpdateTask(Task editTask)
|
||||
{
|
||||
//var task = Get(editTask.id);
|
||||
|
||||
//task.Edit(editTask.Commander_Id, editTask.SeniorUser_Id, editTask.TaskTitle_Id, editTask.Customer, editTask.Customer_Id, editTask.TaskDate.ToGeorgianDateTime(), editTask.Description);
|
||||
|
||||
//SaveChanges();
|
||||
}
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.TaskStatus;
|
||||
using CompanyManagment.App.Contracts.TaskStatus;
|
||||
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class TaskStatusRepository : RepositoryBase<long, TaskStatus>, ITaskStatusRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public TaskStatusRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public EditTaskStatus GetDetails(long id)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public EditTaskStatus GetDetails(long fileId, int boardTypeId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Remove(long id)
|
||||
{
|
||||
}
|
||||
|
||||
public List<EditTaskStatus> Search(TaskStatusSearchModel searchModel)
|
||||
{
|
||||
var query = _context.TaskStatuses.Select(x => new EditTaskStatus
|
||||
{
|
||||
Id = x.id,
|
||||
ReferralStatus = x.ReferralStatus,
|
||||
ReferralUserId = x.ReferralUserId,
|
||||
ReferralRegDate = x.ReferralRegDate,
|
||||
ReferralRegUserId = x.ReferralRegUserId,
|
||||
DeadlineExtentionStatus = x.DeadlineExtentionStatus,
|
||||
DeadlineExtentionDate = x.DeadlineExtentionDate,
|
||||
DeadlineExtentionRegDate = x.DeadlineExtentionDate,
|
||||
DeadlineExtentionRegUserId = x.DeadlineExtentionRegUserId,
|
||||
ImpossibilityStatus = x.ImpossibilityStatus,
|
||||
ImpossibilityDescription = x.ImpossibilityDescription,
|
||||
ImpossibilityRegDate = x.ImpossibilityRegDate,
|
||||
ImpossibilityRegUserId = x.ImpossibilityRegUserId,
|
||||
DoneStatus = x.DoneStatus,
|
||||
DoneRegDate = x.DoneRegDate,
|
||||
DoneRegUserId = x.DoneRegUserId,
|
||||
Task_Id = x.Task_Id
|
||||
});
|
||||
|
||||
if (searchModel.TaskId != 0)
|
||||
{
|
||||
query = query.Where(x => x.Task_Id == searchModel.TaskId);
|
||||
}
|
||||
|
||||
if (searchModel.ReferralUserId != 0)
|
||||
{
|
||||
query = query.Where(x => x.ReferralUserId == searchModel.ReferralUserId);
|
||||
}
|
||||
|
||||
return query.ToList();
|
||||
|
||||
}
|
||||
|
||||
public void CreateOrUpdateTaskStatus(EditTaskStatus editTaskStatus)
|
||||
{
|
||||
if (editTaskStatus.Id == 0)
|
||||
{
|
||||
var taskStatus = new TaskStatus
|
||||
(
|
||||
editTaskStatus.ReferralStatus,
|
||||
editTaskStatus.ReferralUserId,
|
||||
editTaskStatus.ReferralRegDate,
|
||||
editTaskStatus.ReferralRegUserId,
|
||||
editTaskStatus.DeadlineExtentionStatus,
|
||||
editTaskStatus.DeadlineExtentionDate,
|
||||
editTaskStatus.DeadlineExtentionRegDate,
|
||||
editTaskStatus.DeadlineExtentionRegUserId,
|
||||
editTaskStatus.ImpossibilityStatus,
|
||||
editTaskStatus.ImpossibilityDescription,
|
||||
editTaskStatus.ImpossibilityRegDate,
|
||||
editTaskStatus.ImpossibilityRegUserId,
|
||||
editTaskStatus.DoneStatus,
|
||||
editTaskStatus.DoneRegDate,
|
||||
editTaskStatus.DoneRegUserId,
|
||||
editTaskStatus.Task_Id
|
||||
);
|
||||
|
||||
Create(taskStatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
var savedTaskStatus = Get(editTaskStatus.Id);
|
||||
|
||||
savedTaskStatus.Edit
|
||||
(
|
||||
editTaskStatus.ReferralStatus,
|
||||
editTaskStatus.ReferralUserId,
|
||||
editTaskStatus.ReferralRegDate,
|
||||
editTaskStatus.ReferralRegUserId,
|
||||
editTaskStatus.DeadlineExtentionStatus,
|
||||
editTaskStatus.DeadlineExtentionDate,
|
||||
editTaskStatus.DeadlineExtentionRegDate,
|
||||
editTaskStatus.DeadlineExtentionRegUserId,
|
||||
editTaskStatus.ImpossibilityStatus,
|
||||
editTaskStatus.ImpossibilityDescription,
|
||||
editTaskStatus.ImpossibilityRegDate,
|
||||
editTaskStatus.ImpossibilityRegUserId,
|
||||
editTaskStatus.DoneStatus,
|
||||
editTaskStatus.DoneRegDate,
|
||||
editTaskStatus.DoneRegUserId,
|
||||
editTaskStatus.Task_Id
|
||||
);
|
||||
}
|
||||
SaveChanges();
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.TaskTitle;
|
||||
using CompanyManagment.App.Contracts.TaskTitle;
|
||||
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class TaskTitleRepository : RepositoryBase<long, TaskTitle>, ITaskTitleRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public TaskTitleRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public EditTaskTitle GetDetails(long id)
|
||||
{
|
||||
return _context.TaskTitles.Select(x => new EditTaskTitle
|
||||
{
|
||||
Id = x.id,
|
||||
Title = x.Title
|
||||
}).FirstOrDefault(x => x.Id == id);
|
||||
}
|
||||
|
||||
public void Remove(long id)
|
||||
{
|
||||
var taskTitle = Get(id);
|
||||
|
||||
Remove(taskTitle);
|
||||
|
||||
SaveChanges();
|
||||
}
|
||||
|
||||
public List<TaskTitleViewModel> Search(TaskTitleSearchModel searchModel)
|
||||
{
|
||||
var query = _context.TaskTitles.Select(x => new TaskTitleViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
Title = x.Title
|
||||
});
|
||||
|
||||
//TODO if
|
||||
if (!string.IsNullOrEmpty(searchModel.Title))
|
||||
{
|
||||
query = query.Where(x => x.Title.Contains(searchModel.Title));
|
||||
}
|
||||
|
||||
return query.OrderByDescending(x => x.Id).ToList();
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,6 @@ using _0_Framework.InfraStructure;
|
||||
using Company.Domain.TaxJobCategoryAgg;
|
||||
using CompanyManagment.App.Contracts.TaxJobCategory;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class TaxJobCategoryRepository : RepositoryBase<long, TaxJobCategory>, ITaxJobCategoryRepository
|
||||
|
||||
@@ -7,7 +7,6 @@ using Company.Domain.TaxLeftWorkCategoryAgg;
|
||||
using CompanyManagment.App.Contracts.TaxLeftWorkCategory;
|
||||
using CompanyManagment.App.Contracts.TaxLeftWorkItem;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.TaxLeftWorkItemAgg;
|
||||
using CompanyManagment.App.Contracts.TaxLeftWorkItem;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.WorkingHoursItemsAgg;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
using CompanyManagment.App.Contracts.WorkingHoursItems;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
Reference in New Issue
Block a user