From 8fa04dfec285fb2b8f56436bb5ddc9fb623a4f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 3 Oct 2025 21:10:12 +0300 Subject: [PATCH] =?UTF-8?q?Entity=20d=C3=BCzenlemesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/ListFormsSeeder.cs | 16 +- .../Seeds/PlatformDataSeeder.cs | 4 +- .../PlatformConsts.cs | 1 + .../Entities/Administration/Behavior.cs | 14 + .../Entities/Administration/Class.cs | 21 + .../Administration/ClassCancellationReason.cs | 15 + .../Entities/Administration/ClassType.cs | 29 + .../Entities/Administration/Disease.cs | 14 + .../Entities/Administration/Document.cs | 14 + .../Administration/EducationStatus.cs | 15 + .../Entities/Administration/Event.cs | 24 + .../Entities/Administration/EventCategory.cs | 18 + .../Entities/Administration/EventType.cs | 18 + .../Entities/Administration/Information.cs | 14 + .../Entities/Administration/Interesting.cs | 15 + .../Entities/Administration/Lawyer.cs | 29 + .../Entities/Administration/LessonPeriod.cs | 21 + .../Entities/Administration/Level.cs | 23 + .../Entities/Administration/Meal.cs | 18 + .../Entities/Administration/MeetingMethod.cs | 15 + .../Entities/Administration/MeetingResult.cs | 15 + .../Entities/Administration/NoteType.cs | 14 + .../Entities/Administration/Program.cs | 15 + .../Entities/Administration/Psychologist.cs | 19 + .../Administration/RegistrationMethod.cs | 20 + .../Administration/RegistrationType.cs | 21 + .../Administration/SalesRejectionReason.cs | 15 + .../Entities/Administration/Schedule.cs | 39 + .../Entities/Administration/ScheduleLesson.cs | 22 + .../Entities/Administration/Source.cs | 15 + .../Administration/TransactionReason.cs | 16 + .../Entities/Administration/Vaccine.cs | 14 + .../Entities/Administration/Vehicle.cs | 28 + .../Entities/Administration/WorkHour.cs | 25 + .../EntityFrameworkCore/PlatformDbContext.cs | 1356 ++++++---- ....cs => 20251003180537_Initial.Designer.cs} | 2185 ++++++++++++++++- ...6_Initial.cs => 20251003180537_Initial.cs} | 1630 +++++++++--- .../PlatformDbContextModelSnapshot.cs | 2183 +++++++++++++++- 38 files changed, 6867 insertions(+), 1103 deletions(-) create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Behavior.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Class.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/ClassCancellationReason.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/ClassType.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Disease.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Document.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/EducationStatus.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Event.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/EventCategory.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/EventType.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Information.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Interesting.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Lawyer.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/LessonPeriod.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Level.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Meal.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/MeetingMethod.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/MeetingResult.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Program.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Psychologist.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationMethod.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationType.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/SalesRejectionReason.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Schedule.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/ScheduleLesson.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Source.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/TransactionReason.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Vaccine.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/Vehicle.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Administration/WorkHour.cs rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251003092426_Initial.Designer.cs => 20251003180537_Initial.Designer.cs} (78%) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251003092426_Initial.cs => 20251003180537_Initial.cs} (78%) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 2ab01a0c..033d04ab 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -1010,7 +1010,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" AS \"Key\", \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\" WHERE (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"CityCode\" = @param1 OR @param1 IS NULL) GROUP BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" ORDER BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\"", + LookupQuery = $"SELECT \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" AS \"Key\", \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\" WHERE (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"City\" = @param1 OR @param1 IS NULL) GROUP BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" ORDER BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\"", CascadeRelationField = "City", CascadeFilterOperator="=", CascadeParentFields = "Country,City", @@ -1545,7 +1545,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Name\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Name\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"CityCode\" = @param1 OR @param1 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Name\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Name\"", + LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Name\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Name\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"City\" = @param1 OR @param1 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Name\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Name\"", CascadeRelationField = "City", CascadeFilterOperator="=", CascadeParentFields = "Country,City", @@ -1584,7 +1584,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Street\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Street\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"CityCode\" = @param1 OR @param1 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"Name\" = @param2 OR @param2 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Street\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Street\"", + LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Street\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Street\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"City\" = @param1 OR @param1 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"Name\" = @param2 OR @param2 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Street\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Street\"", CascadeRelationField = "District", CascadeFilterOperator="=", CascadeParentFields = "Country,City,District" @@ -2289,7 +2289,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Name\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Name\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"CityCode\" = @param1 OR @param1 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Name\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Name\"", + LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Name\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Name\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"City\" = @param1 OR @param1 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Name\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Name\"", CascadeRelationField = "City", CascadeFilterOperator="=", CascadeParentFields = "Country,City", @@ -2328,7 +2328,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Street\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Street\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"CityCode\" = @param1 OR @param1 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"Name\" = @param2 OR @param2 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Street\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Street\"", + LookupQuery = $"SELECT \"{Prefix.DbTableDefault}District\".\"Street\" AS \"Key\", \"{Prefix.DbTableDefault}District\".\"Street\" as \"Name\" FROM \"{Prefix.DbTableDefault}District\" WHERE (\"{Prefix.DbTableDefault}District\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"City\" = @param1 OR @param1 IS NULL) AND (\"{Prefix.DbTableDefault}District\".\"Name\" = @param2 OR @param2 IS NULL) GROUP BY \"{Prefix.DbTableDefault}District\".\"Street\" ORDER BY \"{Prefix.DbTableDefault}District\".\"Street\"", CascadeRelationField = "District", CascadeFilterOperator="=", CascadeParentFields = "Country,City,District" @@ -15732,7 +15732,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DisplayExpr = "Name", ValueExpr = "Key", LookupQuery = $"SELECT \"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\".\"Code\" AS \"Key\", \"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\" ORDER BY \"{SelectCommandByTableName("Country", Prefix.DbTableDefinition)}\".\"Name\"", - CascadeEmptyFields = "CityCode" + CascadeEmptyFields = "City" }), ValidationRuleJson = JsonSerializer.Serialize(new[] { @@ -15753,7 +15753,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency ListFormCode = listFormDistrict.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "CityCode", + FieldName = "City", Width = 120, ListOrderNo = 3, Visible = true, @@ -17591,7 +17591,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", - LookupQuery = $"SELECT \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" AS \"Key\", \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\" WHERE (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"CityCode\" = @param1 OR @param1 IS NULL) GROUP BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" ORDER BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\"", + LookupQuery = $"SELECT \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" AS \"Key\", \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" as \"Name\" FROM \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\" WHERE (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Country\" = @param0 OR @param0 IS NULL) AND (\"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"City\" = @param1 OR @param1 IS NULL) GROUP BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\" ORDER BY \"{SelectCommandByTableName("District", Prefix.DbTableDefinition)}\".\"Name\"", CascadeRelationField = "City", CascadeFilterOperator="=", CascadeParentFields = "Country,City", diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs index 8a52acf0..fda407a4 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs @@ -360,13 +360,13 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency if (item == null) continue; var key = $"{item.Country}:{item.Country}.{item.City}:{item.Name}:{item.Township}:{item.Street}:{item.ZipCode}"; - var cityCode = $"{item.Country}.{item.City}"; + var city = $"{item.Country}.{item.City}"; if (existingSet.Contains(key)) continue; buffer.Add(new District( Guid.NewGuid(), item.Country, - cityCode, + city, item.Name, item.Township, item.Street, diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index de68a013..6c81329e 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -22,6 +22,7 @@ public static class PlatformConsts public const string Abp = "Abp"; public const string DbTableDefault = "P"; public const string DbTableDefinition = "D"; + public const string DbTableWeb = "W"; public const string DbTableCoordinator = "C"; public const string DbSchema = null; } diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Behavior.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Behavior.cs new file mode 100644 index 00000000..9e92d2da --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Behavior.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Behavior : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Class.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Class.cs new file mode 100644 index 00000000..b535133d --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Class.cs @@ -0,0 +1,21 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Class : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } + + public Guid ClassTypeId { get; set; } + + public string ClassCode { get; set; } + public string Status { get; set; } + + // Navigation + public ClassType ClassType { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/ClassCancellationReason.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/ClassCancellationReason.cs new file mode 100644 index 00000000..416c2b3a --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/ClassCancellationReason.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class ClassCancellationReason : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Reason { get; set; } // SinifTatilEtmeSebebi + public string Status { get; set; } // Durum + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/ClassType.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/ClassType.cs new file mode 100644 index 00000000..d8284e09 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/ClassType.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class ClassType : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } + + public Guid RegistrationTypeId { get; set; } // KayitTipiId + + public string Name { get; set; } + public int? MinStudentCount { get; set; } + public int? MaxStudentCount { get; set; } + public string Status { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; + + // Navigation + public RegistrationType RegistrationType { get; set; } + + public ICollection Classes { get; set; } + + public ICollection Levels { get; set; } + +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Disease.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Disease.cs new file mode 100644 index 00000000..49fde6cd --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Disease.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Disease : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Document.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Document.cs new file mode 100644 index 00000000..86ab6f12 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Document.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Document : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/EducationStatus.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/EducationStatus.cs new file mode 100644 index 00000000..bf72de67 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/EducationStatus.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class EducationStatus : Entity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } // OgrenimDurumu + public short? OrderNo { get; set; } // SiraNo + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Event.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Event.cs new file mode 100644 index 00000000..ada40118 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Event.cs @@ -0,0 +1,24 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Event : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid CategoryId { get; set; } + public Guid TypeId { get; set; } + + public string Name { get; set; } + public string Place { get; set; } + public string Description { get; set; } + public string Status { get; set; } + + // Navigation + public EventCategory Category { get; set; } + public EventType Type { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/EventCategory.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/EventCategory.cs new file mode 100644 index 00000000..a4262532 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/EventCategory.cs @@ -0,0 +1,18 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; +using System.Collections.Generic; + +namespace Kurs.Platform.Entities; + +public class EventCategory : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + + // Navigation + public ICollection Events { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/EventType.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/EventType.cs new file mode 100644 index 00000000..1c116f7e --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/EventType.cs @@ -0,0 +1,18 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; +using System.Collections.Generic; + +namespace Kurs.Platform.Entities; + +public class EventType : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + + // Navigation + public ICollection Events { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Information.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Information.cs new file mode 100644 index 00000000..c2f327ff --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Information.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Information : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Type { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Interesting.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Interesting.cs new file mode 100644 index 00000000..798d9eec --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Interesting.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Interesting : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + public string Status { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Lawyer.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Lawyer.cs new file mode 100644 index 00000000..1f4c73bc --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Lawyer.cs @@ -0,0 +1,29 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Lawyer : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + public string ContactPerson { get; set; } + public string Email { get; set; } + public string Address { get; set; } + public string City { get; set; } + public string TaxOffice { get; set; } + public string TaxNumber { get; set; } + + public string Phone1 { get; set; } + public string Phone2 { get; set; } + public string Phone3 { get; set; } + public string Phone4 { get; set; } + public string Fax { get; set; } + + public string Description { get; set; } + public string Status { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/LessonPeriod.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/LessonPeriod.cs new file mode 100644 index 00000000..5ef51a69 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/LessonPeriod.cs @@ -0,0 +1,21 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class LessonPeriod : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } + + public string Name { get; set; } + public string Day { get; set; } + + public string Lesson1 { get; set; } + public string Lesson2 { get; set; } + public string Lesson3 { get; set; } + public string Lesson4 { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Level.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Level.cs new file mode 100644 index 00000000..8d1a1ae4 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Level.cs @@ -0,0 +1,23 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Level : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public Guid ClassTypeId { get; set; } // SinifTipiID (FK) + public string LevelType { get; set; } // SeviyeTipi + public string LevelCode { get; set; } // SeviyeKodu + public int LessonCount { get; set; } // DersSayisi + public string Status { get; set; } // Durum + public int? LessonDuration { get; set; } // DersSuresi + public decimal? MonthlyPaymentRate { get; set; } // AylikOdemeYuzdesi + + // Navigation + public ClassType ClassType { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Meal.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Meal.cs new file mode 100644 index 00000000..eab9a64e --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Meal.cs @@ -0,0 +1,18 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Meal : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } + + public DateTime Date { get; set; } + public string Breakfast { get; set; } + public string Lunch { get; set; } + public string Snack { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/MeetingMethod.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/MeetingMethod.cs new file mode 100644 index 00000000..2d82cb5a --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/MeetingMethod.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class MeetingMethod : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public string Name { get; set; } // GorusmeSekli + public string Type { get; set; } // GorusmeTuru + public bool? Flag { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/MeetingResult.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/MeetingResult.cs new file mode 100644 index 00000000..28f719ae --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/MeetingResult.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class MeetingResult : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } // GorusmeSonuc + public short? OrderNo { get; set; } // SiraNo + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs new file mode 100644 index 00000000..5ed769a1 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class NoteType : Entity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } // NotTuru + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Program.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Program.cs new file mode 100644 index 00000000..99dfa10d --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Program.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Program : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } // ProgramAdi + public string Status { get; set; } // Durum + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Psychologist.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Psychologist.cs new file mode 100644 index 00000000..6aed5c20 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Psychologist.cs @@ -0,0 +1,19 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Psychologist : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } // SubeID + + public string Name { get; set; } // AdSoyad + public string Phone { get; set; } // Telefon + public string Email { get; set; } // Eposta + public string Address { get; set; } // Adres + public string Status { get; set; } // Durum + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationMethod.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationMethod.cs new file mode 100644 index 00000000..5ac55777 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationMethod.cs @@ -0,0 +1,20 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class RegistrationMethod : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } // SubeID + + public Guid RegistrationTypeId { get; set; } // KayitTipiID + public string Name { get; set; } // KayitSekli + public string Status { get; set; } // Durum + + Guid? IMultiTenant.TenantId => TenantId; + + // Navigation + public RegistrationType RegistrationType { get; set; } +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationType.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationType.cs new file mode 100644 index 00000000..20fdc095 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/RegistrationType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class RegistrationType : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } // SubeID + + public string Name { get; set; } // KayitTipi + public string Status { get; set; } // Durum + + Guid? IMultiTenant.TenantId => TenantId; + + // Navigation + public ICollection Methods { get; set; } + public ICollection ClassTypes { get; set; } +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/SalesRejectionReason.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/SalesRejectionReason.cs new file mode 100644 index 00000000..7b65e5c6 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/SalesRejectionReason.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class SalesRejectionReason : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Reason { get; set; } // SatisOlmamaSebebi + public string Status { get; set; } // Durum + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Schedule.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Schedule.cs new file mode 100644 index 00000000..1b0929c9 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Schedule.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Schedule : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } + public string Name { get; set; } + public string Status { get; set; } + + // Ders saatleri + public string StartTime { get; set; } + public string EndTime { get; set; } + public int LessonMinute { get; set; } + public int LessonBreakMinute { get; set; } + public int LessonCount { get; set; } + + // Öğle arası + public string LunchTime { get; set; } + public int? LunchMinute { get; set; } + public bool? IncludeLunch { get; set; } + + public bool? Monday { get; set; } + public bool? Tuesday { get; set; } + public bool? Wednesday { get; set; } + public bool? Thursday { get; set; } + public bool? Friday { get; set; } + public bool? Saturday { get; set; } + public bool? Sunday { get; set; } + + // Navigation + public ICollection Lessons { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/ScheduleLesson.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/ScheduleLesson.cs new file mode 100644 index 00000000..d0b56a7c --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/ScheduleLesson.cs @@ -0,0 +1,22 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class ScheduleLesson : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + public Guid? BranchId { get; set; } + public Guid ScheduleId { get; set; } + public string Day { get; set; } + public int? LessonNo { get; set; } + public string StartTime { get; set; } + public string EndTime { get; set; } + public int? LessonMinute { get; set; } + public int? LessonBreakMinute { get; set; } + + public Schedule Schedule { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Source.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Source.cs new file mode 100644 index 00000000..8db24ed9 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Source.cs @@ -0,0 +1,15 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Source : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } // Kaynak + public string Status { get; set; } // Durum + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/TransactionReason.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/TransactionReason.cs new file mode 100644 index 00000000..ce72cafa --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/TransactionReason.cs @@ -0,0 +1,16 @@ +using System; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class TransactionReason : Entity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } // HareketSebebi + public string Type { get; set; } // HareketTuru + public string Status { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Vaccine.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Vaccine.cs new file mode 100644 index 00000000..c25b754c --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Vaccine.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Vaccine : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/Vehicle.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/Vehicle.cs new file mode 100644 index 00000000..e143998b --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/Vehicle.cs @@ -0,0 +1,28 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class Vehicle : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Plate { get; set; } + public string Brand { get; set; } + public int? ModelYear { get; set; } + + public string DriverNationalId { get; set; } + public string DriverName { get; set; } + public string DriverPhone1 { get; set; } + public string DriverPhone2 { get; set; } + + public string AssistantDriverNationalId { get; set; } + public string AssistantDriverName { get; set; } + public string AssistantDriverPhone1 { get; set; } + public string AssistantDriverPhone2 { get; set; } + + public string Status { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/WorkHour.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/WorkHour.cs new file mode 100644 index 00000000..54b86157 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/WorkHour.cs @@ -0,0 +1,25 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +public class WorkHour : FullAuditedEntity, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + public string StartHour { get; set; } + public string EndHour { get; set; } + public bool? IsFixed { get; set; } + + public bool? Monday { get; set; } + public bool? Tuesday { get; set; } + public bool? Wednesday { get; set; } + public bool? Thursday { get; set; } + public bool? Friday { get; set; } + public bool? Saturday { get; set; } + public bool? Sunday { get; set; } + + Guid? IMultiTenant.TenantId => TenantId; +} diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index ba02cf55..85fc24c6 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -36,26 +36,40 @@ public class PlatformDbContext : IIdentityDbContext, ITenantManagementDbContext { + #region Saas from the modules + public DbSet AiBots { get; set; } public DbSet Branches { get; set; } public DbSet BranchUsers { get; set; } + public DbSet GlobalSearchs { get; set; } + public DbSet Routes { get; set; } + public DbSet Menus { get; set; } + public DbSet DataSources { get; set; } public DbSet ListForms { get; set; } public DbSet ListFormFields { get; set; } public DbSet ListFormCustomization { get; set; } public DbSet ListFormImports { get; set; } public DbSet ListFormImportExecutes { get; set; } - public DbSet Menus { get; set; } - public DbSet IpRestrictions { get; set; } - public DbSet DataSources { get; set; } public DbSet BackgroundWorkers { get; set; } + public DbSet ForumCategories { get; set; } + public DbSet ForumTopics { get; set; } + public DbSet ForumPosts { get; set; } + public DbSet CustomEntities { get; set; } + public DbSet EntityFields { get; set; } + public DbSet Migrations { get; set; } + public DbSet GeneratedEndpoints { get; set; } public DbSet CustomEndpoints { get; set; } - public DbSet GlobalSearchs { get; set; } - public DbSet AiBots { get; set; } + public DbSet CustomComponents { get; set; } + public DbSet ReportTemplates { get; set; } + public DbSet ReportParameters { get; set; } + public DbSet ReportGenerated { get; set; } + public DbSet ReportCategories { get; set; } + #endregion + + #region Definitions from the modules public DbSet Sectors { get; set; } - public DbSet UomCategories { get; set; } - public DbSet Uoms { get; set; } + public DbSet ContactTags { get; set; } + public DbSet ContactTitles { get; set; } public DbSet Currencies { get; set; } - public DbSet Banks { get; set; } - public DbSet BankAccounts { get; set; } public DbSet CountryGroups { get; set; } public DbSet Countries { get; set; } public DbSet Cities { get; set; } @@ -63,43 +77,70 @@ public class PlatformDbContext : public DbSet SkillTypes { get; set; } public DbSet Skills { get; set; } public DbSet SkillLevels { get; set; } - public DbSet ContactTags { get; set; } - public DbSet ContactTitles { get; set; } - public DbSet BlogPosts { get; set; } - public DbSet BlogCategories { get; set; } - public DbSet Routes { get; set; } - public DbSet CustomEntities { get; set; } - public DbSet EntityFields { get; set; } - public DbSet Migrations { get; set; } - public DbSet GeneratedEndpoints { get; set; } - public DbSet CustomComponents { get; set; } + public DbSet UomCategories { get; set; } + public DbSet Uoms { get; set; } + public DbSet Banks { get; set; } + public DbSet Behaviors { get; set; } + public DbSet BankAccounts { get; set; } - // Forum Entities - public DbSet ForumCategories { get; set; } - public DbSet ForumTopics { get; set; } - public DbSet ForumPosts { get; set; } + //Student + public DbSet Schedules { get; set; } + public DbSet ScheduleLessons { get; set; } + public DbSet ClassTypes { get; set; } + public DbSet Classes { get; set; } + public DbSet Events { get; set; } + public DbSet EventCategories { get; set; } + public DbSet EventTypes { get; set; } + public DbSet Informations { get; set; } + public DbSet LessonPeriods { get; set; } + public DbSet Lawyers { get; set; } + public DbSet Meals { get; set; } + public DbSet Diseases { get; set; } + public DbSet Documents { get; set; } + public DbSet InterestAreas { get; set; } + public DbSet RegistrationMethods { get; set; } + public DbSet RegistrationTypes { get; set; } + public DbSet Sources { get; set; } + public DbSet NoteTypes { get; set; } + public DbSet EducationStatuses { get; set; } + public DbSet Programs { get; set; } + public DbSet Psychologists { get; set; } + public DbSet SalesRejectionReasons { get; set; } + public DbSet Levels { get; set; } + public DbSet ClassCancellationReasons { get; set; } + public DbSet TransactionReasons { get; set; } + public DbSet MeetingMethods { get; set; } + public DbSet MeetingResults { get; set; } + public DbSet Vaccines { get; set; } + public DbSet Vehicles { get; set; } + public DbSet WorkHours { get; set; } - // Public Entities + #endregion + + #region Administrator from the modules + public DbSet IpRestrictions { get; set; } + #endregion + + #region Web Site from the modules + public DbSet Abouts { get; set; } + public DbSet Services { get; set; } public DbSet Products { get; set; } public DbSet PaymentMethods { get; set; } public DbSet InstallmentOptions { get; set; } - public DbSet Abouts { get; set; } - public DbSet Contacts { get; set; } public DbSet Orders { get; set; } public DbSet OrderItems { get; set; } + public DbSet BlogPosts { get; set; } + public DbSet BlogCategories { get; set; } public DbSet Demos { get; set; } - public DbSet Services { get; set; } - - // Reports Entities - public DbSet ReportTemplates { get; set; } - public DbSet ReportParameters { get; set; } - public DbSet ReportGenerated { get; set; } - public DbSet ReportCategories { get; set; } + public DbSet Contacts { get; set; } + #endregion + #region Coordinator from the modules public DbSet ClassSessions { get; set; } public DbSet Participants { get; set; } public DbSet AttendanceRecords { get; set; } public DbSet ChatMessages { get; set; } + #endregion #region Entities from the modules @@ -167,6 +208,121 @@ public class PlatformDbContext : /* Configure your own tables/entities inside here */ + //Saas + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(AiBot), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(a => a.BotName).IsRequired().HasMaxLength(128); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(Branch), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(a => a.TenantId).IsRequired(); + b.Property(a => a.Code).IsRequired().HasMaxLength(64); + b.Property(a => a.Name).IsRequired().HasMaxLength(128); + b.Property(a => a.VknTckn).IsRequired(); + b.Property(a => a.TaxOffice).HasMaxLength(128); + b.Property(a => a.Country).HasMaxLength(128); + b.Property(a => a.City).HasMaxLength(128); + b.Property(a => a.District).HasMaxLength(128); + b.Property(a => a.Street).HasMaxLength(256); + b.Property(a => a.Address).HasMaxLength(512); + b.Property(a => a.Address2).HasMaxLength(512); + b.Property(a => a.PostalCode).HasMaxLength(16); + b.Property(a => a.Phone).HasMaxLength(20); + b.Property(a => a.Mobile).IsRequired().HasMaxLength(20); + b.Property(a => a.Fax).HasMaxLength(20); + b.Property(a => a.Email).HasMaxLength(128); + b.Property(a => a.Website).HasMaxLength(128); + b.Property(a => a.IsActive).HasDefaultValue(true); + + b.HasMany(x => x.Users) + .WithOne(x => x.Branch) + .HasForeignKey(x => x.BranchId) + .OnDelete(DeleteBehavior.Cascade); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(BranchUsers), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.HasKey(x => new { x.UserId, x.BranchId }); + b.Property(a => a.UserId).IsRequired(); + b.Property(a => a.BranchId).IsRequired(); + b.Property(a => a.TenantId); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(GlobalSearch), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(a => a.System).HasMaxLength(50); + b.Property(a => a.Group).HasMaxLength(50); + b.Property(a => a.Term).IsRequired().HasMaxLength(256); + b.Property(a => a.Weight).HasMaxLength(50); + b.Property(a => a.Url).HasMaxLength(512); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(Route), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.HasIndex(x => x.Key).IsUnique(); + + b.Property(x => x.Key).IsRequired().HasMaxLength(128); + b.Property(x => x.Path).IsRequired().HasMaxLength(256); + b.Property(x => x.ComponentPath).IsRequired().HasMaxLength(256); + b.Property(x => x.RouteType).HasMaxLength(64); + + b.Property(x => x.Authority).HasConversion( + v => string.Join(",", v), + v => v.Split(',', StringSplitOptions.RemoveEmptyEntries) + ).Metadata.SetValueComparer( + new ValueComparer( + (c1, c2) => c1.SequenceEqual(c2), + c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())), + c => c.ToArray() + ) + ); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(Menu), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(a => a.Code).IsRequired().HasMaxLength(100); + b.Property(a => a.DisplayName).IsRequired().HasMaxLength(100); + b.Property(a => a.Url).HasMaxLength(250); + b.Property(a => a.Icon).HasMaxLength(50); + b.Property(a => a.ParentCode).HasMaxLength(50); + b.Property(a => a.CssClass).HasMaxLength(128); + b.Property(a => a.RequiredPermissionName).HasMaxLength(128); + b.Property(a => a.Target).HasMaxLength(50); + b.Property(a => a.ElementId).HasMaxLength(50); + b.Property(a => a.UserId).HasMaxLength(256); + b.Property(a => a.RoleId).HasMaxLength(256); + b.Property(a => a.CultureName).HasMaxLength(50); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(DataSource), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(a => a.Code).IsRequired().HasMaxLength(100); + b.Property(a => a.ConnectionString).HasMaxLength(256); + b.Property(a => a.DataSourceType).IsRequired(); + }); + builder.Entity(b => { b.ToTable(Prefix.DbTableDefault + nameof(ListForm), Prefix.DbSchema); @@ -336,45 +492,6 @@ public class PlatformDbContext : b.Property(x => x.ErrorsJson).HasColumnType("text"); }); - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(Menu), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(a => a.Code).IsRequired().HasMaxLength(100); - b.Property(a => a.DisplayName).IsRequired().HasMaxLength(100); - b.Property(a => a.Url).HasMaxLength(250); - b.Property(a => a.Icon).HasMaxLength(50); - b.Property(a => a.ParentCode).HasMaxLength(50); - b.Property(a => a.CssClass).HasMaxLength(128); - b.Property(a => a.RequiredPermissionName).HasMaxLength(128); - b.Property(a => a.Target).HasMaxLength(50); - b.Property(a => a.ElementId).HasMaxLength(50); - b.Property(a => a.UserId).HasMaxLength(256); - b.Property(a => a.RoleId).HasMaxLength(256); - b.Property(a => a.CultureName).HasMaxLength(50); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(IpRestriction), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(a => a.ResourceType).IsRequired().HasMaxLength(10); - b.Property(a => a.ResourceId).HasMaxLength(32); - b.Property(a => a.IP).IsRequired().HasMaxLength(32); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(DataSource), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(a => a.Code).IsRequired().HasMaxLength(100); - b.Property(a => a.ConnectionString).HasMaxLength(256); - b.Property(a => a.DataSourceType).IsRequired(); - }); - builder.Entity(b => { b.ToTable(Prefix.DbTableDefault + nameof(BackgroundWorker), Prefix.DbSchema); @@ -390,6 +507,132 @@ public class PlatformDbContext : b.Property(a => a.Options).HasColumnType("text"); }); + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(ForumCategory), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + b.Property(x => x.Slug).IsRequired().HasMaxLength(128); + b.Property(x => x.Description).HasMaxLength(512); + b.Property(x => x.Icon).HasMaxLength(64); + + b.HasIndex(x => x.DisplayOrder); + + b.HasMany(x => x.Topics) + .WithOne(x => x.Category) + .HasForeignKey(x => x.CategoryId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(ForumTopic), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Title).IsRequired().HasMaxLength(256); + b.Property(x => x.Content).IsRequired(); + b.Property(x => x.AuthorName).HasMaxLength(128); + b.Property(x => x.LastPostUserName).HasMaxLength(128); + + b.HasIndex(x => x.CategoryId); + b.HasIndex(x => x.IsPinned); + b.HasIndex(x => x.LastPostDate); + + b.HasMany(x => x.Posts) + .WithOne(x => x.Topic) + .HasForeignKey(x => x.TopicId) + .OnDelete(DeleteBehavior.Cascade); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(ForumPost), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Content).IsRequired(); + b.Property(x => x.AuthorName).HasMaxLength(128); + + b.HasIndex(x => x.TopicId); + + b.HasOne(x => x.Topic) + .WithMany(x => x.Posts) + .HasForeignKey(x => x.TopicId) + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne(x => x.ParentPost) + .WithMany(x => x.Replies) + .HasForeignKey(x => x.ParentPostId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(CustomEntity), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.HasKey(x => x.Id); + b.Property(x => x.Name).IsRequired().HasMaxLength(100); + b.Property(x => x.DisplayName).IsRequired().HasMaxLength(100); + b.Property(x => x.TableName).IsRequired().HasMaxLength(100); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.MigrationStatus).IsRequired().HasMaxLength(50); + b.Property(x => x.EndpointStatus).IsRequired().HasMaxLength(50); + + b.HasMany(x => x.Fields) + .WithOne(x => x.Entity) + .HasForeignKey(x => x.EntityId) + .OnDelete(DeleteBehavior.Cascade); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(CustomEntityField), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.HasKey(x => x.Id); + b.Property(x => x.Name).IsRequired().HasMaxLength(100); + b.Property(x => x.Type).IsRequired().HasMaxLength(50); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.DefaultValue).HasMaxLength(256); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(ApiMigration), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.HasKey(x => x.Id); + b.Property(x => x.EntityName).IsRequired().HasMaxLength(100); + b.Property(x => x.FileName).IsRequired().HasMaxLength(200); + b.Property(x => x.SqlScript).IsRequired(); + b.Property(x => x.Status).IsRequired().HasMaxLength(50); + b.Property(x => x.ErrorMessage).HasMaxLength(1000); + + b.HasOne(x => x.Entity) + .WithMany() + .HasForeignKey(x => x.EntityId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(ApiEndpoint), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.HasKey(x => x.Id); + b.Property(x => x.EntityName).IsRequired().HasMaxLength(100); + b.Property(x => x.Method).IsRequired().HasMaxLength(10); + b.Property(x => x.Path).IsRequired().HasMaxLength(200); + b.Property(x => x.OperationType).IsRequired().HasMaxLength(50); + b.Property(x => x.CsharpCode).IsRequired(); + + b.HasOne(x => x.Entity) + .WithMany() + .HasForeignKey(x => x.EntityId) + .OnDelete(DeleteBehavior.Cascade); + }); + builder.Entity(b => { b.ToTable(Prefix.DbTableDefault + nameof(CustomEndpoint), Prefix.DbSchema); @@ -405,67 +648,98 @@ public class PlatformDbContext : b.Property(a => a.PermissionsJson).HasColumnType("text"); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(GlobalSearch), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefault + nameof(CustomComponent), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(a => a.System).HasMaxLength(50); - b.Property(a => a.Group).HasMaxLength(50); - b.Property(a => a.Term).IsRequired().HasMaxLength(256); - b.Property(a => a.Weight).HasMaxLength(50); - b.Property(a => a.Url).HasMaxLength(512); + b.HasKey(x => x.Id); + b.Property(x => x.Name).IsRequired().HasMaxLength(100); + b.Property(x => x.Code).IsRequired(); + b.Property(x => x.Props).HasMaxLength(1000); + b.Property(x => x.Description).HasMaxLength(500); + b.Property(x => x.Dependencies).HasMaxLength(2000); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(AiBot), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefault + nameof(ReportCategory), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(a => a.BotName).IsRequired().HasMaxLength(128); + b.Property(x => x.Name).IsRequired().HasMaxLength(256); + b.Property(x => x.Description).HasMaxLength(4000); // JSON string + b.Property(x => x.Icon).HasMaxLength(64); + + b.HasIndex(x => x.Name).IsUnique(); + + b.HasMany(x => x.ReportTemplates) + .WithOne(x => x.ReportCategory) + .HasForeignKey(x => x.CategoryName) + .HasPrincipalKey(c => c.Name) + .OnDelete(DeleteBehavior.SetNull); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Branch), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefault + nameof(ReportTemplate), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(a => a.TenantId).IsRequired(); - b.Property(a => a.Code).IsRequired().HasMaxLength(64); - b.Property(a => a.Name).IsRequired().HasMaxLength(128); - b.Property(a => a.VknTckn).IsRequired(); - b.Property(a => a.TaxOffice).HasMaxLength(128); - b.Property(a => a.Country).HasMaxLength(128); - b.Property(a => a.City).HasMaxLength(128); - b.Property(a => a.District).HasMaxLength(128); - b.Property(a => a.Street).HasMaxLength(256); - b.Property(a => a.Address).HasMaxLength(512); - b.Property(a => a.Address2).HasMaxLength(512); - b.Property(a => a.PostalCode).HasMaxLength(16); - b.Property(a => a.Phone).HasMaxLength(20); - b.Property(a => a.Mobile).IsRequired().HasMaxLength(20); - b.Property(a => a.Fax).HasMaxLength(20); - b.Property(a => a.Email).HasMaxLength(128); - b.Property(a => a.Website).HasMaxLength(128); - b.Property(a => a.IsActive).HasDefaultValue(true); + b.Property(x => x.Name).IsRequired().HasMaxLength(256); + b.Property(x => x.Description).HasMaxLength(1000); + b.Property(x => x.HtmlContent).IsRequired(); + b.Property(x => x.CategoryName).HasMaxLength(256); + b.Property(x => x.Tags).HasMaxLength(2000); - b.HasMany(x => x.Users) - .WithOne(x => x.Branch) - .HasForeignKey(x => x.BranchId) - .OnDelete(DeleteBehavior.Cascade); + b.HasMany(t => t.Parameters) + .WithOne(p => p.ReportTemplate) + .HasForeignKey(p => p.ReportTemplateId) + .OnDelete(DeleteBehavior.Cascade); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(BranchUsers), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefault + nameof(ReportParameter), Prefix.DbSchema); b.ConfigureByConvention(); - b.HasKey(x => new { x.UserId, x.BranchId }); - b.Property(a => a.UserId).IsRequired(); - b.Property(a => a.BranchId).IsRequired(); - b.Property(a => a.TenantId); + b.Property(x => x.ReportTemplateId).IsRequired(); + b.Property(x => x.Name).IsRequired().HasMaxLength(100); + b.Property(x => x.Placeholder).HasMaxLength(200); + b.Property(x => x.Type).IsRequired(); + b.Property(x => x.DefaultValue).HasMaxLength(500); + b.Property(x => x.Required).IsRequired(); + b.Property(x => x.Description).HasMaxLength(1000); }); + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(ReportGenerated), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.TemplateId).IsRequired(false); + b.Property(x => x.TemplateName).IsRequired().HasMaxLength(256); + b.Property(x => x.GeneratedContent).IsRequired(); + b.Property(x => x.Parameters).HasMaxLength(4000); // JSON string + b.Property(x => x.GeneratedAt).IsRequired(); + + b.HasOne(x => x.Template) + .WithMany() + .HasForeignKey(x => x.TemplateId) + .OnDelete(DeleteBehavior.SetNull) + .IsRequired(false); + }); + + //Administration + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefault + nameof(IpRestriction), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(a => a.ResourceType).IsRequired().HasMaxLength(10); + b.Property(a => a.ResourceId).HasMaxLength(32); + b.Property(a => a.IP).IsRequired().HasMaxLength(32); + }); + + // Definitions builder.Entity(b => { b.ToTable(Prefix.DbTableDefinition + nameof(Sector), Prefix.DbSchema); @@ -475,32 +749,22 @@ public class PlatformDbContext : b.Property(x => x.FullName).HasMaxLength(256); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(UomCategory), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefinition + nameof(ContactTag), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); - - b.HasIndex(x => x.Name).IsUnique(); + b.Property(x => x.Category).HasMaxLength(128); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(Uom), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefinition + nameof(ContactTitle), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Name).IsRequired().HasMaxLength(64); - b.Property(x => x.Type).IsRequired().HasConversion().HasMaxLength(32); - b.Property(x => x.Ratio).HasPrecision(18, 6); - b.Property(x => x.Rounding).HasPrecision(18, 6); - b.Property(x => x.UomCategoryId).IsRequired(); - - b.HasOne(x => x.UomCategory) - .WithMany(x => x.Uoms) - .HasPrincipalKey(x => x.Id) - .HasForeignKey(x => x.UomCategoryId) - .OnDelete(DeleteBehavior.Restrict); + b.Property(x => x.Title).IsRequired().HasMaxLength(128); + b.Property(x => x.Abbreviation).HasMaxLength(64); }); builder.Entity(b => @@ -516,48 +780,6 @@ public class PlatformDbContext : b.Property(x => x.LastUpdated); }); - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefinition + nameof(Bank), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.IdentifierCode).HasMaxLength(64); - b.Property(x => x.AddressLine1).HasMaxLength(256); - b.Property(x => x.AddressLine2).HasMaxLength(256); - b.Property(x => x.District).HasMaxLength(128); - b.Property(x => x.City).HasMaxLength(128); - b.Property(x => x.PostalCode).HasMaxLength(16); - b.Property(x => x.Country).HasMaxLength(128); - b.Property(x => x.Phone).HasMaxLength(64); - b.Property(x => x.Email).HasMaxLength(128); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefinition + nameof(BankAccount), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.AccountNumber).IsRequired().HasMaxLength(64); - b.Property(x => x.AccountOwner).IsRequired().HasMaxLength(256); - b.Property(x => x.Company).HasMaxLength(256); - - b.Property(x => x.BankId).IsRequired(); - b.Property(x => x.CurrencyId); - - b.HasOne(x => x.Bank) - .WithMany() - .HasPrincipalKey(x => x.Id) - .HasForeignKey(x => x.BankId) - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne(x => x.Currency) - .WithMany() - .HasPrincipalKey(x => x.Id) - .HasForeignKey(x => x.CurrencyId) - .OnDelete(DeleteBehavior.Restrict); - }); - builder.Entity(b => { b.ToTable(Prefix.DbTableDefinition + nameof(CountryGroup), Prefix.DbSchema); @@ -670,226 +892,488 @@ public class PlatformDbContext : b.Property(x => x.IsDefault).HasDefaultValue(false); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(ContactTag), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefinition + nameof(UomCategory), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.Category).HasMaxLength(128); + + b.HasIndex(x => x.Name).IsUnique(); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefinition + nameof(ContactTitle), Prefix.DbSchema); + b.ToTable(Prefix.DbTableDefinition + nameof(Uom), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(64); + b.Property(x => x.Type).IsRequired().HasConversion().HasMaxLength(32); + b.Property(x => x.Ratio).HasPrecision(18, 6); + b.Property(x => x.Rounding).HasPrecision(18, 6); + b.Property(x => x.UomCategoryId).IsRequired(); + + b.HasOne(x => x.UomCategory) + .WithMany(x => x.Uoms) + .HasPrincipalKey(x => x.Id) + .HasForeignKey(x => x.UomCategoryId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Bank), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + b.Property(x => x.IdentifierCode).HasMaxLength(64); + b.Property(x => x.AddressLine1).HasMaxLength(256); + b.Property(x => x.AddressLine2).HasMaxLength(256); + b.Property(x => x.District).HasMaxLength(128); + b.Property(x => x.City).HasMaxLength(128); + b.Property(x => x.PostalCode).HasMaxLength(16); + b.Property(x => x.Country).HasMaxLength(128); + b.Property(x => x.Phone).HasMaxLength(64); + b.Property(x => x.Email).HasMaxLength(128); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(BankAccount), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.AccountNumber).IsRequired().HasMaxLength(64); + b.Property(x => x.AccountOwner).IsRequired().HasMaxLength(256); + b.Property(x => x.Company).HasMaxLength(256); + + b.Property(x => x.BankId).IsRequired(); + b.Property(x => x.CurrencyId); + + b.HasOne(x => x.Bank) + .WithMany() + .HasPrincipalKey(x => x.Id) + .HasForeignKey(x => x.BankId) + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne(x => x.Currency) + .WithMany() + .HasPrincipalKey(x => x.Id) + .HasForeignKey(x => x.CurrencyId) + .OnDelete(DeleteBehavior.Restrict); + }); + + // School Management + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Schedule), Prefix.DbSchema); + b.ConfigureByConvention(); + + // Properties + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + b.Property(x => x.Status).HasMaxLength(20); + + b.Property(x => x.StartTime).HasMaxLength(5); + b.Property(x => x.EndTime).HasMaxLength(5); + + b.Property(x => x.LunchTime).HasMaxLength(5); + + // Relationships + b.HasMany(x => x.Lessons) + .WithOne(x => x.Schedule) + .HasForeignKey(x => x.ScheduleId) + .OnDelete(DeleteBehavior.Cascade); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(ScheduleLesson), Prefix.DbSchema); + b.ConfigureByConvention(); + + // Properties + b.Property(x => x.Day).HasMaxLength(20); + b.Property(x => x.StartTime).HasMaxLength(5); + b.Property(x => x.EndTime).HasMaxLength(5); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Program), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(100).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(RegistrationType), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + + // RegistrationType -> Methods (1 - N) + b.HasMany(x => x.Methods) + .WithOne(x => x.RegistrationType) + .HasForeignKey(x => x.RegistrationTypeId) + .OnDelete(DeleteBehavior.Cascade); + + // RegistrationType -> ClassTypes (1 - N) + b.HasMany(x => x.ClassTypes) + .WithOne(x => x.RegistrationType) + .HasForeignKey(x => x.RegistrationTypeId) + .OnDelete(DeleteBehavior.Cascade); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(RegistrationMethod), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(ClassType), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + b.Property(x => x.Status).HasMaxLength(20); + + // ClassType -> Class (1 - N) + b.HasMany(x => x.Classes) + .WithOne(x => x.ClassType) + .HasForeignKey(x => x.ClassTypeId) + .OnDelete(DeleteBehavior.Cascade); + + // ClassType -> Level (1 - N) + b.HasMany(x => x.Levels) + .WithOne(x => x.ClassType) + .HasForeignKey(x => x.ClassTypeId) + .OnDelete(DeleteBehavior.Cascade); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Class), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.ClassCode).IsRequired().HasMaxLength(64); + b.Property(x => x.Status).HasMaxLength(20); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Level), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.LevelType).HasMaxLength(15); + b.Property(x => x.LevelCode).HasMaxLength(50).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + b.Property(x => x.MonthlyPaymentRate).HasPrecision(18, 4); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Interesting), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Source), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(NoteType), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Behavior), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(EducationStatus), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(EventCategory), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(EventType), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Event), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(200); + b.Property(x => x.Place).HasMaxLength(200); + b.Property(x => x.Description).HasMaxLength(1000); + b.Property(x => x.Status).HasMaxLength(20); + + // EventCategory -> Event (1 - N) + b.HasOne(x => x.Category) + .WithMany(x => x.Events) + .HasForeignKey(x => x.CategoryId) + .OnDelete(DeleteBehavior.Cascade); + + // EventType -> Event (1 - N) + b.HasOne(x => x.Type) + .WithMany(x => x.Events) + .HasForeignKey(x => x.TypeId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(SalesRejectionReason), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Reason).HasMaxLength(50).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(ClassCancellationReason), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Reason).HasMaxLength(50).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(TransactionReason), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.Type).HasMaxLength(10).IsRequired(); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Information), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Type).HasMaxLength(50).IsRequired(); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(LessonPeriod), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.Day).HasMaxLength(10); + + b.Property(x => x.Lesson1).HasMaxLength(10); + b.Property(x => x.Lesson2).HasMaxLength(10); + b.Property(x => x.Lesson3).HasMaxLength(10); + b.Property(x => x.Lesson4).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(MeetingMethod), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.Type).HasMaxLength(50).IsRequired(); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(MeetingResult), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.OrderNo); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Disease), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Psychologist), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(100).IsRequired(); + b.Property(x => x.Phone).HasMaxLength(20); + b.Property(x => x.Email).HasMaxLength(100); + b.Property(x => x.Address).HasMaxLength(250); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Vaccine), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(100).IsRequired(); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Lawyer), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(100).IsRequired(); + b.Property(x => x.ContactPerson).HasMaxLength(50); + b.Property(x => x.Email).HasMaxLength(100); + b.Property(x => x.Address).HasMaxLength(250); + b.Property(x => x.City).HasMaxLength(50); + b.Property(x => x.TaxOffice).HasMaxLength(50); + b.Property(x => x.TaxNumber).HasMaxLength(20); + + b.Property(x => x.Phone1).HasMaxLength(20); + b.Property(x => x.Phone2).HasMaxLength(20); + b.Property(x => x.Phone3).HasMaxLength(20); + b.Property(x => x.Phone4).HasMaxLength(20); + b.Property(x => x.Fax).HasMaxLength(20); + + b.Property(x => x.Description).HasMaxLength(1000); + b.Property(x => x.Status).HasMaxLength(10); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Meal), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Date).IsRequired(); + b.Property(x => x.Breakfast).HasMaxLength(200); + b.Property(x => x.Lunch).HasMaxLength(200); + b.Property(x => x.Snack).HasMaxLength(200); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Document), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(80).IsRequired(); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(Vehicle), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Plate).HasMaxLength(10).IsRequired(); + b.Property(x => x.Brand).HasMaxLength(50); + b.Property(x => x.ModelYear); + + b.Property(x => x.DriverNationalId).HasMaxLength(11); + b.Property(x => x.DriverName).HasMaxLength(50); + b.Property(x => x.DriverPhone1).HasMaxLength(20); + b.Property(x => x.DriverPhone2).HasMaxLength(20); + + b.Property(x => x.AssistantDriverNationalId).HasMaxLength(11); + b.Property(x => x.AssistantDriverName).HasMaxLength(50); + b.Property(x => x.AssistantDriverPhone1).HasMaxLength(20); + b.Property(x => x.AssistantDriverPhone2).HasMaxLength(20); + + b.Property(x => x.Status).HasMaxLength(5); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableDefinition + nameof(WorkHour), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).HasMaxLength(50).IsRequired(); + b.Property(x => x.StartHour).HasMaxLength(8).IsRequired(); + b.Property(x => x.EndHour).HasMaxLength(8).IsRequired(); + + b.Property(x => x.IsFixed); + + b.Property(x => x.Monday); + b.Property(x => x.Tuesday); + b.Property(x => x.Wednesday); + b.Property(x => x.Thursday); + b.Property(x => x.Friday); + b.Property(x => x.Saturday); + b.Property(x => x.Sunday); + }); + + //Web Site + builder.Entity(b => + { + b.ToTable(Prefix.DbTableWeb + nameof(About), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.StatsJson).HasColumnType("text"); + b.Property(x => x.DescriptionsJson).HasColumnType("text"); + b.Property(x => x.SectionsJson).HasColumnType("text"); + }); + + builder.Entity(b => + { + b.ToTable(Prefix.DbTableWeb + nameof(Service), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Title).IsRequired().HasMaxLength(128); - b.Property(x => x.Abbreviation).HasMaxLength(64); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(BlogCategory), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.Slug).IsRequired().HasMaxLength(128); - b.Property(x => x.Description).HasMaxLength(512); - b.Property(x => x.Icon).HasMaxLength(128); - - b.HasIndex(x => x.Slug); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(BlogPost), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Title).IsRequired().HasMaxLength(256); - b.Property(x => x.Slug).IsRequired().HasMaxLength(256); - b.Property(x => x.Summary).IsRequired().HasMaxLength(512); - b.Property(x => x.ContentTr).IsRequired(); - b.Property(x => x.ContentEn).IsRequired(); - b.Property(x => x.CoverImage).HasMaxLength(512); - b.Property(x => x.ReadTime).HasMaxLength(64); - - b.HasIndex(x => x.Slug); - b.HasIndex(x => x.IsPublished); - b.HasIndex(x => x.PublishedAt); - - b.HasOne(x => x.Category) - .WithMany(x => x.Posts) - .HasForeignKey(x => x.CategoryId) - .OnDelete(DeleteBehavior.Restrict); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(ForumCategory), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Name).IsRequired().HasMaxLength(128); - b.Property(x => x.Slug).IsRequired().HasMaxLength(128); b.Property(x => x.Description).HasMaxLength(512); b.Property(x => x.Icon).HasMaxLength(64); - b.HasIndex(x => x.DisplayOrder); - - b.HasMany(x => x.Topics) - .WithOne(x => x.Category) - .HasForeignKey(x => x.CategoryId) - .OnDelete(DeleteBehavior.Restrict); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(ForumTopic), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Title).IsRequired().HasMaxLength(256); - b.Property(x => x.Content).IsRequired(); - b.Property(x => x.AuthorName).HasMaxLength(128); - b.Property(x => x.LastPostUserName).HasMaxLength(128); - - b.HasIndex(x => x.CategoryId); - b.HasIndex(x => x.IsPinned); - b.HasIndex(x => x.LastPostDate); - - b.HasMany(x => x.Posts) - .WithOne(x => x.Topic) - .HasForeignKey(x => x.TopicId) - .OnDelete(DeleteBehavior.Cascade); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(ForumPost), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Content).IsRequired(); - b.Property(x => x.AuthorName).HasMaxLength(128); - - b.HasIndex(x => x.TopicId); - - b.HasOne(x => x.Topic) - .WithMany(x => x.Posts) - .HasForeignKey(x => x.TopicId) - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne(x => x.ParentPost) - .WithMany(x => x.Replies) - .HasForeignKey(x => x.ParentPostId) - .OnDelete(DeleteBehavior.Restrict); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(Route), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.HasIndex(x => x.Key).IsUnique(); - - b.Property(x => x.Key).IsRequired().HasMaxLength(128); - b.Property(x => x.Path).IsRequired().HasMaxLength(256); - b.Property(x => x.ComponentPath).IsRequired().HasMaxLength(256); - b.Property(x => x.RouteType).HasMaxLength(64); - - b.Property(x => x.Authority).HasConversion( - v => string.Join(",", v), - v => v.Split(',', StringSplitOptions.RemoveEmptyEntries) - ).Metadata.SetValueComparer( - new ValueComparer( - (c1, c2) => c1.SequenceEqual(c2), - c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())), - c => c.ToArray() - ) - ); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(CustomEntity), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.HasKey(x => x.Id); - b.Property(x => x.Name).IsRequired().HasMaxLength(100); - b.Property(x => x.DisplayName).IsRequired().HasMaxLength(100); - b.Property(x => x.TableName).IsRequired().HasMaxLength(100); - b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.MigrationStatus).IsRequired().HasMaxLength(50); - b.Property(x => x.EndpointStatus).IsRequired().HasMaxLength(50); - - b.HasMany(x => x.Fields) - .WithOne(x => x.Entity) - .HasForeignKey(x => x.EntityId) - .OnDelete(DeleteBehavior.Cascade); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(CustomEntityField), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.HasKey(x => x.Id); - b.Property(x => x.Name).IsRequired().HasMaxLength(100); - b.Property(x => x.Type).IsRequired().HasMaxLength(50); - b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.DefaultValue).HasMaxLength(256); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(ApiMigration), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.HasKey(x => x.Id); - b.Property(x => x.EntityName).IsRequired().HasMaxLength(100); - b.Property(x => x.FileName).IsRequired().HasMaxLength(200); - b.Property(x => x.SqlScript).IsRequired(); - b.Property(x => x.Status).IsRequired().HasMaxLength(50); - b.Property(x => x.ErrorMessage).HasMaxLength(1000); - - b.HasOne(x => x.Entity) - .WithMany() - .HasForeignKey(x => x.EntityId) - .OnDelete(DeleteBehavior.Restrict); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(ApiEndpoint), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.HasKey(x => x.Id); - b.Property(x => x.EntityName).IsRequired().HasMaxLength(100); - b.Property(x => x.Method).IsRequired().HasMaxLength(10); - b.Property(x => x.Path).IsRequired().HasMaxLength(200); - b.Property(x => x.OperationType).IsRequired().HasMaxLength(50); - b.Property(x => x.CsharpCode).IsRequired(); - - b.HasOne(x => x.Entity) - .WithMany() - .HasForeignKey(x => x.EntityId) - .OnDelete(DeleteBehavior.Cascade); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(CustomComponent), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.HasKey(x => x.Id); - b.Property(x => x.Name).IsRequired().HasMaxLength(100); - b.Property(x => x.Code).IsRequired(); - b.Property(x => x.Props).HasMaxLength(1000); - b.Property(x => x.Description).HasMaxLength(500); - b.Property(x => x.Dependencies).HasMaxLength(2000); + b.Property(x => x.Features) + .HasConversion( + v => JsonSerializer.Serialize(v, (JsonSerializerOptions)null), + v => JsonSerializer.Deserialize(v, (JsonSerializerOptions)null) + ) + .Metadata + .SetValueComparer( + new ValueComparer( + (a, b) => a.SequenceEqual(b), + a => a.Aggregate(0, (c, v) => HashCode.Combine(c, v.GetHashCode())), + a => a.ToArray() + ) + ); }); builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Product), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(Product), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -903,7 +1387,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(PaymentMethod), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(PaymentMethod), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -914,7 +1398,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(InstallmentOption), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(InstallmentOption), Prefix.DbSchema); b.ConfigureByConvention(); b.HasKey(x => x.Id); @@ -924,7 +1408,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Order), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(Order), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(o => o.OrganizationName).HasMaxLength(128); @@ -955,7 +1439,7 @@ public class PlatformDbContext : builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(OrderItem), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(OrderItem), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(i => i.ProductName).IsRequired().HasMaxLength(128); @@ -963,76 +1447,45 @@ public class PlatformDbContext : b.Property(i => i.TotalPrice).IsRequired().HasPrecision(18, 2); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ReportCategory), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(BlogCategory), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Name).IsRequired().HasMaxLength(256); - b.Property(x => x.Description).HasMaxLength(4000); // JSON string - b.Property(x => x.Icon).HasMaxLength(64); + b.Property(x => x.Name).IsRequired().HasMaxLength(128); + b.Property(x => x.Slug).IsRequired().HasMaxLength(128); + b.Property(x => x.Description).HasMaxLength(512); + b.Property(x => x.Icon).HasMaxLength(128); - b.HasIndex(x => x.Name).IsUnique(); - - b.HasMany(x => x.ReportTemplates) - .WithOne(x => x.ReportCategory) - .HasForeignKey(x => x.CategoryName) - .HasPrincipalKey(c => c.Name) - .OnDelete(DeleteBehavior.SetNull); + b.HasIndex(x => x.Slug); }); - builder.Entity(b => + builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(ReportTemplate), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(BlogPost), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.Name).IsRequired().HasMaxLength(256); - b.Property(x => x.Description).HasMaxLength(1000); - b.Property(x => x.HtmlContent).IsRequired(); - b.Property(x => x.CategoryName).HasMaxLength(256); - b.Property(x => x.Tags).HasMaxLength(2000); + b.Property(x => x.Title).IsRequired().HasMaxLength(256); + b.Property(x => x.Slug).IsRequired().HasMaxLength(256); + b.Property(x => x.Summary).IsRequired().HasMaxLength(512); + b.Property(x => x.ContentTr).IsRequired(); + b.Property(x => x.ContentEn).IsRequired(); + b.Property(x => x.CoverImage).HasMaxLength(512); + b.Property(x => x.ReadTime).HasMaxLength(64); - b.HasMany(t => t.Parameters) - .WithOne(p => p.ReportTemplate) - .HasForeignKey(p => p.ReportTemplateId) - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasIndex(x => x.Slug); + b.HasIndex(x => x.IsPublished); + b.HasIndex(x => x.PublishedAt); - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(ReportParameter), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.ReportTemplateId).IsRequired(); - b.Property(x => x.Name).IsRequired().HasMaxLength(100); - b.Property(x => x.Placeholder).HasMaxLength(200); - b.Property(x => x.Type).IsRequired(); - b.Property(x => x.DefaultValue).HasMaxLength(500); - b.Property(x => x.Required).IsRequired(); - b.Property(x => x.Description).HasMaxLength(1000); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(ReportGenerated), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.TemplateId).IsRequired(false); - b.Property(x => x.TemplateName).IsRequired().HasMaxLength(256); - b.Property(x => x.GeneratedContent).IsRequired(); - b.Property(x => x.Parameters).HasMaxLength(4000); // JSON string - b.Property(x => x.GeneratedAt).IsRequired(); - - b.HasOne(x => x.Template) - .WithMany() - .HasForeignKey(x => x.TemplateId) - .OnDelete(DeleteBehavior.SetNull) - .IsRequired(false); + b.HasOne(x => x.Category) + .WithMany(x => x.Posts) + .HasForeignKey(x => x.CategoryId) + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Demo), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(Demo), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.OrganizationName).IsRequired().HasMaxLength(256); @@ -1045,43 +1498,9 @@ public class PlatformDbContext : b.Property(x => x.Message).IsRequired().HasMaxLength(2000); }); - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(Service), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.Title).IsRequired().HasMaxLength(128); - b.Property(x => x.Description).HasMaxLength(512); - b.Property(x => x.Icon).HasMaxLength(64); - - b.Property(x => x.Features) - .HasConversion( - v => JsonSerializer.Serialize(v, (JsonSerializerOptions)null), - v => JsonSerializer.Deserialize(v, (JsonSerializerOptions)null) - ) - .Metadata - .SetValueComparer( - new ValueComparer( - (a, b) => a.SequenceEqual(b), - a => a.Aggregate(0, (c, v) => HashCode.Combine(c, v.GetHashCode())), - a => a.ToArray() - ) - ); - }); - - builder.Entity(b => - { - b.ToTable(Prefix.DbTableDefault + nameof(About), Prefix.DbSchema); - b.ConfigureByConvention(); - - b.Property(x => x.StatsJson).HasColumnType("text"); - b.Property(x => x.DescriptionsJson).HasColumnType("text"); - b.Property(x => x.SectionsJson).HasColumnType("text"); - }); - builder.Entity(b => { - b.ToTable(Prefix.DbTableDefault + nameof(Contact), Prefix.DbSchema); + b.ToTable(Prefix.DbTableWeb + nameof(Contact), Prefix.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Address).HasMaxLength(500); @@ -1095,6 +1514,7 @@ public class PlatformDbContext : b.Property(x => x.MapJson).HasColumnType("text"); }); + //Coordinator builder.Entity(b => { b.ToTable(Prefix.DbTableDefault + nameof(Classroom), Prefix.DbSchema); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003092426_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003180537_Initial.Designer.cs similarity index 78% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003092426_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003180537_Initial.Designer.cs index 581b5119..78abfc9d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003092426_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003180537_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251003092426_Initial")] + [Migration("20251003180537_Initial")] partial class Initial { /// @@ -27,104 +27,6 @@ namespace Kurs.Platform.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("ContactTag", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Category") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.ToTable("DContactTag", (string)null); - }); - - modelBuilder.Entity("ContactTitle", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Abbreviation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.ToTable("DContactTitle", (string)null); - }); - modelBuilder.Entity("Kurs.Languages.Entities.Language", b => { b.Property("Id") @@ -720,7 +622,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PAbout", (string)null); + b.ToTable("WAbout", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b => @@ -1096,6 +998,55 @@ namespace Kurs.Platform.Migrations b.ToTable("DBankAccount", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Behavior", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DBehavior", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b => { b.Property("Id") @@ -1166,7 +1117,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("PBlogCategory", (string)null); + b.ToTable("WBlogCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => @@ -1270,7 +1221,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("PBlogPost", (string)null); + b.ToTable("WBlogPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => @@ -1418,11 +1369,13 @@ namespace Kurs.Platform.Migrations .HasMaxLength(16) .HasColumnType("nvarchar(16)"); - b.Property("CountryCode") - .IsRequired() + b.Property("Country") .HasMaxLength(8) .HasColumnType("nvarchar(8)"); + b.Property("CountryId") + .HasColumnType("uniqueidentifier"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -1464,12 +1417,196 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.HasIndex("CountryCode", "Code") - .IsUnique(); + b.HasIndex("CountryId"); + + b.HasIndex("Country", "Code") + .IsUnique() + .HasFilter("[Country] IS NOT NULL"); b.ToTable("DCity", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Class", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClassTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ClassTypeId"); + + b.ToTable("DClass", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassCancellationReason", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DClassCancellationReason", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxStudentCount") + .HasColumnType("int"); + + b.Property("MinStudentCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("RegistrationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RegistrationTypeId"); + + b.ToTable("DClassType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => { b.Property("Id") @@ -1860,7 +1997,105 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PContact", (string)null); + b.ToTable("WContact", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ContactTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("DContactTag", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ContactTitle", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Abbreviation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("DContactTitle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Country", b => @@ -2485,7 +2720,56 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PDemo", (string)null); + b.ToTable("WDemo", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Disease", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DDisease", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.District", b => @@ -2493,12 +2777,15 @@ namespace Kurs.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CityCode") + b.Property("City") .IsRequired() .HasMaxLength(16) .HasColumnType("nvarchar(16)"); - b.Property("CountryCode") + b.Property("CityId") + .HasColumnType("uniqueidentifier"); + + b.Property("Country") .HasMaxLength(8) .HasColumnType("nvarchar(8)"); @@ -2551,13 +2838,255 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.HasIndex("CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode") + b.HasIndex("CityId"); + + b.HasIndex("Country", "City", "Name", "Township", "Street", "ZipCode") .IsUnique() - .HasFilter("[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); + .HasFilter("[Country] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); b.ToTable("DDistrict", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Document", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("nvarchar(80)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DDocument", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OrderNo") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DEducationStatus", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Event", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.HasIndex("TypeId"); + + b.ToTable("DEvent", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DEventCategory", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DEventType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b => { b.Property("Id") @@ -2596,6 +3125,55 @@ namespace Kurs.Platform.Migrations b.ToTable("PGlobalSearch", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Information", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("DInformation", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b => { b.Property("Id") @@ -2615,7 +3193,60 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PInstallmentOption", (string)null); + b.ToTable("WInstallmentOption", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Interesting", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DInteresting", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.IpRestriction", b => @@ -2676,6 +3307,250 @@ namespace Kurs.Platform.Migrations b.ToTable("PIpRestriction", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Lawyer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("City") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContactPerson") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Fax") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Phone1") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Phone2") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Phone3") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Phone4") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TaxNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TaxOffice") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DLawyer", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Day") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lesson1") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Lesson2") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Lesson3") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Lesson4") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DLessonPeriod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LessonCount") + .HasColumnType("int"); + + b.Property("LessonDuration") + .HasColumnType("int"); + + b.Property("LevelCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LevelType") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("MonthlyPaymentRate") + .HasColumnType("decimal(18,2)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ClassTypeId"); + + b.ToTable("DLevel", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ListForm", b => { b.Property("Id") @@ -3324,6 +4199,177 @@ namespace Kurs.Platform.Migrations b.ToTable("PListFormImportExecute", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Breakfast") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lunch") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Snack") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DMeal", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Flag") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("DMeetingMethod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.MeetingResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OrderNo") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DMeetingResult", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Menu", b => { b.Property("Id") @@ -3420,6 +4466,25 @@ namespace Kurs.Platform.Migrations b.ToTable("PMenu", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.NoteType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DNoteType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Order", b => { b.Property("Id") @@ -3545,7 +4610,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("POrder", (string)null); + b.ToTable("WOrder", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => @@ -3610,7 +4675,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("OrderId"); - b.ToTable("POrderItem", (string)null); + b.ToTable("WOrderItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b => @@ -3633,7 +4698,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PPaymentMethod", (string)null); + b.ToTable("WPaymentMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Product", b => @@ -3705,7 +4770,244 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PProduct", (string)null); + b.ToTable("WProduct", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Program", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DProgram", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Psychologist", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Phone") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DPsychologist", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RegistrationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RegistrationTypeId"); + + b.ToTable("DRegistrationMethod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DRegistrationType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => @@ -4022,6 +5324,236 @@ namespace Kurs.Platform.Migrations b.ToTable("PRoute", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.SalesRejectionReason", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DSalesRejectionReason", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Friday") + .HasColumnType("bit"); + + b.Property("IncludeLunch") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LessonBreakMinute") + .HasColumnType("int"); + + b.Property("LessonCount") + .HasColumnType("int"); + + b.Property("LessonMinute") + .HasColumnType("int"); + + b.Property("LunchMinute") + .HasColumnType("int"); + + b.Property("LunchTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Monday") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Saturday") + .HasColumnType("bit"); + + b.Property("StartTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Sunday") + .HasColumnType("bit"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Thursday") + .HasColumnType("bit"); + + b.Property("Tuesday") + .HasColumnType("bit"); + + b.Property("Wednesday") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("DSchedule", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Day") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LessonBreakMinute") + .HasColumnType("int"); + + b.Property("LessonMinute") + .HasColumnType("int"); + + b.Property("LessonNo") + .HasColumnType("int"); + + b.Property("ScheduleId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ScheduleId"); + + b.ToTable("DScheduleLesson", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Sector", b => { b.Property("Id") @@ -4131,7 +5663,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PService", (string)null); + b.ToTable("WService", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => @@ -4292,6 +5824,87 @@ namespace Kurs.Platform.Migrations b.ToTable("DSkillType", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Source", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DSource", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.TransactionReason", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("Id"); + + b.ToTable("DTransactionReason", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => { b.Property("Id") @@ -4406,6 +6019,230 @@ namespace Kurs.Platform.Migrations b.ToTable("DUomCategory", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Vaccine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DVaccine", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Vehicle", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssistantDriverName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AssistantDriverNationalId") + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("AssistantDriverPhone1") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("AssistantDriverPhone2") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Brand") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DriverName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DriverNationalId") + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("DriverPhone1") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("DriverPhone2") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ModelYear") + .HasColumnType("int"); + + b.Property("Plate") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Status") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DVehicle", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.WorkHour", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHour") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("Friday") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Monday") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Saturday") + .HasColumnType("bit"); + + b.Property("StartHour") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("Sunday") + .HasColumnType("bit"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Thursday") + .HasColumnType("bit"); + + b.Property("Tuesday") + .HasColumnType("bit"); + + b.Property("Wednesday") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("DWorkHour", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", b => { b.Property("Id") @@ -6693,14 +8530,31 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.City", b => { - b.HasOne("Kurs.Platform.Entities.Country", "Country") + b.HasOne("Kurs.Platform.Entities.Country", null) .WithMany("Cities") - .HasForeignKey("CountryCode") - .HasPrincipalKey("Code") + .HasForeignKey("CountryId"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Class", b => + { + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") + .WithMany("Classes") + .HasForeignKey("ClassTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("Country"); + b.Navigation("ClassType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => + { + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") + .WithMany("ClassTypes") + .HasForeignKey("RegistrationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RegistrationType"); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", b => @@ -6758,13 +8612,39 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.District", b => { - b.HasOne("Kurs.Platform.Entities.City", "City") + b.HasOne("Kurs.Platform.Entities.City", null) .WithMany("Districts") - .HasForeignKey("CountryCode", "CityCode") - .HasPrincipalKey("CountryCode", "Code") - .OnDelete(DeleteBehavior.Cascade); + .HasForeignKey("CityId"); + }); - b.Navigation("City"); + modelBuilder.Entity("Kurs.Platform.Entities.Event", b => + { + b.HasOne("Kurs.Platform.Entities.EventCategory", "Category") + .WithMany("Events") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Kurs.Platform.Entities.EventType", "Type") + .WithMany("Events") + .HasForeignKey("TypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("Type"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => + { + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") + .WithMany("Levels") + .HasForeignKey("ClassTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClassType"); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => @@ -6817,6 +8697,17 @@ namespace Kurs.Platform.Migrations b.Navigation("Order"); }); + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => + { + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") + .WithMany("Methods") + .HasForeignKey("RegistrationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RegistrationType"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => { b.HasOne("Kurs.Platform.Entities.ReportTemplate", "Template") @@ -6849,6 +8740,17 @@ namespace Kurs.Platform.Migrations b.Navigation("ReportCategory"); }); + modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => + { + b.HasOne("Kurs.Platform.Entities.Schedule", "Schedule") + .WithMany("Lessons") + .HasForeignKey("ScheduleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Schedule"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => { b.HasOne("Kurs.Platform.Entities.SkillType", "SkillType") @@ -7088,6 +8990,13 @@ namespace Kurs.Platform.Migrations b.Navigation("Districts"); }); + modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => + { + b.Navigation("Classes"); + + b.Navigation("Levels"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => { b.Navigation("AttendanceRecords"); @@ -7107,11 +9016,28 @@ namespace Kurs.Platform.Migrations b.Navigation("Fields"); }); + modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => + { + b.Navigation("Events"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => + { + b.Navigation("Events"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Order", b => { b.Navigation("Items"); }); + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.Navigation("ClassTypes"); + + b.Navigation("Methods"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => { b.Navigation("ReportTemplates"); @@ -7122,6 +9048,11 @@ namespace Kurs.Platform.Migrations b.Navigation("Parameters"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.Navigation("Lessons"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => { b.Navigation("Levels"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003092426_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003180537_Initial.cs similarity index 78% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003092426_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003180537_Initial.cs index d96f9e14..1e490526 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003092426_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003180537_Initial.cs @@ -441,10 +441,10 @@ namespace Kurs.Platform.Migrations IdentifierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AddressLine1 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), AddressLine2 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), @@ -460,6 +460,47 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_DBank", x => x.Id); }); + migrationBuilder.CreateTable( + name: "DBehavior", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DBehavior", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DClassCancellationReason", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Reason = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DClassCancellationReason", x => x.Id); + }); + migrationBuilder.CreateTable( name: "DContactTag", columns: table => new @@ -544,6 +585,406 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_DCurrency", x => x.Id); }); + migrationBuilder.CreateTable( + name: "DDisease", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DDisease", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DDocument", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(80)", maxLength: 80, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DDocument", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DEducationStatus", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + OrderNo = table.Column(type: "smallint", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DEducationStatus", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DEventCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DEventCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DEventType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DEventType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DInformation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DInformation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DInteresting", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DInteresting", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DLawyer", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + ContactPerson = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Address = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + City = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TaxOffice = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TaxNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone3 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Phone4 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Fax = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DLawyer", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DLessonPeriod", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Day = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson1 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson2 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson3 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + Lesson4 = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DLessonPeriod", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DMeal", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Date = table.Column(type: "datetime2", nullable: false), + Breakfast = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Lunch = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Snack = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DMeal", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DMeetingMethod", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Flag = table.Column(type: "bit", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DMeetingMethod", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DMeetingResult", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + OrderNo = table.Column(type: "smallint", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DMeetingResult", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DNoteType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DNoteType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DProgram", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DProgram", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DPsychologist", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Address = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DPsychologist", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DRegistrationType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DRegistrationType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DSalesRejectionReason", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Reason = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DSalesRejectionReason", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DSchedule", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + StartTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + EndTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + LessonMinute = table.Column(type: "int", nullable: false), + LessonBreakMinute = table.Column(type: "int", nullable: false), + LessonCount = table.Column(type: "int", nullable: false), + LunchTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + LunchMinute = table.Column(type: "int", nullable: true), + IncludeLunch = table.Column(type: "bit", nullable: true), + Monday = table.Column(type: "bit", nullable: true), + Tuesday = table.Column(type: "bit", nullable: true), + Wednesday = table.Column(type: "bit", nullable: true), + Thursday = table.Column(type: "bit", nullable: true), + Friday = table.Column(type: "bit", nullable: true), + Saturday = table.Column(type: "bit", nullable: true), + Sunday = table.Column(type: "bit", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DSchedule", x => x.Id); + }); + migrationBuilder.CreateTable( name: "DSector", columns: table => new @@ -583,6 +1024,42 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_DSkillType", x => x.Id); }); + migrationBuilder.CreateTable( + name: "DSource", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DSource", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DTransactionReason", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Type = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DTransactionReason", x => x.Id); + }); + migrationBuilder.CreateTable( name: "DUomCategory", columns: table => new @@ -602,6 +1079,87 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_DUomCategory", x => x.Id); }); + migrationBuilder.CreateTable( + name: "DVaccine", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DVaccine", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DVehicle", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Plate = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + Brand = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ModelYear = table.Column(type: "int", nullable: true), + DriverNationalId = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), + DriverName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DriverPhone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + DriverPhone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + AssistantDriverNationalId = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true), + AssistantDriverName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + AssistantDriverPhone1 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + AssistantDriverPhone2 = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + Status = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DVehicle", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "DWorkHour", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + StartHour = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + EndHour = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + IsFixed = table.Column(type: "bit", nullable: true), + Monday = table.Column(type: "bit", nullable: true), + Tuesday = table.Column(type: "bit", nullable: true), + Wednesday = table.Column(type: "bit", nullable: true), + Thursday = table.Column(type: "bit", nullable: true), + Friday = table.Column(type: "bit", nullable: true), + Saturday = table.Column(type: "bit", nullable: true), + Sunday = table.Column(type: "bit", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DWorkHour", x => x.Id); + }); + migrationBuilder.CreateTable( name: "OpenIddictApplications", columns: table => new @@ -665,28 +1223,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_OpenIddictScopes", x => x.Id); }); - migrationBuilder.CreateTable( - name: "PAbout", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - StatsJson = table.Column(type: "text", nullable: true), - DescriptionsJson = table.Column(type: "text", nullable: true), - SectionsJson = table.Column(type: "text", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PAbout", x => x.Id); - }); - migrationBuilder.CreateTable( name: "PAiBot", columns: table => new @@ -751,32 +1287,6 @@ namespace Kurs.Platform.Migrations table.UniqueConstraint("AK_PBackgroundWorker_MailQueueTableFormat_TableName", x => x.TableName); }); - migrationBuilder.CreateTable( - name: "PBlogCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Slug = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Icon = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - DisplayOrder = table.Column(type: "int", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - PostCount = table.Column(type: "int", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PBlogCategory", x => x.Id); - }); - migrationBuilder.CreateTable( name: "PBranch", columns: table => new @@ -844,33 +1354,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_PClassroom", x => x.Id); }); - migrationBuilder.CreateTable( - name: "PContact", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Address = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), - Phone = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Email = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), - Location = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), - TaxNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - BankJson = table.Column(type: "text", nullable: true), - WorkHoursJson = table.Column(type: "text", nullable: true), - MapJson = table.Column(type: "text", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PContact", x => x.Id); - }); - migrationBuilder.CreateTable( name: "PCustomComponent", columns: table => new @@ -973,33 +1456,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_PDataSource", x => x.Id); }); - migrationBuilder.CreateTable( - name: "PDemo", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - OrganizationName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - FullName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - NumberOfBranches = table.Column(type: "int", nullable: false), - NumberOfUsers = table.Column(type: "int", nullable: false), - Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PDemo", x => x.Id); - }); - migrationBuilder.CreateTable( name: "PForumCategory", columns: table => new @@ -1050,20 +1506,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_PGlobalSearch", x => x.Id); }); - migrationBuilder.CreateTable( - name: "PInstallmentOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Installment = table.Column(type: "int", nullable: false), - Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PInstallmentOption", x => x.Id); - }); - migrationBuilder.CreateTable( name: "PIpRestriction", columns: table => new @@ -1283,87 +1725,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_PNotificationRule", x => x.Id); }); - migrationBuilder.CreateTable( - name: "POrder", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - OrganizationName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Founder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - VknTckn = table.Column(type: "bigint", nullable: false), - TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - Phone = table.Column(type: "bigint", nullable: false), - Mobile = table.Column(type: "bigint", nullable: false), - Fax = table.Column(type: "bigint", nullable: false), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Subtotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Commission = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Total = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - PaymentMethod = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Installments = table.Column(type: "int", nullable: true), - InstallmentName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - PaymentDataJson = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_POrder", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PPaymentMethod", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), - Logo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PPaymentMethod", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "PProduct", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Order = table.Column(type: "int", nullable: false), - MonthlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - YearlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - IsQuantityBased = table.Column(type: "bit", nullable: false), - ImageUrl = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PProduct", x => x.Id); - }); - migrationBuilder.CreateTable( name: "PReportCategory", columns: table => new @@ -1409,30 +1770,6 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_PRoute", x => x.Id); }); - migrationBuilder.CreateTable( - name: "PService", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Type = table.Column(type: "nvarchar(max)", nullable: true), - Features = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PService", x => x.Id); - }); - migrationBuilder.CreateTable( name: "PSettingDefinition", columns: table => new @@ -1465,6 +1802,227 @@ namespace Kurs.Platform.Migrations table.PrimaryKey("PK_PSettingDefinition", x => x.Id); }); + migrationBuilder.CreateTable( + name: "WAbout", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + StatsJson = table.Column(type: "text", nullable: true), + DescriptionsJson = table.Column(type: "text", nullable: true), + SectionsJson = table.Column(type: "text", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WAbout", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WBlogCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Slug = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Icon = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + DisplayOrder = table.Column(type: "int", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + PostCount = table.Column(type: "int", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WBlogCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WContact", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Address = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + Phone = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Email = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), + Location = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), + TaxNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + BankJson = table.Column(type: "text", nullable: true), + WorkHoursJson = table.Column(type: "text", nullable: true), + MapJson = table.Column(type: "text", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WContact", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WDemo", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + OrganizationName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + FullName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Phone = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + NumberOfBranches = table.Column(type: "int", nullable: false), + NumberOfUsers = table.Column(type: "int", nullable: false), + Message = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WDemo", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WInstallmentOption", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Installment = table.Column(type: "int", nullable: false), + Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_WInstallmentOption", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WOrder", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + OrganizationName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Founder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + VknTckn = table.Column(type: "bigint", nullable: false), + TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Phone = table.Column(type: "bigint", nullable: false), + Mobile = table.Column(type: "bigint", nullable: false), + Fax = table.Column(type: "bigint", nullable: false), + Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Subtotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + Commission = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + Total = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + PaymentMethod = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Installments = table.Column(type: "int", nullable: true), + InstallmentName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + PaymentDataJson = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WOrder", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WPaymentMethod", + columns: table => new + { + Id = table.Column(type: "nvarchar(450)", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), + Logo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WPaymentMethod", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WProduct", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Order = table.Column(type: "int", nullable: false), + MonthlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + YearlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), + IsQuantityBased = table.Column(type: "bit", nullable: false), + ImageUrl = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WProduct", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WService", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Type = table.Column(type: "nvarchar(max)", nullable: true), + Features = table.Column(type: "nvarchar(max)", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WService", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpAuditLogActions", columns: table => new @@ -1721,7 +2279,6 @@ namespace Kurs.Platform.Migrations constraints: table => { table.PrimaryKey("PK_DCountry", x => x.Id); - table.UniqueConstraint("AK_DCountry_Code", x => x.Code); table.ForeignKey( name: "FK_DCountry_DCountryGroup_GroupName", column: x => x.GroupName, @@ -1766,6 +2323,136 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "DEvent", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + TypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Place = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DEvent", x => x.Id); + table.ForeignKey( + name: "FK_DEvent_DEventCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "DEventCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_DEvent_DEventType_TypeId", + column: x => x.TypeId, + principalTable: "DEventType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "DClassType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + RegistrationTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + MinStudentCount = table.Column(type: "int", nullable: true), + MaxStudentCount = table.Column(type: "int", nullable: true), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DClassType", x => x.Id); + table.ForeignKey( + name: "FK_DClassType_DRegistrationType_RegistrationTypeId", + column: x => x.RegistrationTypeId, + principalTable: "DRegistrationType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "DRegistrationMethod", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + RegistrationTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DRegistrationMethod", x => x.Id); + table.ForeignKey( + name: "FK_DRegistrationMethod_DRegistrationType_RegistrationTypeId", + column: x => x.RegistrationTypeId, + principalTable: "DRegistrationType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "DScheduleLesson", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + ScheduleId = table.Column(type: "uniqueidentifier", nullable: false), + Day = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + LessonNo = table.Column(type: "int", nullable: true), + StartTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + EndTime = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: true), + LessonMinute = table.Column(type: "int", nullable: true), + LessonBreakMinute = table.Column(type: "int", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DScheduleLesson", x => x.Id); + table.ForeignKey( + name: "FK_DScheduleLesson_DSchedule_ScheduleId", + column: x => x.ScheduleId, + principalTable: "DSchedule", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "DSkill", columns: table => new @@ -1912,45 +2599,6 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "PBlogPost", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ContentTr = table.Column(type: "nvarchar(max)", nullable: false), - ContentEn = table.Column(type: "nvarchar(max)", nullable: false), - Summary = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - CoverImage = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - ReadTime = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - AuthorId = table.Column(type: "uniqueidentifier", nullable: false), - ViewCount = table.Column(type: "int", nullable: true), - LikeCount = table.Column(type: "int", nullable: true), - CommentCount = table.Column(type: "int", nullable: true), - IsPublished = table.Column(type: "bit", nullable: false), - PublishedAt = table.Column(type: "datetime2", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_PBlogPost", x => x.Id); - table.ForeignKey( - name: "FK_PBlogPost_PBlogCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "PBlogCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "PBranchUsers", columns: table => new @@ -2384,36 +3032,6 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "POrderItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - OrderId = table.Column(type: "uniqueidentifier", nullable: false), - ProductId = table.Column(type: "uniqueidentifier", nullable: false), - ProductName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - BillingCycle = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Quantity = table.Column(type: "int", nullable: false), - TotalPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_POrderItem", x => x.Id); - table.ForeignKey( - name: "FK_POrderItem_POrder_OrderId", - column: x => x.OrderId, - principalTable: "POrder", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "PReportTemplate", columns: table => new @@ -2443,6 +3061,75 @@ namespace Kurs.Platform.Migrations onDelete: ReferentialAction.SetNull); }); + migrationBuilder.CreateTable( + name: "WBlogPost", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ContentTr = table.Column(type: "nvarchar(max)", nullable: false), + ContentEn = table.Column(type: "nvarchar(max)", nullable: false), + Summary = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + CoverImage = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + ReadTime = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + AuthorId = table.Column(type: "uniqueidentifier", nullable: false), + ViewCount = table.Column(type: "int", nullable: true), + LikeCount = table.Column(type: "int", nullable: true), + CommentCount = table.Column(type: "int", nullable: true), + IsPublished = table.Column(type: "bit", nullable: false), + PublishedAt = table.Column(type: "datetime2", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WBlogPost", x => x.Id); + table.ForeignKey( + name: "FK_WBlogPost_WBlogCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "WBlogCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "WOrderItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + OrderId = table.Column(type: "uniqueidentifier", nullable: false), + ProductId = table.Column(type: "uniqueidentifier", nullable: false), + ProductName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + BillingCycle = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Quantity = table.Column(type: "int", nullable: false), + TotalPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_WOrderItem", x => x.Id); + table.ForeignKey( + name: "FK_WOrderItem_WOrder_OrderId", + column: x => x.OrderId, + principalTable: "WOrder", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "AbpEntityPropertyChanges", columns: table => new @@ -2471,10 +3158,11 @@ namespace Kurs.Platform.Migrations columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), - CountryCode = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), + Country = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Code = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), PlateCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + CountryId = table.Column(type: "uniqueidentifier", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -2486,12 +3174,71 @@ namespace Kurs.Platform.Migrations constraints: table => { table.PrimaryKey("PK_DCity", x => x.Id); - table.UniqueConstraint("AK_DCity_CountryCode_Code", x => new { x.CountryCode, x.Code }); table.ForeignKey( - name: "FK_DCity_DCountry_CountryCode", - column: x => x.CountryCode, + name: "FK_DCity_DCountry_CountryId", + column: x => x.CountryId, principalTable: "DCountry", - principalColumn: "Code", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "DClass", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: true), + ClassTypeId = table.Column(type: "uniqueidentifier", nullable: false), + ClassCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DClass", x => x.Id); + table.ForeignKey( + name: "FK_DClass_DClassType_ClassTypeId", + column: x => x.ClassTypeId, + principalTable: "DClassType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "DLevel", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClassTypeId = table.Column(type: "uniqueidentifier", nullable: false), + LevelType = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), + LevelCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + LessonCount = table.Column(type: "int", nullable: false), + Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), + LessonDuration = table.Column(type: "int", nullable: true), + MonthlyPaymentRate = table.Column(type: "decimal(18,2)", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DLevel", x => x.Id); + table.ForeignKey( + name: "FK_DLevel_DClassType_ClassTypeId", + column: x => x.ClassTypeId, + principalTable: "DClassType", + principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); @@ -2693,12 +3440,13 @@ namespace Kurs.Platform.Migrations columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), - CountryCode = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), - CityCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), + Country = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), + City = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Township = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Street = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), ZipCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + CityId = table.Column(type: "uniqueidentifier", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -2711,11 +3459,10 @@ namespace Kurs.Platform.Migrations { table.PrimaryKey("PK_DDistrict", x => x.Id); table.ForeignKey( - name: "FK_DDistrict_DCity_CountryCode_CityCode", - columns: x => new { x.CountryCode, x.CityCode }, + name: "FK_DDistrict_DCity_CityId", + column: x => x.CityId, principalTable: "DCity", - principalColumns: new[] { "CountryCode", "Code" }, - onDelete: ReferentialAction.Cascade); + principalColumn: "Id"); }); migrationBuilder.CreateIndex( @@ -2947,10 +3694,26 @@ namespace Kurs.Platform.Migrations column: "CurrencyId"); migrationBuilder.CreateIndex( - name: "IX_DCity_CountryCode_Code", + name: "IX_DCity_Country_Code", table: "DCity", - columns: new[] { "CountryCode", "Code" }, - unique: true); + columns: new[] { "Country", "Code" }, + unique: true, + filter: "[Country] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_DCity_CountryId", + table: "DCity", + column: "CountryId"); + + migrationBuilder.CreateIndex( + name: "IX_DClass_ClassTypeId", + table: "DClass", + column: "ClassTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_DClassType_RegistrationTypeId", + table: "DClassType", + column: "RegistrationTypeId"); migrationBuilder.CreateIndex( name: "IX_DCountry_Code", @@ -2970,11 +3733,41 @@ namespace Kurs.Platform.Migrations unique: true); migrationBuilder.CreateIndex( - name: "IX_DDistrict_CountryCode_CityCode_Name_Township_Street_ZipCode", + name: "IX_DDistrict_CityId", table: "DDistrict", - columns: new[] { "CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode" }, + column: "CityId"); + + migrationBuilder.CreateIndex( + name: "IX_DDistrict_Country_City_Name_Township_Street_ZipCode", + table: "DDistrict", + columns: new[] { "Country", "City", "Name", "Township", "Street", "ZipCode" }, unique: true, - filter: "[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); + filter: "[Country] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_DEvent_CategoryId", + table: "DEvent", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_DEvent_TypeId", + table: "DEvent", + column: "TypeId"); + + migrationBuilder.CreateIndex( + name: "IX_DLevel_ClassTypeId", + table: "DLevel", + column: "ClassTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_DRegistrationMethod_RegistrationTypeId", + table: "DRegistrationMethod", + column: "RegistrationTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_DScheduleLesson_ScheduleId", + table: "DScheduleLesson", + column: "ScheduleId"); migrationBuilder.CreateIndex( name: "IX_DSkill_SkillTypeId", @@ -3059,31 +3852,6 @@ namespace Kurs.Platform.Migrations columns: new[] { "TableName", "Order" }, unique: true); - migrationBuilder.CreateIndex( - name: "IX_PBlogCategory_Slug", - table: "PBlogCategory", - column: "Slug"); - - migrationBuilder.CreateIndex( - name: "IX_PBlogPost_CategoryId", - table: "PBlogPost", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_PBlogPost_IsPublished", - table: "PBlogPost", - column: "IsPublished"); - - migrationBuilder.CreateIndex( - name: "IX_PBlogPost_PublishedAt", - table: "PBlogPost", - column: "PublishedAt"); - - migrationBuilder.CreateIndex( - name: "IX_PBlogPost_Slug", - table: "PBlogPost", - column: "Slug"); - migrationBuilder.CreateIndex( name: "IX_PBranchUsers_BranchId", table: "PBranchUsers", @@ -3222,11 +3990,6 @@ namespace Kurs.Platform.Migrations table: "PNotification", column: "NotificationRuleId"); - migrationBuilder.CreateIndex( - name: "IX_POrderItem_OrderId", - table: "POrderItem", - column: "OrderId"); - migrationBuilder.CreateIndex( name: "IX_PReportCategory_Name", table: "PReportCategory", @@ -3253,6 +4016,36 @@ namespace Kurs.Platform.Migrations table: "PRoute", column: "Key", unique: true); + + migrationBuilder.CreateIndex( + name: "IX_WBlogCategory_Slug", + table: "WBlogCategory", + column: "Slug"); + + migrationBuilder.CreateIndex( + name: "IX_WBlogPost_CategoryId", + table: "WBlogPost", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_WBlogPost_IsPublished", + table: "WBlogPost", + column: "IsPublished"); + + migrationBuilder.CreateIndex( + name: "IX_WBlogPost_PublishedAt", + table: "WBlogPost", + column: "PublishedAt"); + + migrationBuilder.CreateIndex( + name: "IX_WBlogPost_Slug", + table: "WBlogPost", + column: "Slug"); + + migrationBuilder.CreateIndex( + name: "IX_WOrderItem_OrderId", + table: "WOrderItem", + column: "OrderId"); } /// @@ -3333,15 +4126,78 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "DBankAccount"); + migrationBuilder.DropTable( + name: "DBehavior"); + + migrationBuilder.DropTable( + name: "DClass"); + + migrationBuilder.DropTable( + name: "DClassCancellationReason"); + migrationBuilder.DropTable( name: "DContactTag"); migrationBuilder.DropTable( name: "DContactTitle"); + migrationBuilder.DropTable( + name: "DDisease"); + migrationBuilder.DropTable( name: "DDistrict"); + migrationBuilder.DropTable( + name: "DDocument"); + + migrationBuilder.DropTable( + name: "DEducationStatus"); + + migrationBuilder.DropTable( + name: "DEvent"); + + migrationBuilder.DropTable( + name: "DInformation"); + + migrationBuilder.DropTable( + name: "DInteresting"); + + migrationBuilder.DropTable( + name: "DLawyer"); + + migrationBuilder.DropTable( + name: "DLessonPeriod"); + + migrationBuilder.DropTable( + name: "DLevel"); + + migrationBuilder.DropTable( + name: "DMeal"); + + migrationBuilder.DropTable( + name: "DMeetingMethod"); + + migrationBuilder.DropTable( + name: "DMeetingResult"); + + migrationBuilder.DropTable( + name: "DNoteType"); + + migrationBuilder.DropTable( + name: "DProgram"); + + migrationBuilder.DropTable( + name: "DPsychologist"); + + migrationBuilder.DropTable( + name: "DRegistrationMethod"); + + migrationBuilder.DropTable( + name: "DSalesRejectionReason"); + + migrationBuilder.DropTable( + name: "DScheduleLesson"); + migrationBuilder.DropTable( name: "DSector"); @@ -3351,18 +4207,30 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "DSkillLevel"); + migrationBuilder.DropTable( + name: "DSource"); + + migrationBuilder.DropTable( + name: "DTransactionReason"); + migrationBuilder.DropTable( name: "DUom"); + migrationBuilder.DropTable( + name: "DVaccine"); + + migrationBuilder.DropTable( + name: "DVehicle"); + + migrationBuilder.DropTable( + name: "DWorkHour"); + migrationBuilder.DropTable( name: "OpenIddictScopes"); migrationBuilder.DropTable( name: "OpenIddictTokens"); - migrationBuilder.DropTable( - name: "PAbout"); - migrationBuilder.DropTable( name: "PAiBot"); @@ -3378,9 +4246,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "PBackgroundWorker_MailQueueEvents"); - migrationBuilder.DropTable( - name: "PBlogPost"); - migrationBuilder.DropTable( name: "PBranchUsers"); @@ -3393,9 +4258,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "PClassroomParticipant"); - migrationBuilder.DropTable( - name: "PContact"); - migrationBuilder.DropTable( name: "PCustomComponent"); @@ -3408,18 +4270,12 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "PDataSource"); - migrationBuilder.DropTable( - name: "PDemo"); - migrationBuilder.DropTable( name: "PForumPost"); migrationBuilder.DropTable( name: "PGlobalSearch"); - migrationBuilder.DropTable( - name: "PInstallmentOption"); - migrationBuilder.DropTable( name: "PIpRestriction"); @@ -3441,15 +4297,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "PNotification"); - migrationBuilder.DropTable( - name: "POrderItem"); - - migrationBuilder.DropTable( - name: "PPaymentMethod"); - - migrationBuilder.DropTable( - name: "PProduct"); - migrationBuilder.DropTable( name: "PReportGenerated"); @@ -3460,10 +4307,34 @@ namespace Kurs.Platform.Migrations name: "PRoute"); migrationBuilder.DropTable( - name: "PService"); + name: "PSettingDefinition"); migrationBuilder.DropTable( - name: "PSettingDefinition"); + name: "WAbout"); + + migrationBuilder.DropTable( + name: "WBlogPost"); + + migrationBuilder.DropTable( + name: "WContact"); + + migrationBuilder.DropTable( + name: "WDemo"); + + migrationBuilder.DropTable( + name: "WInstallmentOption"); + + migrationBuilder.DropTable( + name: "WOrderItem"); + + migrationBuilder.DropTable( + name: "WPaymentMethod"); + + migrationBuilder.DropTable( + name: "WProduct"); + + migrationBuilder.DropTable( + name: "WService"); migrationBuilder.DropTable( name: "AbpEntityChanges"); @@ -3489,6 +4360,18 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "DCity"); + migrationBuilder.DropTable( + name: "DEventCategory"); + + migrationBuilder.DropTable( + name: "DEventType"); + + migrationBuilder.DropTable( + name: "DClassType"); + + migrationBuilder.DropTable( + name: "DSchedule"); + migrationBuilder.DropTable( name: "DSkillType"); @@ -3501,9 +4384,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "PBackgroundWorker_MailQueue"); - migrationBuilder.DropTable( - name: "PBlogCategory"); - migrationBuilder.DropTable( name: "PBranch"); @@ -3529,10 +4409,13 @@ namespace Kurs.Platform.Migrations name: "PNotificationRule"); migrationBuilder.DropTable( - name: "POrder"); + name: "PReportTemplate"); migrationBuilder.DropTable( - name: "PReportTemplate"); + name: "WBlogCategory"); + + migrationBuilder.DropTable( + name: "WOrder"); migrationBuilder.DropTable( name: "AbpAuditLogs"); @@ -3540,6 +4423,9 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "DCountry"); + migrationBuilder.DropTable( + name: "DRegistrationType"); + migrationBuilder.DropTable( name: "OpenIddictApplications"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index c4f58a72..2c60d9d4 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -24,104 +24,6 @@ namespace Kurs.Platform.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("ContactTag", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Category") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.ToTable("DContactTag", (string)null); - }); - - modelBuilder.Entity("ContactTitle", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Abbreviation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.HasKey("Id"); - - b.ToTable("DContactTitle", (string)null); - }); - modelBuilder.Entity("Kurs.Languages.Entities.Language", b => { b.Property("Id") @@ -717,7 +619,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PAbout", (string)null); + b.ToTable("WAbout", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b => @@ -1093,6 +995,55 @@ namespace Kurs.Platform.Migrations b.ToTable("DBankAccount", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Behavior", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DBehavior", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b => { b.Property("Id") @@ -1163,7 +1114,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("PBlogCategory", (string)null); + b.ToTable("WBlogCategory", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => @@ -1267,7 +1218,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("Slug"); - b.ToTable("PBlogPost", (string)null); + b.ToTable("WBlogPost", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => @@ -1415,11 +1366,13 @@ namespace Kurs.Platform.Migrations .HasMaxLength(16) .HasColumnType("nvarchar(16)"); - b.Property("CountryCode") - .IsRequired() + b.Property("Country") .HasMaxLength(8) .HasColumnType("nvarchar(8)"); + b.Property("CountryId") + .HasColumnType("uniqueidentifier"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -1461,12 +1414,196 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.HasIndex("CountryCode", "Code") - .IsUnique(); + b.HasIndex("CountryId"); + + b.HasIndex("Country", "Code") + .IsUnique() + .HasFilter("[Country] IS NOT NULL"); b.ToTable("DCity", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Class", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClassTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ClassTypeId"); + + b.ToTable("DClass", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassCancellationReason", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DClassCancellationReason", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxStudentCount") + .HasColumnType("int"); + + b.Property("MinStudentCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("RegistrationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RegistrationTypeId"); + + b.ToTable("DClassType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => { b.Property("Id") @@ -1857,7 +1994,105 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PContact", (string)null); + b.ToTable("WContact", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ContactTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("DContactTag", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ContactTitle", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Abbreviation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("DContactTitle", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Country", b => @@ -2482,7 +2717,56 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PDemo", (string)null); + b.ToTable("WDemo", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Disease", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DDisease", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.District", b => @@ -2490,12 +2774,15 @@ namespace Kurs.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CityCode") + b.Property("City") .IsRequired() .HasMaxLength(16) .HasColumnType("nvarchar(16)"); - b.Property("CountryCode") + b.Property("CityId") + .HasColumnType("uniqueidentifier"); + + b.Property("Country") .HasMaxLength(8) .HasColumnType("nvarchar(8)"); @@ -2548,13 +2835,255 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.HasIndex("CountryCode", "CityCode", "Name", "Township", "Street", "ZipCode") + b.HasIndex("CityId"); + + b.HasIndex("Country", "City", "Name", "Township", "Street", "ZipCode") .IsUnique() - .HasFilter("[CountryCode] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); + .HasFilter("[Country] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); b.ToTable("DDistrict", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Document", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("nvarchar(80)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DDocument", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OrderNo") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DEducationStatus", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Event", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Place") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TypeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.HasIndex("TypeId"); + + b.ToTable("DEvent", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DEventCategory", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DEventType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b => { b.Property("Id") @@ -2593,6 +3122,55 @@ namespace Kurs.Platform.Migrations b.ToTable("PGlobalSearch", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Information", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("DInformation", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b => { b.Property("Id") @@ -2612,7 +3190,60 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PInstallmentOption", (string)null); + b.ToTable("WInstallmentOption", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Interesting", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DInteresting", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.IpRestriction", b => @@ -2673,6 +3304,250 @@ namespace Kurs.Platform.Migrations b.ToTable("PIpRestriction", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Lawyer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("City") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContactPerson") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Fax") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Phone1") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Phone2") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Phone3") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Phone4") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TaxNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TaxOffice") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DLawyer", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Day") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lesson1") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Lesson2") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Lesson3") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Lesson4") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DLessonPeriod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClassTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LessonCount") + .HasColumnType("int"); + + b.Property("LessonDuration") + .HasColumnType("int"); + + b.Property("LevelCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LevelType") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("MonthlyPaymentRate") + .HasColumnType("decimal(18,2)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ClassTypeId"); + + b.ToTable("DLevel", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ListForm", b => { b.Property("Id") @@ -3321,6 +4196,177 @@ namespace Kurs.Platform.Migrations b.ToTable("PListFormImportExecute", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Breakfast") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lunch") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Snack") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DMeal", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Flag") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("DMeetingMethod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.MeetingResult", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OrderNo") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DMeetingResult", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Menu", b => { b.Property("Id") @@ -3417,6 +4463,25 @@ namespace Kurs.Platform.Migrations b.ToTable("PMenu", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.NoteType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DNoteType", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Order", b => { b.Property("Id") @@ -3542,7 +4607,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("POrder", (string)null); + b.ToTable("WOrder", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => @@ -3607,7 +4672,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("OrderId"); - b.ToTable("POrderItem", (string)null); + b.ToTable("WOrderItem", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b => @@ -3630,7 +4695,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PPaymentMethod", (string)null); + b.ToTable("WPaymentMethod", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Product", b => @@ -3702,7 +4767,244 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PProduct", (string)null); + b.ToTable("WProduct", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Program", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DProgram", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Psychologist", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Phone") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DPsychologist", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RegistrationTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RegistrationTypeId"); + + b.ToTable("DRegistrationMethod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DRegistrationType", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => @@ -4019,6 +5321,236 @@ namespace Kurs.Platform.Migrations b.ToTable("PRoute", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.SalesRejectionReason", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DSalesRejectionReason", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Friday") + .HasColumnType("bit"); + + b.Property("IncludeLunch") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LessonBreakMinute") + .HasColumnType("int"); + + b.Property("LessonCount") + .HasColumnType("int"); + + b.Property("LessonMinute") + .HasColumnType("int"); + + b.Property("LunchMinute") + .HasColumnType("int"); + + b.Property("LunchTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Monday") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Saturday") + .HasColumnType("bit"); + + b.Property("StartTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Sunday") + .HasColumnType("bit"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Thursday") + .HasColumnType("bit"); + + b.Property("Tuesday") + .HasColumnType("bit"); + + b.Property("Wednesday") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("DSchedule", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Day") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LessonBreakMinute") + .HasColumnType("int"); + + b.Property("LessonMinute") + .HasColumnType("int"); + + b.Property("LessonNo") + .HasColumnType("int"); + + b.Property("ScheduleId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ScheduleId"); + + b.ToTable("DScheduleLesson", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Sector", b => { b.Property("Id") @@ -4128,7 +5660,7 @@ namespace Kurs.Platform.Migrations b.HasKey("Id"); - b.ToTable("PService", (string)null); + b.ToTable("WService", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => @@ -4289,6 +5821,87 @@ namespace Kurs.Platform.Migrations b.ToTable("DSkillType", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Source", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DSource", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.TransactionReason", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("Id"); + + b.ToTable("DTransactionReason", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => { b.Property("Id") @@ -4403,6 +6016,230 @@ namespace Kurs.Platform.Migrations b.ToTable("DUomCategory", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.Vaccine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DVaccine", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Vehicle", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssistantDriverName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AssistantDriverNationalId") + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("AssistantDriverPhone1") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("AssistantDriverPhone2") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Brand") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DriverName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DriverNationalId") + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("DriverPhone1") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("DriverPhone2") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ModelYear") + .HasColumnType("int"); + + b.Property("Plate") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Status") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DVehicle", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.WorkHour", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHour") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("Friday") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Monday") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Saturday") + .HasColumnType("bit"); + + b.Property("StartHour") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("Sunday") + .HasColumnType("bit"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Thursday") + .HasColumnType("bit"); + + b.Property("Tuesday") + .HasColumnType("bit"); + + b.Property("Wednesday") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("DWorkHour", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", b => { b.Property("Id") @@ -6690,14 +8527,31 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.City", b => { - b.HasOne("Kurs.Platform.Entities.Country", "Country") + b.HasOne("Kurs.Platform.Entities.Country", null) .WithMany("Cities") - .HasForeignKey("CountryCode") - .HasPrincipalKey("Code") + .HasForeignKey("CountryId"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Class", b => + { + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") + .WithMany("Classes") + .HasForeignKey("ClassTypeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("Country"); + b.Navigation("ClassType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => + { + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") + .WithMany("ClassTypes") + .HasForeignKey("RegistrationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RegistrationType"); }); modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", b => @@ -6755,13 +8609,39 @@ namespace Kurs.Platform.Migrations modelBuilder.Entity("Kurs.Platform.Entities.District", b => { - b.HasOne("Kurs.Platform.Entities.City", "City") + b.HasOne("Kurs.Platform.Entities.City", null) .WithMany("Districts") - .HasForeignKey("CountryCode", "CityCode") - .HasPrincipalKey("CountryCode", "Code") - .OnDelete(DeleteBehavior.Cascade); + .HasForeignKey("CityId"); + }); - b.Navigation("City"); + modelBuilder.Entity("Kurs.Platform.Entities.Event", b => + { + b.HasOne("Kurs.Platform.Entities.EventCategory", "Category") + .WithMany("Events") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Kurs.Platform.Entities.EventType", "Type") + .WithMany("Events") + .HasForeignKey("TypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("Type"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => + { + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") + .WithMany("Levels") + .HasForeignKey("ClassTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ClassType"); }); modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => @@ -6814,6 +8694,17 @@ namespace Kurs.Platform.Migrations b.Navigation("Order"); }); + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => + { + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") + .WithMany("Methods") + .HasForeignKey("RegistrationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RegistrationType"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => { b.HasOne("Kurs.Platform.Entities.ReportTemplate", "Template") @@ -6846,6 +8737,17 @@ namespace Kurs.Platform.Migrations b.Navigation("ReportCategory"); }); + modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b => + { + b.HasOne("Kurs.Platform.Entities.Schedule", "Schedule") + .WithMany("Lessons") + .HasForeignKey("ScheduleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Schedule"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Skill", b => { b.HasOne("Kurs.Platform.Entities.SkillType", "SkillType") @@ -7085,6 +8987,13 @@ namespace Kurs.Platform.Migrations b.Navigation("Districts"); }); + modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => + { + b.Navigation("Classes"); + + b.Navigation("Levels"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => { b.Navigation("AttendanceRecords"); @@ -7104,11 +9013,28 @@ namespace Kurs.Platform.Migrations b.Navigation("Fields"); }); + modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b => + { + b.Navigation("Events"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => + { + b.Navigation("Events"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.Order", b => { b.Navigation("Items"); }); + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.Navigation("ClassTypes"); + + b.Navigation("Methods"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => { b.Navigation("ReportTemplates"); @@ -7119,6 +9045,11 @@ namespace Kurs.Platform.Migrations b.Navigation("Parameters"); }); + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.Navigation("Lessons"); + }); + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => { b.Navigation("Levels");