feat(dal): создана таблица GroupDistributionConfigs

This commit is contained in:
Mikhail Trubnikov
2026-01-20 16:17:09 +10:00
parent 5faa43e2d6
commit eb5bed5614
10 changed files with 5097 additions and 94 deletions

View File

@@ -112,6 +112,8 @@ namespace PARR.DAL.Context
public DbSet<JobAutoControl> JobAutoControls { get; set; } public DbSet<JobAutoControl> JobAutoControls { get; set; }
public DbSet<JobGroupDistributionConfig> JobGroupDistributionConfigs { get; set; }
#endregion #endregion
@@ -314,7 +316,7 @@ namespace PARR.DAL.Context
new { Id = new Guid("4E3F73D1-A0F3-4DD1-BCA9-68ADA0DD5CE2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 2 недели", EsppExportValue = "14 00:00:00", Order = 9 }, new { Id = new Guid("4E3F73D1-A0F3-4DD1-BCA9-68ADA0DD5CE2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 2 недели", EsppExportValue = "14 00:00:00", Order = 9 },
new { Id = new Guid("55833417-6A24-42F6-BCC2-5D032F883202"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 60 дней", EsppExportValue = "60 00:00:00", Order = 10 }, new { Id = new Guid("55833417-6A24-42F6-BCC2-5D032F883202"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 60 дней", EsppExportValue = "60 00:00:00", Order = 10 },
new { Id = new Guid("7FEFA052-29DB-4CE5-9C57-2FD9FF855F21"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 80 дней", EsppExportValue = "80 00:00:00", Order = 11 }, new { Id = new Guid("7FEFA052-29DB-4CE5-9C57-2FD9FF855F21"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 80 дней", EsppExportValue = "80 00:00:00", Order = 11 },
new { Id = new Guid("B0CA99F9-5EE0-45B3-BB80-948F82B1FCB1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 90 дней", EsppExportValue = "90 00:00:00", Order = 12, DistributionPeriodId = new Guid("0AD2DFDB-3833-46D9-979A-C408B7EADC6C") }, new { Id = new Guid("B0CA99F9-5EE0-45B3-BB80-948F82B1FCB1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 90 дней", EsppExportValue = "90 00:00:00", Order = 12 },
new { Id = new Guid("086F7A37-9848-423A-A3CC-36DBB5AD43E3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые полгода", EsppExportValue = "182 00:00:00", Order = 13 }, new { Id = new Guid("086F7A37-9848-423A-A3CC-36DBB5AD43E3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые полгода", EsppExportValue = "182 00:00:00", Order = 13 },
new { Id = new Guid("F2DA9E02-D619-4517-A598-374880A8C8E8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 1,5 года", EsppExportValue = "540 00:00:00", Order = 14 }, new { Id = new Guid("F2DA9E02-D619-4517-A598-374880A8C8E8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 1,5 года", EsppExportValue = "540 00:00:00", Order = 14 },
new { Id = new Guid("F38D7D30-8923-4EA0-AA7C-5B251E19AB61"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 3 года", EsppExportValue = "1095 00:00:00", Order = 15 }, new { Id = new Guid("F38D7D30-8923-4EA0-AA7C-5B251E19AB61"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 3 года", EsppExportValue = "1095 00:00:00", Order = 15 },
@@ -325,37 +327,37 @@ namespace PARR.DAL.Context
new { Id = new Guid("2ED85534-4684-4EB2-9CCB-E264D212C945"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Пятница", EsppExportValue = "5", Order = 4 }, new { Id = new Guid("2ED85534-4684-4EB2-9CCB-E264D212C945"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Пятница", EsppExportValue = "5", Order = 4 },
new { Id = new Guid("A6804315-96EF-484E-82EE-C5795694468B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Суббота", EsppExportValue = "6", Order = 5 }, new { Id = new Guid("A6804315-96EF-484E-82EE-C5795694468B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Суббота", EsppExportValue = "6", Order = 5 },
new { Id = new Guid("EB71E699-937F-4894-9688-F7A7F95E5E58"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Воскресенье", EsppExportValue = "7", Order = 6 }, new { Id = new Guid("EB71E699-937F-4894-9688-F7A7F95E5E58"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Воскресенье", EsppExportValue = "7", Order = 6 },
new { Id = new Guid("E86ADBFB-3345-4E0C-AA3B-B4418F9CFE88"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "1", EsppExportValue = "1", Order = 0, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("E86ADBFB-3345-4E0C-AA3B-B4418F9CFE88"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "1", EsppExportValue = "1", Order = 0 },
new { Id = new Guid("5B4D7CA6-31E7-475B-B7C8-13C6680C3DC3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "2", EsppExportValue = "2", Order = 1, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("5B4D7CA6-31E7-475B-B7C8-13C6680C3DC3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "2", EsppExportValue = "2", Order = 1 },
new { Id = new Guid("0DA03DB0-9404-425D-BEA1-5DA0C9B60B59"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "3", EsppExportValue = "3", Order = 2, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("0DA03DB0-9404-425D-BEA1-5DA0C9B60B59"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "3", EsppExportValue = "3", Order = 2 },
new { Id = new Guid("199474C8-0A77-47E5-AAB8-BA33C216CC9E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "4", EsppExportValue = "4", Order = 3, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("199474C8-0A77-47E5-AAB8-BA33C216CC9E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "4", EsppExportValue = "4", Order = 3 },
new { Id = new Guid("E6619DA1-F7E8-45B9-BBD3-9C17BEC2CCD3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "5", EsppExportValue = "5", Order = 4, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("E6619DA1-F7E8-45B9-BBD3-9C17BEC2CCD3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "5", EsppExportValue = "5", Order = 4 },
new { Id = new Guid("A8708763-C838-49A5-95FE-BF4F73518D71"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "6", EsppExportValue = "6", Order = 5, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("A8708763-C838-49A5-95FE-BF4F73518D71"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "6", EsppExportValue = "6", Order = 5 },
new { Id = new Guid("7EC056AA-820C-4900-96CB-4564D2EA6398"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "7", EsppExportValue = "7", Order = 6, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("7EC056AA-820C-4900-96CB-4564D2EA6398"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "7", EsppExportValue = "7", Order = 6 },
new { Id = new Guid("554D7D0C-91B1-4B81-B94D-1EE864192962"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "8", EsppExportValue = "8", Order = 7, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("554D7D0C-91B1-4B81-B94D-1EE864192962"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "8", EsppExportValue = "8", Order = 7 },
new { Id = new Guid("8B7847A4-23DE-4199-8AAD-3B5C0323B5A2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "9", EsppExportValue = "9", Order = 8, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("8B7847A4-23DE-4199-8AAD-3B5C0323B5A2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "9", EsppExportValue = "9", Order = 8 },
new { Id = new Guid("FB7F41CA-950B-4DC1-A0A6-BD9A221AB2AD"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "10", EsppExportValue = "10", Order = 9, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("FB7F41CA-950B-4DC1-A0A6-BD9A221AB2AD"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "10", EsppExportValue = "10", Order = 9 },
new { Id = new Guid("A28B530F-EA38-4A2C-A16B-0B7FA3770D3C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "11", EsppExportValue = "11", Order = 10, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("A28B530F-EA38-4A2C-A16B-0B7FA3770D3C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "11", EsppExportValue = "11", Order = 10 },
new { Id = new Guid("7A004A11-32E1-40AE-AB35-0D3DC3A69785"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "12", EsppExportValue = "12", Order = 11, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("7A004A11-32E1-40AE-AB35-0D3DC3A69785"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "12", EsppExportValue = "12", Order = 11 },
new { Id = new Guid("E0F2F4D1-4A5E-4997-8336-83C3C35F38DF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "13", EsppExportValue = "13", Order = 12, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("E0F2F4D1-4A5E-4997-8336-83C3C35F38DF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "13", EsppExportValue = "13", Order = 12 },
new { Id = new Guid("9C5AAF48-88EC-4C67-B936-2BE45550F8BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "14", EsppExportValue = "14", Order = 13, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("9C5AAF48-88EC-4C67-B936-2BE45550F8BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "14", EsppExportValue = "14", Order = 13 },
new { Id = new Guid("8DBD680C-CE49-4D2E-8A1A-05619685E240"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "15", EsppExportValue = "15", Order = 14, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("8DBD680C-CE49-4D2E-8A1A-05619685E240"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "15", EsppExportValue = "15", Order = 14 },
new { Id = new Guid("2F476F70-B1EF-419D-AAD5-3911F1E3231F"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "16", EsppExportValue = "16", Order = 15, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("2F476F70-B1EF-419D-AAD5-3911F1E3231F"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "16", EsppExportValue = "16", Order = 15 },
new { Id = new Guid("2C635CE2-FC18-47BE-B3E9-98C211ABF312"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "17", EsppExportValue = "17", Order = 16, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("2C635CE2-FC18-47BE-B3E9-98C211ABF312"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "17", EsppExportValue = "17", Order = 16 },
new { Id = new Guid("F9D5B03B-624A-4F9F-8DA3-1490EA5D2914"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "18", EsppExportValue = "18", Order = 17, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("F9D5B03B-624A-4F9F-8DA3-1490EA5D2914"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "18", EsppExportValue = "18", Order = 17 },
new { Id = new Guid("4F4B249C-DB60-4582-86ED-75CFEE4EDD0C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "19", EsppExportValue = "19", Order = 18, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("4F4B249C-DB60-4582-86ED-75CFEE4EDD0C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "19", EsppExportValue = "19", Order = 18 },
new { Id = new Guid("220A1464-4D39-416C-B4B2-3093EB007298"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "20", EsppExportValue = "20", Order = 19, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("220A1464-4D39-416C-B4B2-3093EB007298"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "20", EsppExportValue = "20", Order = 19 },
new { Id = new Guid("C887CA60-B05D-4D3C-AD1F-223C879B1A6D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "21", EsppExportValue = "21", Order = 20, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("C887CA60-B05D-4D3C-AD1F-223C879B1A6D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "21", EsppExportValue = "21", Order = 20 },
new { Id = new Guid("2905765D-63FB-41FE-A111-EE2F1D03D62E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "22", EsppExportValue = "22", Order = 21, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("2905765D-63FB-41FE-A111-EE2F1D03D62E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "22", EsppExportValue = "22", Order = 21 },
new { Id = new Guid("DBBE704A-8D6D-40E7-BD30-6974035B1FAB"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "23", EsppExportValue = "23", Order = 22, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("DBBE704A-8D6D-40E7-BD30-6974035B1FAB"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "23", EsppExportValue = "23", Order = 22 },
new { Id = new Guid("CF7B9645-52ED-43A2-8267-267E0AED19B1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "24", EsppExportValue = "24", Order = 23, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("CF7B9645-52ED-43A2-8267-267E0AED19B1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "24", EsppExportValue = "24", Order = 23 },
new { Id = new Guid("454788D6-D0AD-4C07-878C-DA3FD3CD05E1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "25", EsppExportValue = "25", Order = 24, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("454788D6-D0AD-4C07-878C-DA3FD3CD05E1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "25", EsppExportValue = "25", Order = 24 },
new { Id = new Guid("40D70D73-8582-4BE6-A9E6-503B96AE3D49"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "26", EsppExportValue = "26", Order = 25, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("40D70D73-8582-4BE6-A9E6-503B96AE3D49"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "26", EsppExportValue = "26", Order = 25 },
new { Id = new Guid("8F6610DC-EF46-4842-A57E-18D7AAA75931"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "27", EsppExportValue = "27", Order = 26, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("8F6610DC-EF46-4842-A57E-18D7AAA75931"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "27", EsppExportValue = "27", Order = 26 },
new { Id = new Guid("03858472-D4CE-47FD-9497-8051728766E4"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "28", EsppExportValue = "28", Order = 27, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("03858472-D4CE-47FD-9497-8051728766E4"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "28", EsppExportValue = "28", Order = 27 },
new { Id = new Guid("B1018E07-E90E-42EE-B399-19F3D0C14DD6"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "29", EsppExportValue = "29", Order = 28, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("B1018E07-E90E-42EE-B399-19F3D0C14DD6"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "29", EsppExportValue = "29", Order = 28 },
new { Id = new Guid("A1669207-AA31-40FE-98D0-D941008D1655"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "30", EsppExportValue = "30", Order = 29, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("A1669207-AA31-40FE-98D0-D941008D1655"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "30", EsppExportValue = "30", Order = 29 },
new { Id = new Guid("0936AA99-73E0-43DE-B6DF-334C1228A226"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "31", EsppExportValue = "31", Order = 30, DistributionPeriodId = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67") }, new { Id = new Guid("0936AA99-73E0-43DE-B6DF-334C1228A226"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "31", EsppExportValue = "31", Order = 30 },
new { Id = new Guid("626CA076-F09E-4A7A-8610-B7DE6337B24A"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Первый", EsppExportValue = "1", Order = 0 }, new { Id = new Guid("626CA076-F09E-4A7A-8610-B7DE6337B24A"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Первый", EsppExportValue = "1", Order = 0 },
new { Id = new Guid("032FBD02-67D0-4B8C-BED0-42629AB7113B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Второй", EsppExportValue = "2", Order = 1 }, new { Id = new Guid("032FBD02-67D0-4B8C-BED0-42629AB7113B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Второй", EsppExportValue = "2", Order = 1 },
new { Id = new Guid("FA8A8F60-E41E-495E-AC86-35174D9976BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Третий", EsppExportValue = "3", Order = 2 }, new { Id = new Guid("FA8A8F60-E41E-495E-AC86-35174D9976BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Третий", EsppExportValue = "3", Order = 2 },
@@ -461,8 +463,10 @@ namespace PARR.DAL.Context
modelBuilder.Entity<DistributionPeriod>(f => modelBuilder.Entity<DistributionPeriod>(f =>
{ {
f.HasData( f.HasData(
new() { Id = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67"), Name = "Ежемесячно", Duration = "1", Type = DistributionPeriodTypeEnum.Month.ToString() }, new() { Id = new Guid("9BD0BFA8-C316-480B-A001-E09FFE8C9340"), Name = "Еженедельно", Duration = "7", Type = DistributionPeriodTypeEnum.Day.ToString() },
new() { Id = new Guid("0AD2DFDB-3833-46D9-979A-C408B7EADC6C"), Name = "Каждые 90 дней", Duration = "90", Type = DistributionPeriodTypeEnum.Day.ToString() } new() { Id = new Guid("3A7341A8-085C-461C-BABC-6B78DD5D2C67"), Name = "Ежемесячно", Duration = "30", Type = DistributionPeriodTypeEnum.Day.ToString() },
new() { Id = new Guid("0AD2DFDB-3833-46D9-979A-C408B7EADC6C"), Name = "Каждые 90 дней", Duration = "90", Type = DistributionPeriodTypeEnum.Day.ToString() },
new() { Id = new Guid("31DD3947-8471-4F09-852C-A4F075F1BA7F"), Name = "Каждые пол года", Duration = "182", Type = DistributionPeriodTypeEnum.Day.ToString() }
); );
}); });

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,828 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class JobGroupDistributionConfig : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EsppSchTypeValues_DistributionPeriods_DistributionPeriodId",
schema: "schedule",
table: "EsppSchTypeValues");
migrationBuilder.DropIndex(
name: "IX_EsppSchTypeValues_DistributionPeriodId",
schema: "schedule",
table: "EsppSchTypeValues");
migrationBuilder.DropColumn(
name: "DistributionPeriodId",
schema: "schedule",
table: "EsppSchTypeValues");
migrationBuilder.RenameTable(
name: "WeekendDays",
newName: "WeekendDays",
newSchema: "schedule");
migrationBuilder.RenameTable(
name: "DistributionPeriodTypes",
newName: "DistributionPeriodTypes",
newSchema: "schedule");
migrationBuilder.RenameTable(
name: "DistributionPeriods",
newName: "DistributionPeriods",
newSchema: "schedule");
migrationBuilder.CreateTable(
name: "GroupDistributionConfigs",
schema: "job",
columns: table => new
{
GroupId = table.Column<Guid>(type: "uuid", nullable: false),
DistributionPeriodId = table.Column<Guid>(type: "uuid", nullable: false),
IsExcludeWeekends = table.Column<bool>(type: "boolean", nullable: false),
IsGroupingByWorkGroup = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GroupDistributionConfigs", x => x.GroupId);
table.ForeignKey(
name: "FK_GroupDistributionConfigs_DistributionPeriods_DistributionPe~",
column: x => x.DistributionPeriodId,
principalSchema: "schedule",
principalTable: "DistributionPeriods",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_GroupDistributionConfigs_Groups_GroupId",
column: x => x.GroupId,
principalSchema: "job",
principalTable: "Groups",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "Настройки автораспределения для группы работ");
migrationBuilder.UpdateData(
schema: "schedule",
table: "DistributionPeriods",
keyColumn: "Id",
keyValue: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
columns: new[] { "Duration", "Type" },
values: new object[] { "30", "Day" });
migrationBuilder.InsertData(
schema: "schedule",
table: "DistributionPeriods",
columns: new[] { "Id", "Duration", "Name", "Type" },
values: new object[,]
{
{ new Guid("31dd3947-8471-4f09-852c-a4f075f1ba7f"), "182", "Каждые пол года", "Day" },
{ new Guid("9bd0bfa8-c316-480b-a001-e09ffe8c9340"), "7", "Еженедельно", "Day" }
});
migrationBuilder.CreateIndex(
name: "IX_GroupDistributionConfigs_DistributionPeriodId",
schema: "job",
table: "GroupDistributionConfigs",
column: "DistributionPeriodId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "GroupDistributionConfigs",
schema: "job");
migrationBuilder.DeleteData(
schema: "schedule",
table: "DistributionPeriods",
keyColumn: "Id",
keyValue: new Guid("31dd3947-8471-4f09-852c-a4f075f1ba7f"));
migrationBuilder.DeleteData(
schema: "schedule",
table: "DistributionPeriods",
keyColumn: "Id",
keyValue: new Guid("9bd0bfa8-c316-480b-a001-e09ffe8c9340"));
migrationBuilder.RenameTable(
name: "WeekendDays",
schema: "schedule",
newName: "WeekendDays");
migrationBuilder.RenameTable(
name: "DistributionPeriodTypes",
schema: "schedule",
newName: "DistributionPeriodTypes");
migrationBuilder.RenameTable(
name: "DistributionPeriods",
schema: "schedule",
newName: "DistributionPeriods");
migrationBuilder.AddColumn<Guid>(
name: "DistributionPeriodId",
schema: "schedule",
table: "EsppSchTypeValues",
type: "uuid",
nullable: true);
migrationBuilder.UpdateData(
table: "DistributionPeriods",
keyColumn: "Id",
keyValue: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
columns: new[] { "Duration", "Type" },
values: new object[] { "1", "Month" });
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("032fbd02-67d0-4b8c-bed0-42629ab7113b"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("035f485d-8451-47df-bfaa-ba4dd36cf146"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("03858472-d4ce-47fd-9497-8051728766e4"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("06a8bd2f-68e1-42f5-961c-ac3b98a2181e"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("06ab835d-3d3e-4057-8422-a553b6b40995"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("086f7a37-9848-423a-a3cc-36dbb5ad43e3"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("0883aac2-9d5b-4098-b672-c684d2a3a0c9"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("0936aa99-73e0-43de-b6df-334c1228a226"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("0b1f3cea-301a-4d74-9ce1-2cd93b41897d"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("0da03db0-9404-425d-bea1-5da0c9b60b59"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("12bb8db2-cf7f-4113-baff-6883770f1ba5"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("18260e91-3fbe-4401-9edc-78dbc419370e"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("199474c8-0a77-47e5-aab8-ba33c216cc9e"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("220a1464-4d39-416c-b4b2-3093eb007298"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("2905765d-63fb-41fe-a111-ee2f1d03d62e"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("2c635ce2-fc18-47be-b3e9-98c211abf312"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("2ed85534-4684-4eb2-9ccb-e264d212c945"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("2f473624-4eb3-49b4-a4b9-cc7fc08a50f5"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("2f476f70-b1ef-419d-aad5-3911f1e3231f"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("361526aa-3e1c-452e-bb44-0ade8521830d"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("40d70d73-8582-4be6-a9e6-503b96ae3d49"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("454788d6-d0ad-4c07-878c-da3fd3cd05e1"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("4df04834-f14f-43d9-8984-334f080f4107"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("4e3f73d1-a0f3-4dd1-bca9-68ada0dd5ce2"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("4f4b249c-db60-4582-86ed-75cfee4edd0c"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("554d7d0c-91b1-4b81-b94d-1ee864192962"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("55833417-6a24-42f6-bcc2-5d032f883202"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("5b4d7ca6-31e7-475b-b7c8-13c6680c3dc3"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("5e6592bc-acb2-45a4-979b-fdecf8457453"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("626ca076-f09e-4a7a-8610-b7de6337b24a"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("6e3b5dd2-b2f7-40bc-bace-15bfa6bbd4ff"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("6e9972c4-6bf7-4fe4-b4ea-bbb333fb69c8"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("7a004a11-32e1-40ae-ab35-0d3dc3a69785"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("7ec056aa-820c-4900-96cb-4564d2ea6398"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("7fefa052-29db-4ce5-9c57-2fd9ff855f21"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("83f56b5d-b16b-4aa5-89d7-a253fee4e4ad"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("852a5ebd-4545-494b-bc69-c27409a41adc"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("8b7847a4-23de-4199-8aad-3b5c0323b5a2"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("8dbd680c-ce49-4d2e-8a1a-05619685e240"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("8df097aa-9860-4a62-9675-a8eecd3f2ce7"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("8f6610dc-ef46-4842-a57e-18d7aaa75931"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("963b9c41-d607-444a-9fe0-fe429590e326"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("9c5aaf48-88ec-4c67-b936-2be45550f8bf"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("a1669207-aa31-40fe-98d0-d941008d1655"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("a28b530f-ea38-4a2c-a16b-0b7fa3770d3c"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("a6804315-96ef-484e-82ee-c5795694468b"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("a74b9ebd-bcd8-4537-b371-194de2fe0a4d"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("a8708763-c838-49a5-95fe-bf4f73518d71"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("ae0a0015-0f1e-4496-b71e-6244f7e321e7"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("b0ca99f9-5ee0-45b3-bb80-948f82b1fcb1"),
column: "DistributionPeriodId",
value: new Guid("0ad2dfdb-3833-46d9-979a-c408b7eadc6c"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("b1018e07-e90e-42ee-b399-19f3d0c14dd6"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("b7303461-9a30-43fa-8e55-305aa13f186f"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("c1de4aca-9f49-48ae-9279-cf9ec4092112"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("c34d5375-70e7-4632-b3af-30e279a0621a"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("c887ca60-b05d-4d3c-ad1f-223c879b1a6d"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("cf7b9645-52ed-43a2-8267-267e0aed19b1"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("d2f90168-2b49-42f2-820b-79db2c522adf"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("d439808a-6a10-409b-8809-a755b7cca60b"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("d627daa7-3eed-4571-acae-ffbb3c5bedb9"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("dab6e3f9-2385-4966-b77c-133ad233c592"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("dbbe704a-8d6d-40e7-bd30-6974035b1fab"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("dd695fb2-4ad0-4cda-a4df-e15059c56b24"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("dee32e60-c1a1-4206-98bc-aa03deabfdf6"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e0465fbf-e3a5-4486-9f53-5bb85c6feeca"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e0f2f4d1-4a5e-4997-8336-83c3c35f38df"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e15c7c63-e29f-41a3-9c82-f70eb6c24fde"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e2fa3769-f66f-4753-a161-35adad7717a5"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e6619da1-f7e8-45b9-bbd3-9c17bec2ccd3"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e679ec84-a9ee-4bed-a051-2b14edddcb18"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e86adbfb-3345-4e0c-aa3b-b4418f9cfe88"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("e951135e-71f2-4262-9342-df4d5315ab6c"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("eb71e699-937f-4894-9688-f7a7f95e5e58"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("ec8554c8-dee4-49a1-b1b7-474ad8ec1473"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("ec9540df-c2de-4bda-a063-34d02d4b6e03"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("edd7cb49-d6a0-4969-b2d6-1967da69b336"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("f0003490-a249-44bd-814f-4566999915d8"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("f2da9e02-d619-4517-a598-374880a8c8e8"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("f38d7d30-8923-4ea0-aa7c-5b251e19ab61"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("f4c3fe38-aeaa-42f7-a9ba-190ea2dfe339"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("f9d5b03b-624a-4f9f-8da3-1490ea5d2914"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("fa8a8f60-e41e-495e-ac86-35174d9976bf"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("fad4bdb0-6c51-4810-a30b-6d031a0d4c46"),
column: "DistributionPeriodId",
value: null);
migrationBuilder.UpdateData(
schema: "schedule",
table: "EsppSchTypeValues",
keyColumn: "Id",
keyValue: new Guid("fb7f41ca-950b-4dc1-a0a6-bd9a221ab2ad"),
column: "DistributionPeriodId",
value: new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"));
migrationBuilder.CreateIndex(
name: "IX_EsppSchTypeValues_DistributionPeriodId",
schema: "schedule",
table: "EsppSchTypeValues",
column: "DistributionPeriodId");
migrationBuilder.AddForeignKey(
name: "FK_EsppSchTypeValues_DistributionPeriods_DistributionPeriodId",
schema: "schedule",
table: "EsppSchTypeValues",
column: "DistributionPeriodId",
principalTable: "DistributionPeriods",
principalColumn: "Id");
}
}
}

View File

@@ -319,15 +319,22 @@ namespace PARR.DAL.Migrations
b.HasIndex("Type"); b.HasIndex("Type");
b.ToTable("DistributionPeriods"); b.ToTable("DistributionPeriods", "schedule");
b.HasData( b.HasData(
new
{
Id = new Guid("9bd0bfa8-c316-480b-a001-e09ffe8c9340"),
Duration = "7",
Name = "Еженедельно",
Type = "Day"
},
new new
{ {
Id = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"), Id = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
Duration = "1", Duration = "30",
Name = "Ежемесячно", Name = "Ежемесячно",
Type = "Month" Type = "Day"
}, },
new new
{ {
@@ -335,6 +342,13 @@ namespace PARR.DAL.Migrations
Duration = "90", Duration = "90",
Name = "Каждые 90 дней", Name = "Каждые 90 дней",
Type = "Day" Type = "Day"
},
new
{
Id = new Guid("31dd3947-8471-4f09-852c-a4f075f1ba7f"),
Duration = "182",
Name = "Каждые пол года",
Type = "Day"
}); });
}); });
@@ -349,7 +363,7 @@ namespace PARR.DAL.Migrations
b.HasKey("Type"); b.HasKey("Type");
b.ToTable("DistributionPeriodTypes"); b.ToTable("DistributionPeriodTypes", "schedule");
b.HasData( b.HasData(
new new
@@ -668,9 +682,6 @@ namespace PARR.DAL.Migrations
b.Property<DateTimeOffset>("DateCreated") b.Property<DateTimeOffset>("DateCreated")
.HasColumnType("timestamp with time zone"); .HasColumnType("timestamp with time zone");
b.Property<Guid?>("DistributionPeriodId")
.HasColumnType("uuid");
b.Property<string>("EsppExportValue") b.Property<string>("EsppExportValue")
.IsRequired() .IsRequired()
.HasColumnType("text"); .HasColumnType("text");
@@ -687,8 +698,6 @@ namespace PARR.DAL.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("DistributionPeriodId");
b.HasIndex("TypeId"); b.HasIndex("TypeId");
b.ToTable("EsppSchTypeValues", "schedule"); b.ToTable("EsppSchTypeValues", "schedule");
@@ -806,7 +815,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("b0ca99f9-5ee0-45b3-bb80-948f82b1fcb1"), Id = new Guid("b0ca99f9-5ee0-45b3-bb80-948f82b1fcb1"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("0ad2dfdb-3833-46d9-979a-c408b7eadc6c"),
EsppExportValue = "90 00:00:00", EsppExportValue = "90 00:00:00",
Order = 12, Order = 12,
TypeId = 1, TypeId = 1,
@@ -906,7 +914,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("e86adbfb-3345-4e0c-aa3b-b4418f9cfe88"), Id = new Guid("e86adbfb-3345-4e0c-aa3b-b4418f9cfe88"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "1", EsppExportValue = "1",
Order = 0, Order = 0,
TypeId = 3, TypeId = 3,
@@ -916,7 +923,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("5b4d7ca6-31e7-475b-b7c8-13c6680c3dc3"), Id = new Guid("5b4d7ca6-31e7-475b-b7c8-13c6680c3dc3"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "2", EsppExportValue = "2",
Order = 1, Order = 1,
TypeId = 3, TypeId = 3,
@@ -926,7 +932,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("0da03db0-9404-425d-bea1-5da0c9b60b59"), Id = new Guid("0da03db0-9404-425d-bea1-5da0c9b60b59"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "3", EsppExportValue = "3",
Order = 2, Order = 2,
TypeId = 3, TypeId = 3,
@@ -936,7 +941,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("199474c8-0a77-47e5-aab8-ba33c216cc9e"), Id = new Guid("199474c8-0a77-47e5-aab8-ba33c216cc9e"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "4", EsppExportValue = "4",
Order = 3, Order = 3,
TypeId = 3, TypeId = 3,
@@ -946,7 +950,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("e6619da1-f7e8-45b9-bbd3-9c17bec2ccd3"), Id = new Guid("e6619da1-f7e8-45b9-bbd3-9c17bec2ccd3"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "5", EsppExportValue = "5",
Order = 4, Order = 4,
TypeId = 3, TypeId = 3,
@@ -956,7 +959,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("a8708763-c838-49a5-95fe-bf4f73518d71"), Id = new Guid("a8708763-c838-49a5-95fe-bf4f73518d71"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "6", EsppExportValue = "6",
Order = 5, Order = 5,
TypeId = 3, TypeId = 3,
@@ -966,7 +968,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("7ec056aa-820c-4900-96cb-4564d2ea6398"), Id = new Guid("7ec056aa-820c-4900-96cb-4564d2ea6398"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "7", EsppExportValue = "7",
Order = 6, Order = 6,
TypeId = 3, TypeId = 3,
@@ -976,7 +977,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("554d7d0c-91b1-4b81-b94d-1ee864192962"), Id = new Guid("554d7d0c-91b1-4b81-b94d-1ee864192962"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "8", EsppExportValue = "8",
Order = 7, Order = 7,
TypeId = 3, TypeId = 3,
@@ -986,7 +986,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("8b7847a4-23de-4199-8aad-3b5c0323b5a2"), Id = new Guid("8b7847a4-23de-4199-8aad-3b5c0323b5a2"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "9", EsppExportValue = "9",
Order = 8, Order = 8,
TypeId = 3, TypeId = 3,
@@ -996,7 +995,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("fb7f41ca-950b-4dc1-a0a6-bd9a221ab2ad"), Id = new Guid("fb7f41ca-950b-4dc1-a0a6-bd9a221ab2ad"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "10", EsppExportValue = "10",
Order = 9, Order = 9,
TypeId = 3, TypeId = 3,
@@ -1006,7 +1004,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("a28b530f-ea38-4a2c-a16b-0b7fa3770d3c"), Id = new Guid("a28b530f-ea38-4a2c-a16b-0b7fa3770d3c"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "11", EsppExportValue = "11",
Order = 10, Order = 10,
TypeId = 3, TypeId = 3,
@@ -1016,7 +1013,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("7a004a11-32e1-40ae-ab35-0d3dc3a69785"), Id = new Guid("7a004a11-32e1-40ae-ab35-0d3dc3a69785"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "12", EsppExportValue = "12",
Order = 11, Order = 11,
TypeId = 3, TypeId = 3,
@@ -1026,7 +1022,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("e0f2f4d1-4a5e-4997-8336-83c3c35f38df"), Id = new Guid("e0f2f4d1-4a5e-4997-8336-83c3c35f38df"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "13", EsppExportValue = "13",
Order = 12, Order = 12,
TypeId = 3, TypeId = 3,
@@ -1036,7 +1031,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("9c5aaf48-88ec-4c67-b936-2be45550f8bf"), Id = new Guid("9c5aaf48-88ec-4c67-b936-2be45550f8bf"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "14", EsppExportValue = "14",
Order = 13, Order = 13,
TypeId = 3, TypeId = 3,
@@ -1046,7 +1040,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("8dbd680c-ce49-4d2e-8a1a-05619685e240"), Id = new Guid("8dbd680c-ce49-4d2e-8a1a-05619685e240"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "15", EsppExportValue = "15",
Order = 14, Order = 14,
TypeId = 3, TypeId = 3,
@@ -1056,7 +1049,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("2f476f70-b1ef-419d-aad5-3911f1e3231f"), Id = new Guid("2f476f70-b1ef-419d-aad5-3911f1e3231f"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "16", EsppExportValue = "16",
Order = 15, Order = 15,
TypeId = 3, TypeId = 3,
@@ -1066,7 +1058,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("2c635ce2-fc18-47be-b3e9-98c211abf312"), Id = new Guid("2c635ce2-fc18-47be-b3e9-98c211abf312"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "17", EsppExportValue = "17",
Order = 16, Order = 16,
TypeId = 3, TypeId = 3,
@@ -1076,7 +1067,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("f9d5b03b-624a-4f9f-8da3-1490ea5d2914"), Id = new Guid("f9d5b03b-624a-4f9f-8da3-1490ea5d2914"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "18", EsppExportValue = "18",
Order = 17, Order = 17,
TypeId = 3, TypeId = 3,
@@ -1086,7 +1076,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("4f4b249c-db60-4582-86ed-75cfee4edd0c"), Id = new Guid("4f4b249c-db60-4582-86ed-75cfee4edd0c"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "19", EsppExportValue = "19",
Order = 18, Order = 18,
TypeId = 3, TypeId = 3,
@@ -1096,7 +1085,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("220a1464-4d39-416c-b4b2-3093eb007298"), Id = new Guid("220a1464-4d39-416c-b4b2-3093eb007298"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "20", EsppExportValue = "20",
Order = 19, Order = 19,
TypeId = 3, TypeId = 3,
@@ -1106,7 +1094,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("c887ca60-b05d-4d3c-ad1f-223c879b1a6d"), Id = new Guid("c887ca60-b05d-4d3c-ad1f-223c879b1a6d"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "21", EsppExportValue = "21",
Order = 20, Order = 20,
TypeId = 3, TypeId = 3,
@@ -1116,7 +1103,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("2905765d-63fb-41fe-a111-ee2f1d03d62e"), Id = new Guid("2905765d-63fb-41fe-a111-ee2f1d03d62e"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "22", EsppExportValue = "22",
Order = 21, Order = 21,
TypeId = 3, TypeId = 3,
@@ -1126,7 +1112,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("dbbe704a-8d6d-40e7-bd30-6974035b1fab"), Id = new Guid("dbbe704a-8d6d-40e7-bd30-6974035b1fab"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "23", EsppExportValue = "23",
Order = 22, Order = 22,
TypeId = 3, TypeId = 3,
@@ -1136,7 +1121,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("cf7b9645-52ed-43a2-8267-267e0aed19b1"), Id = new Guid("cf7b9645-52ed-43a2-8267-267e0aed19b1"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "24", EsppExportValue = "24",
Order = 23, Order = 23,
TypeId = 3, TypeId = 3,
@@ -1146,7 +1130,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("454788d6-d0ad-4c07-878c-da3fd3cd05e1"), Id = new Guid("454788d6-d0ad-4c07-878c-da3fd3cd05e1"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "25", EsppExportValue = "25",
Order = 24, Order = 24,
TypeId = 3, TypeId = 3,
@@ -1156,7 +1139,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("40d70d73-8582-4be6-a9e6-503b96ae3d49"), Id = new Guid("40d70d73-8582-4be6-a9e6-503b96ae3d49"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "26", EsppExportValue = "26",
Order = 25, Order = 25,
TypeId = 3, TypeId = 3,
@@ -1166,7 +1148,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("8f6610dc-ef46-4842-a57e-18d7aaa75931"), Id = new Guid("8f6610dc-ef46-4842-a57e-18d7aaa75931"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "27", EsppExportValue = "27",
Order = 26, Order = 26,
TypeId = 3, TypeId = 3,
@@ -1176,7 +1157,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("03858472-d4ce-47fd-9497-8051728766e4"), Id = new Guid("03858472-d4ce-47fd-9497-8051728766e4"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "28", EsppExportValue = "28",
Order = 27, Order = 27,
TypeId = 3, TypeId = 3,
@@ -1186,7 +1166,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("b1018e07-e90e-42ee-b399-19f3d0c14dd6"), Id = new Guid("b1018e07-e90e-42ee-b399-19f3d0c14dd6"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "29", EsppExportValue = "29",
Order = 28, Order = 28,
TypeId = 3, TypeId = 3,
@@ -1196,7 +1175,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("a1669207-aa31-40fe-98d0-d941008d1655"), Id = new Guid("a1669207-aa31-40fe-98d0-d941008d1655"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "30", EsppExportValue = "30",
Order = 29, Order = 29,
TypeId = 3, TypeId = 3,
@@ -1206,7 +1184,6 @@ namespace PARR.DAL.Migrations
{ {
Id = new Guid("0936aa99-73e0-43de-b6df-334c1228a226"), Id = new Guid("0936aa99-73e0-43de-b6df-334c1228a226"),
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
DistributionPeriodId = new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"),
EsppExportValue = "31", EsppExportValue = "31",
Order = 30, Order = 30,
TypeId = 3, TypeId = 3,
@@ -1738,6 +1715,30 @@ namespace PARR.DAL.Migrations
}); });
}); });
modelBuilder.Entity("PARR.DAL.Models.Job.JobGroupDistributionConfig", b =>
{
b.Property<Guid>("GroupId")
.HasColumnType("uuid");
b.Property<Guid>("DistributionPeriodId")
.HasColumnType("uuid");
b.Property<bool>("IsExcludeWeekends")
.HasColumnType("boolean");
b.Property<bool>("IsGroupingByWorkGroup")
.HasColumnType("boolean");
b.HasKey("GroupId");
b.HasIndex("DistributionPeriodId");
b.ToTable("GroupDistributionConfigs", "job", t =>
{
t.HasComment("Настройки автораспределения для группы работ");
});
});
modelBuilder.Entity("PARR.DAL.Models.Job.JobGroupType", b => modelBuilder.Entity("PARR.DAL.Models.Job.JobGroupType", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
@@ -3229,7 +3230,7 @@ namespace PARR.DAL.Migrations
b.HasIndex("Date") b.HasIndex("Date")
.IsUnique(); .IsUnique();
b.ToTable("WeekendDays"); b.ToTable("WeekendDays", "schedule");
}); });
modelBuilder.Entity("PARR.DAL.Models.WorkGroup", b => modelBuilder.Entity("PARR.DAL.Models.WorkGroup", b =>
@@ -3372,18 +3373,12 @@ namespace PARR.DAL.Migrations
modelBuilder.Entity("PARR.DAL.Models.EsppSchTypeValue", b => modelBuilder.Entity("PARR.DAL.Models.EsppSchTypeValue", b =>
{ {
b.HasOne("PARR.DAL.Models.DistributionPeriod", "DistributionPeriod")
.WithMany("EsppSchTypeValues")
.HasForeignKey("DistributionPeriodId");
b.HasOne("PARR.DAL.Models.EsppSchType", "EsppSchType") b.HasOne("PARR.DAL.Models.EsppSchType", "EsppSchType")
.WithMany("EsppSchTypeValues") .WithMany("EsppSchTypeValues")
.HasForeignKey("TypeId") .HasForeignKey("TypeId")
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.Navigation("DistributionPeriod");
b.Navigation("EsppSchType"); b.Navigation("EsppSchType");
}); });
@@ -3520,6 +3515,25 @@ namespace PARR.DAL.Migrations
b.Navigation("ScheduleExcludeTypeCalendar"); b.Navigation("ScheduleExcludeTypeCalendar");
}); });
modelBuilder.Entity("PARR.DAL.Models.Job.JobGroupDistributionConfig", b =>
{
b.HasOne("PARR.DAL.Models.DistributionPeriod", "DistributionPeriod")
.WithMany("GroupDistributionConfig")
.HasForeignKey("DistributionPeriodId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PARR.DAL.Models.Job.JobGroup", "Group")
.WithOne("DistributionConfig")
.HasForeignKey("PARR.DAL.Models.Job.JobGroupDistributionConfig", "GroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("DistributionPeriod");
b.Navigation("Group");
});
modelBuilder.Entity("PARR.DAL.Models.Job.JobRelationshipFilter", b => modelBuilder.Entity("PARR.DAL.Models.Job.JobRelationshipFilter", b =>
{ {
b.HasOne("PARR.DAL.Models.Unit.UnitField", "UnitField") b.HasOne("PARR.DAL.Models.Unit.UnitField", "UnitField")
@@ -3874,7 +3888,7 @@ namespace PARR.DAL.Migrations
modelBuilder.Entity("PARR.DAL.Models.DistributionPeriod", b => modelBuilder.Entity("PARR.DAL.Models.DistributionPeriod", b =>
{ {
b.Navigation("EsppSchTypeValues"); b.Navigation("GroupDistributionConfig");
}); });
modelBuilder.Entity("PARR.DAL.Models.DistributionPeriodType", b => modelBuilder.Entity("PARR.DAL.Models.DistributionPeriodType", b =>
@@ -3925,6 +3939,8 @@ namespace PARR.DAL.Migrations
modelBuilder.Entity("PARR.DAL.Models.Job.JobGroup", b => modelBuilder.Entity("PARR.DAL.Models.Job.JobGroup", b =>
{ {
b.Navigation("DistributionConfig");
b.Navigation("EsppSchValues"); b.Navigation("EsppSchValues");
b.Navigation("Jobs"); b.Navigation("Jobs");

View File

@@ -1,5 +1,7 @@
using PARR.Constants; using PARR.Constants;
using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.DAL.Models.Base;
using PARR.DAL.Models.Job;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
@@ -8,7 +10,7 @@ namespace PARR.DAL.Models
/// <summary> /// <summary>
/// Период автоматического распеделения РР /// Период автоматического распеделения РР
/// </summary> /// </summary>
[Table("DistributionPeriods")] [Table("DistributionPeriods", Schema = DataContextSettings.Schedule)]
public class DistributionPeriod : IBase public class DistributionPeriod : IBase
{ {
[Key] [Key]
@@ -58,7 +60,9 @@ namespace PARR.DAL.Models
[ForeignKey(nameof(Type))] [ForeignKey(nameof(Type))]
public DistributionPeriodType? DistributionPeriodType { get; set; } public DistributionPeriodType? DistributionPeriodType { get; set; }
public ICollection<EsppSchTypeValue> EsppSchTypeValues { get; set; } = new HashSet<EsppSchTypeValue>(); public ICollection<JobGroupDistributionConfig> GroupDistributionConfig { get; set; } = new HashSet<JobGroupDistributionConfig>();
//public ICollection<EsppSchTypeValue> EsppSchTypeValues { get; set; } = new HashSet<EsppSchTypeValue>();

View File

@@ -1,9 +1,10 @@
using System.ComponentModel.DataAnnotations; using PARR.DAL.Context;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("DistributionPeriodTypes")] [Table("DistributionPeriodTypes", Schema = DataContextSettings.Schedule)]
public class DistributionPeriodType public class DistributionPeriodType
{ {
[Key] [Key]

View File

@@ -37,14 +37,14 @@ namespace PARR.DAL.Models
public int Order { get; set; } public int Order { get; set; }
/// <summary> ///// <summary>
/// Если есть связь с периодом, то есть функция автораспределения ///// Если есть связь с периодом, то есть функция автораспределения
/// </summary> ///// </summary>
public Guid? DistributionPeriodId { get; set; } //public Guid? DistributionPeriodId { get; set; }
[ForeignKey(nameof(DistributionPeriodId))] //[ForeignKey(nameof(DistributionPeriodId))]
public DistributionPeriod? DistributionPeriod { get; set; } //public DistributionPeriod? DistributionPeriod { get; set; }
[ForeignKey(nameof(TypeId))] [ForeignKey(nameof(TypeId))]

View File

@@ -160,5 +160,7 @@ namespace PARR.DAL.Models.Job
[ForeignKey(nameof(ScheduleExcludeTypeCalendarId))] [ForeignKey(nameof(ScheduleExcludeTypeCalendarId))]
public ScheduleExcludeTypeCalendar? ScheduleExcludeTypeCalendar { get; set; } public ScheduleExcludeTypeCalendar? ScheduleExcludeTypeCalendar { get; set; }
public JobGroupDistributionConfig? DistributionConfig { get; set; }
} }
} }

View File

@@ -0,0 +1,36 @@
using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models.Job
{
/// <summary>
/// Настройки автораспределения для JobGroup
/// </summary>
[Table("GroupDistributionConfigs", Schema = DataContextSettings.Job)]
[Comment("Настройки автораспределения для группы работ")]
public class JobGroupDistributionConfig
{
[Key]
public Guid GroupId { get; set; }
public Guid DistributionPeriodId { get; set; }
/// <summary>
/// Исключать выходные и праздничные дни
/// </summary>
public bool IsExcludeWeekends { get; set; }
/// <summary>
/// Группировать по рабочей группе
/// </summary>
public bool IsGroupingByWorkGroup { get; set; }
[ForeignKey(nameof(GroupId))]
public JobGroup? Group { get; set; }
[ForeignKey(nameof(DistributionPeriodId))]
public DistributionPeriod? DistributionPeriod { get; set; }
}
}

View File

@@ -1,11 +1,12 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using PARR.DAL.Context;
using PARR.DAL.Models.Base; using PARR.DAL.Models.Base;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models namespace PARR.DAL.Models
{ {
[Table("WeekendDays")] [Table("WeekendDays", Schema = DataContextSettings.Schedule)]
[Index(nameof(Date), IsUnique = true)] [Index(nameof(Date), IsUnique = true)]
public class WeekendDay : IBase public class WeekendDay : IBase
{ {