feat(bll, dal): distributionPeriod - добавили типы, адаптировали методы

This commit is contained in:
Mikhail Kuznetsov
2024-07-01 16:56:59 +10:00
parent e896191ac9
commit 453164a4a0
13 changed files with 6237 additions and 21 deletions

View File

@@ -309,29 +309,69 @@ namespace PARR.DAL.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<TimeSpan>("Duration")
.HasColumnType("interval");
b.Property<string>("Duration")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Type");
b.ToTable("DistributionPeriods");
b.HasData(
new
{
Id = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
Duration = new TimeSpan(28, 0, 0, 0, 0),
Name = "Ежемесячно"
Duration = "1",
Name = "Ежемесячно",
Type = "Month"
},
new
{
Id = new Guid("0ad2dfdb-3833-46d9-979a-c408b7eadc6c"),
Duration = new TimeSpan(90, 0, 0, 0, 0),
Name = "Каждые 90 дней"
Duration = "90",
Name = "Каждые 90 дней",
Type = "Day"
});
});
modelBuilder.Entity("PARR.DAL.Models.DistributionPeriodType", b =>
{
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.HasKey("Type");
b.ToTable("DistributionPeriodTypes");
b.HasData(
new
{
Type = "Day",
Description = "День"
},
new
{
Type = "Month",
Description = "Месяц"
},
new
{
Type = "Year",
Description = "Год"
});
});
@@ -2450,6 +2490,17 @@ namespace PARR.DAL.Migrations
b.Navigation("Work");
});
modelBuilder.Entity("PARR.DAL.Models.DistributionPeriod", b =>
{
b.HasOne("PARR.DAL.Models.DistributionPeriodType", "DistributionPeriodType")
.WithMany("Periods")
.HasForeignKey("Type")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("DistributionPeriodType");
});
modelBuilder.Entity("PARR.DAL.Models.EsppSchTypeConfig", b =>
{
b.HasOne("PARR.DAL.Models.EsppSchType", "EsppSchType")
@@ -2736,6 +2787,11 @@ namespace PARR.DAL.Migrations
b.Navigation("EsppSchTypeValues");
});
modelBuilder.Entity("PARR.DAL.Models.DistributionPeriodType", b =>
{
b.Navigation("Periods");
});
modelBuilder.Entity("PARR.DAL.Models.EkStatus", b =>
{
b.Navigation("Hosts");