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

@@ -362,10 +362,21 @@ namespace PARR.DAL.Context
modelBuilder.Entity<DistributionPeriod>(f =>
{
f.HasData(
new() { Id = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67"), Name = "Ежемесячно", Duration = new TimeSpan(28, 0, 0, 0) },
new() { Id = new Guid("0AD2DFDB-3833-46D9-979A-C408B7EADC6C"), Name = "Каждые 90 дней", Duration = new TimeSpan(90, 0, 0, 0) }
new() { Id = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67"), Name = "Ежемесячно", Duration = "1", Type = DistributionPeriodTypeEnum.Month.ToString() },
new() { Id = new Guid("0AD2DFDB-3833-46D9-979A-C408B7EADC6C"), Name = "Каждые 90 дней", Duration = "90", Type = DistributionPeriodTypeEnum.Day.ToString() }
);
});
modelBuilder.Entity<DistributionPeriodType>(f =>
{
f.HasData(
new() { Type = DistributionPeriodTypeEnum.Day.ToString(), Description = "День" },
new() { Type = DistributionPeriodTypeEnum.Month.ToString(), Description = "Месяц" },
new() { Type = DistributionPeriodTypeEnum.Year.ToString(), Description = "Год" }
//new() { Type = DistributionPeriodTypeEnum.TimeSpan.ToString(), Description = "TimeSpan" }
);
});
#endregion
}