From ff088fd9d7771c2beea0b873ee7b736e02734686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Wed, 5 Nov 2025 01:08:36 +0300 Subject: [PATCH] DynamicServiceManager --- .../DeveloperKit/DynamicServiceDtos.cs | 143 + .../DeveloperKit/IDynamicServiceManager.cs | 65 + .../DeveloperKitAutoMapperProfile.cs | 3 + .../DeveloperKit/DynamicServiceCompiler.cs | 399 + .../DeveloperKit/DynamicServiceManager.cs | 375 + .../Kurs.Platform.Application.csproj | 3 + .../Seeds/LanguagesData.json | 6 + .../Seeds/MenusData.json | 19 + .../Seeds/PermissionsData.json | 72 + .../Enums/TableNameEnum.cs | 3 +- .../PlatformConsts.cs | 14 + .../TableNameResolver.cs | 1 + .../Tenant/Administration/DynamicService.cs | 174 + .../EntityFrameworkCore/PlatformDbContext.cs | 23 + .../20251104205840_DynamicService.Designer.cs | 13841 ++++++++++++++++ .../20251104205840_DynamicService.cs | 53 + .../PlatformDbContextModelSnapshot.cs | 94 + .../DynamicAssemblyRegistrationService.cs | 194 + .../PlatformHttpApiHostModule.cs | 12 + api/src/Kurs.Platform.HttpApi.Host/Program.cs | 4 + .../DynamicAppServiceController.cs | 97 + .../developerKit/DynamicAppServiceEditor.tsx | 628 + ui/src/routes/route.constant.ts | 1 + ui/src/services/dynamicService.service.ts | 182 + .../views/developerKit/DynamicServicePage.tsx | 19 + 25 files changed, 16424 insertions(+), 1 deletion(-) create mode 100644 api/src/Kurs.Platform.Application.Contracts/DeveloperKit/DynamicServiceDtos.cs create mode 100644 api/src/Kurs.Platform.Application.Contracts/DeveloperKit/IDynamicServiceManager.cs create mode 100644 api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceCompiler.cs create mode 100644 api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceManager.cs create mode 100644 api/src/Kurs.Platform.Domain/Entities/Tenant/Administration/DynamicService.cs create mode 100644 api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.Designer.cs create mode 100644 api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.cs create mode 100644 api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs create mode 100644 api/src/Kurs.Platform.HttpApi/DynamicServices/DynamicAppServiceController.cs create mode 100644 ui/src/components/developerKit/DynamicAppServiceEditor.tsx create mode 100644 ui/src/services/dynamicService.service.ts create mode 100644 ui/src/views/developerKit/DynamicServicePage.tsx diff --git a/api/src/Kurs.Platform.Application.Contracts/DeveloperKit/DynamicServiceDtos.cs b/api/src/Kurs.Platform.Application.Contracts/DeveloperKit/DynamicServiceDtos.cs new file mode 100644 index 00000000..b950e70d --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/DeveloperKit/DynamicServiceDtos.cs @@ -0,0 +1,143 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Text.Json.Serialization; +using Volo.Abp.Application.Dtos; + +namespace Kurs.Platform.DeveloperKit; + +/// +/// Dynamic AppService tanımı DTO'su +/// +public class DynamicServiceDto : FullAuditedEntityDto +{ + [StringLength(256)] + [JsonPropertyName("name")] + public string Name { get; set; } + + [StringLength(512)] + [JsonPropertyName("displayName")] + public string DisplayName { get; set; } + + [StringLength(2000)] + [JsonPropertyName("description")] + public string Description { get; set; } + + [JsonPropertyName("code")] + public string Code { get; set; } + + [JsonPropertyName("isActive")] + public bool IsActive { get; set; } + + [JsonPropertyName("compilationStatus")] + public string CompilationStatus { get; set; } + + [JsonPropertyName("lastCompilationError")] + public string LastCompilationError { get; set; } + + [JsonPropertyName("lastSuccessfulCompilation")] + public DateTime? LastSuccessfulCompilation { get; set; } + + [JsonPropertyName("version")] + public int Version { get; set; } + + [JsonPropertyName("codeHash")] + public string CodeHash { get; set; } + + [JsonPropertyName("primaryEntityType")] + public string PrimaryEntityType { get; set; } + + [JsonPropertyName("controllerName")] + public string ControllerName { get; set; } +} + +/// +/// Kod derleme sonucu DTO'su +/// +public class CompileResultDto +{ + [JsonPropertyName("success")] + public bool Success { get; set; } + [JsonPropertyName("errorMessage")] + public string ErrorMessage { get; set; } + [JsonPropertyName("errors")] + public List Errors { get; set; } + [JsonPropertyName("compilationTimeMs")] + public long CompilationTimeMs { get; set; } + [JsonPropertyName("hasWarnings")] + public bool HasWarnings { get; set; } + [JsonPropertyName("warnings")] + public List Warnings { get; set; } +} + +/// +/// Tek bir derleme hatası +/// +public class CompilationErrorDto +{ + [JsonPropertyName("code")] + public string Code { get; set; } + [JsonPropertyName("message")] + public string Message { get; set; } + [JsonPropertyName("line")] + public int Line { get; set; } + [JsonPropertyName("column")] + public int Column { get; set; } + [JsonPropertyName("severity")] + public string Severity { get; set; } + [JsonPropertyName("fileName")] + public string FileName { get; set; } +} + +/// +/// Kod test etme DTO'su +/// +public class TestCompileRequestDto +{ + [JsonPropertyName("code")] + public string Code { get; set; } +} + +/// +/// AppService yayınlama DTO'su +/// +public class PublishAppServiceRequestDto +{ + [StringLength(256)] + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("code")] + public string Code { get; set; } + + [StringLength(512)] + [JsonPropertyName("displayName")] + public string DisplayName { get; set; } + + [StringLength(2000)] + [JsonPropertyName("description")] + public string Description { get; set; } + + [StringLength(256)] + [JsonPropertyName("primaryEntityType")] + public string PrimaryEntityType { get; set; } +} + +/// +/// AppService yayınlama sonucu +/// +public class PublishResultDto +{ + [JsonPropertyName("success")] + public bool Success { get; set; } + [JsonPropertyName("errorMessage")] + public string ErrorMessage { get; set; } + [JsonPropertyName("appServiceId")] + public Guid? AppServiceId { get; set; } + [JsonPropertyName("swaggerUrl")] + public string SwaggerUrl { get; set; } + [JsonPropertyName("generatedEndpoints")] + public List GeneratedEndpoints { get; set; } + [JsonPropertyName("controllerName")] + public string ControllerName { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/DeveloperKit/IDynamicServiceManager.cs b/api/src/Kurs.Platform.Application.Contracts/DeveloperKit/IDynamicServiceManager.cs new file mode 100644 index 00000000..2ddd63ac --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/DeveloperKit/IDynamicServiceManager.cs @@ -0,0 +1,65 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Kurs.Platform.DeveloperKit; + +/// +/// Dynamic AppService yönetimi için application service interface +/// +public interface IDynamicServiceManager : IApplicationService +{ + /// + /// C# kodunu test compile eder (herhangi bir assembly yüklemez) + /// + /// Test edilecek kod + /// Derleme sonucu + Task TestCompileAsync(TestCompileRequestDto request); + + /// + /// AppService'i yayınlar (compile eder, veritabanına kaydeder ve runtime'da yükler) + /// + /// Yayınlanacak AppService bilgileri + /// Yayınlama sonucu + Task PublishAsync(PublishAppServiceRequestDto request); + + /// + /// Mevcut tenant'ın AppService tanımlarını listeler + /// + /// Sayfalama parametreleri + /// AppService listesi + Task> GetListAsync(PagedAndSortedResultRequestDto input); + + /// + /// Belirli bir AppService tanımını getirir + /// + /// AppService ID + /// AppService tanımı + Task GetAsync(Guid id); + + /// + /// AppService tanımını siler ve runtime'dan kaldırır + /// + /// AppService ID + Task DeleteAsync(Guid id); + + /// + /// AppService'i aktif/pasif yapar + /// + /// AppService ID + /// Aktif durumu + Task SetActiveAsync(Guid id, bool isActive); + + /// + /// Tüm aktif AppService'leri yeniden yükler (uygulama restart'tan sonra) + /// + Task ReloadAllActiveServicesAsync(); + + /// + /// Belirli bir AppService'i yeniden derler ve yükler + /// + /// AppService ID + /// Yeniden derleme sonucu + Task RecompileAsync(Guid id); +} diff --git a/api/src/Kurs.Platform.Application/DeveloperKit/DeveloperKitAutoMapperProfile.cs b/api/src/Kurs.Platform.Application/DeveloperKit/DeveloperKitAutoMapperProfile.cs index dc1dfe61..9ccb3667 100644 --- a/api/src/Kurs.Platform.Application/DeveloperKit/DeveloperKitAutoMapperProfile.cs +++ b/api/src/Kurs.Platform.Application/DeveloperKit/DeveloperKitAutoMapperProfile.cs @@ -27,5 +27,8 @@ public class DeveloperKitAutoMapperProfile : Profile // Migration mappings CreateMap(); CreateMap(); + + CreateMap() + .ForMember(dest => dest.CompilationStatus, opt => opt.MapFrom(src => src.CompilationStatus.ToString())); } } diff --git a/api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceCompiler.cs b/api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceCompiler.cs new file mode 100644 index 00000000..aa99d0cf --- /dev/null +++ b/api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceCompiler.cs @@ -0,0 +1,399 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Loader; +using System.Threading.Tasks; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.Extensions.Logging; +using Volo.Abp.DependencyInjection; +using System.Diagnostics; +using System.Collections.Concurrent; +using Kurs.Platform.DeveloperKit; + +namespace Kurs.Platform.DynamicServices; + +/// +/// Dynamic C# kod derleme servisi +/// +public class DynamicServiceCompiler : ITransientDependency +{ + private readonly ILogger _logger; + + // Tenant bazlı yüklenmiş assembly'leri takip etmek için + private static readonly ConcurrentDictionary> _tenantAssemblies = new(); + + // Assembly kaydı için delegate + public static Action? NotifyAssemblyRegistration { get; set; } + + // Güvenlik için yasaklı namespace'ler + private static readonly string[] ForbiddenNamespaces = { + "System.IO", + "System.Diagnostics", + "System.Threading.Thread", + "System.Environment", + "System.Net.Sockets", + "System.Reflection.Emit", + "System.Runtime.InteropServices", + "Microsoft.Win32", + "System.Security.Cryptography", + "System.Net.NetworkInformation" + }; + + // Güvenlik için yasaklı sınıflar/metotlar + private static readonly string[] ForbiddenTypes = { + "Process", + "ProcessStartInfo", + "Thread", + "ThreadStart", + "File", + "Directory", + "FileStream", + "StreamWriter", + "StreamReader", + "Socket", + "TcpClient", + "UdpClient", + "HttpWebRequest", + "WebClient", + "Assembly.Load" + }; + + public DynamicServiceCompiler(ILogger logger) + { + _logger = logger; + } + + /// + /// Kodu derler ve validate eder, ancak assembly yüklemez + /// + public async Task CompileAndValidateAsync(string code, Guid? tenantId = null) + { + var stopwatch = Stopwatch.StartNew(); + + try + { + // Güvenlik kontrolü + var securityCheck = ValidateCodeSecurity(code); + if (!securityCheck.Success) + { + return securityCheck; + } + + // Roslyn ile derleme + var compilation = CreateCompilation(code, $"DynamicAssembly_{Guid.NewGuid()}"); + + using var ms = new MemoryStream(); + var emitResult = compilation.Emit(ms); + + stopwatch.Stop(); + + var result = new CompileResultDto + { + Success = emitResult.Success, + CompilationTimeMs = stopwatch.ElapsedMilliseconds, + Errors = new List(), + Warnings = new List() + }; + + // Hataları ve uyarıları topla + foreach (var diagnostic in emitResult.Diagnostics) + { + var error = new CompilationErrorDto + { + Code = diagnostic.Id, + Message = diagnostic.GetMessage(), + Severity = diagnostic.Severity.ToString(), + Line = diagnostic.Location.GetLineSpan().StartLinePosition.Line + 1, + Column = diagnostic.Location.GetLineSpan().StartLinePosition.Character + 1, + FileName = diagnostic.Location.SourceTree?.FilePath ?? "DynamicCode.cs" + }; + + if (diagnostic.Severity == DiagnosticSeverity.Error) + { + result.Errors.Add(error); + } + else if (diagnostic.Severity == DiagnosticSeverity.Warning) + { + result.Warnings.Add(error.Message); + result.HasWarnings = true; + } + } + + if (!result.Success) + { + result.ErrorMessage = $"Derleme {result.Errors.Count} hata ile başarısız oldu."; + } + + _logger.LogInformation("Kod derlemesi tamamlandı. Başarılı: {Success}, Süre: {Time}ms, Hata sayısı: {ErrorCount}", + result.Success, stopwatch.ElapsedMilliseconds, result.Errors?.Count ?? 0); + + return result; + } + catch (Exception ex) + { + stopwatch.Stop(); + _logger.LogError(ex, "Kod derlemesi sırasında beklenmeyen hata"); + + return new CompileResultDto + { + Success = false, + ErrorMessage = $"Derleme sırasında hata: {ex.Message}", + CompilationTimeMs = stopwatch.ElapsedMilliseconds, + Errors = new List() + }; + } + } + + /// + /// Kodu derler ve belirtilen tenant için assembly yükler + /// + public async Task CompileAndRegisterForTenantAsync(Guid tenantId, string code, string assemblyName) + { + try + { + // Önce validate et + var validateResult = await CompileAndValidateAsync(code, tenantId); + if (!validateResult.Success) + { + return validateResult; + } + + // Assembly oluştur + var compilation = CreateCompilation(code, assemblyName); + + using var ms = new MemoryStream(); + var emitResult = compilation.Emit(ms); + + if (!emitResult.Success) + { + return validateResult; // Zaten hata bilgisi mevcut + } + + ms.Seek(0, SeekOrigin.Begin); + + // Tenant'a özel assembly load context + var contextName = $"Tenant_{tenantId}_Context"; + var loadContext = new AssemblyLoadContext(contextName, isCollectible: true); + + var assembly = loadContext.LoadFromStream(ms); + + // ApplicationService türevlerini bul + var appServiceTypes = assembly.GetTypes() + .Where(t => IsApplicationServiceType(t)) + .ToList(); + + _logger.LogInformation("Tenant {TenantId} için {Count} ApplicationService bulundu", + tenantId, appServiceTypes.Count); + + // Tenant assembly'leri listesine ekle + _tenantAssemblies.AddOrUpdate(tenantId, + new List { assembly }, + (key, existing) => { existing.Add(assembly); return existing; }); + + // Background service'e assembly kaydı isteği gönder + // Bu, DI container ve MVC conventional controller sistemine kaydetmek için + NotifyAssemblyRegistration?.Invoke(tenantId, assembly, assemblyName); + + _logger.LogInformation("Tenant {TenantId} için assembly başarıyla yüklendi: {AssemblyName}", + tenantId, assemblyName); + + return new CompileResultDto + { + Success = true, + CompilationTimeMs = validateResult.CompilationTimeMs + }; + } + catch (Exception ex) + { + _logger.LogError(ex, "Assembly yükleme sırasında hata. Tenant: {TenantId}", tenantId); + + return new CompileResultDto + { + Success = false, + ErrorMessage = $"Assembly yükleme hatası: {ex.Message}", + Errors = new List() + }; + } + } + + /// + /// Kod güvenlik kontrolü + /// + private CompileResultDto ValidateCodeSecurity(string code) + { + var errors = new List(); + + // Yasaklı namespace kontrolü + foreach (var forbiddenNs in ForbiddenNamespaces) + { + if (code.Contains($"using {forbiddenNs}") || code.Contains($"{forbiddenNs}.")) + { + errors.Add(new CompilationErrorDto + { + Code = "SECURITY001", + Message = $"Güvenlik nedeniyle '{forbiddenNs}' namespace'i kullanılamaz", + Severity = "Error", + Line = GetLineNumber(code, forbiddenNs), + Column = 1 + }); + } + } + + // Yasaklı tip kontrolü + foreach (var forbiddenType in ForbiddenTypes) + { + if (code.Contains(forbiddenType)) + { + errors.Add(new CompilationErrorDto + { + Code = "SECURITY002", + Message = $"Güvenlik nedeniyle '{forbiddenType}' tipi kullanılamaz", + Severity = "Error", + Line = GetLineNumber(code, forbiddenType), + Column = 1 + }); + } + } + + return new CompileResultDto + { + Success = errors.Count == 0, + ErrorMessage = errors.Count > 0 ? "Güvenlik kontrolü başarısız" : null, + Errors = errors + }; + } + + /// + /// Roslyn compilation oluşturur + /// + private CSharpCompilation CreateCompilation(string code, string assemblyName) + { + var syntaxTree = CSharpSyntaxTree.ParseText(code); + + var references = GetDefaultReferences(); + + return CSharpCompilation.Create( + assemblyName, + new[] { syntaxTree }, + references, + new CSharpCompilationOptions( + OutputKind.DynamicallyLinkedLibrary, + optimizationLevel: OptimizationLevel.Debug, + allowUnsafe: false // Güvenlik için unsafe kod yasağı + )); + } + + /// + /// Varsayılan assembly referanslarını döner + /// + private List GetDefaultReferences() + { + var references = new List(); + + // .NET Core temel referanslar + var runtimeAssemblies = new[] + { + typeof(object).Assembly, // System.Private.CoreLib + typeof(Console).Assembly, // System.Console + typeof(System.ComponentModel.DataAnnotations.RequiredAttribute).Assembly, // System.ComponentModel.DataAnnotations + typeof(System.Linq.Enumerable).Assembly, // System.Linq + typeof(System.Collections.Generic.List<>).Assembly, // System.Collections + Assembly.Load("System.Runtime"), + Assembly.Load("System.Collections"), + Assembly.Load("netstandard") + }; + + foreach (var assembly in runtimeAssemblies) + { + try + { + references.Add(MetadataReference.CreateFromFile(assembly.Location)); + } + catch (Exception ex) + { + _logger.LogWarning(ex, "Assembly referansı eklenemedi: {Assembly}", assembly.FullName); + } + } + + // ABP Framework referansları + try + { + var abpAssemblies = AppDomain.CurrentDomain.GetAssemblies() + .Where(a => !a.IsDynamic && !string.IsNullOrEmpty(a.Location)) + .Where(a => !string.IsNullOrEmpty(a.FullName) && + (a.FullName.Contains("Volo.Abp") || + a.FullName.Contains("Kurs.Platform") || + a.FullName.Contains("Microsoft.AspNetCore"))) + .ToList(); + + foreach (var assembly in abpAssemblies) + { + references.Add(MetadataReference.CreateFromFile(assembly.Location)); + } + + _logger.LogDebug("Toplam {Count} referans eklendi", references.Count); + } + catch (Exception ex) + { + _logger.LogWarning(ex, "ABP referansları eklenirken hata"); + } + + return references; + } + + /// + /// Bir tipin ApplicationService olup olmadığını kontrol eder + /// + private bool IsApplicationServiceType(Type type) + { + try + { + return !type.IsAbstract && + !type.IsInterface && + type.IsClass && + (type.Name.EndsWith("AppService") || type.Name.EndsWith("ApplicationService")) && + HasApplicationServiceBase(type); + } + catch (Exception ex) + { + _logger.LogWarning(ex, "Tip kontrolü sırasında hata: {Type}", type?.FullName); + return false; + } + } + + /// + /// Tipin ApplicationService base class'ından türediğini kontrol eder + /// + private bool HasApplicationServiceBase(Type type) + { + var currentType = type.BaseType; + while (currentType != null) + { + if (currentType.Name.Contains("ApplicationService")) + { + return true; + } + currentType = currentType.BaseType; + } + return false; + } + + /// + /// Kod içinde belirli bir string'in satır numarasını bulur + /// + private int GetLineNumber(string code, string searchText) + { + var lines = code.Split('\n'); + for (int i = 0; i < lines.Length; i++) + { + if (lines[i].Contains(searchText)) + { + return i + 1; + } + } + return 1; + } +} diff --git a/api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceManager.cs b/api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceManager.cs new file mode 100644 index 00000000..76f1ef4e --- /dev/null +++ b/api/src/Kurs.Platform.Application/DeveloperKit/DynamicServiceManager.cs @@ -0,0 +1,375 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.MultiTenancy; +using Microsoft.AspNetCore.Authorization; +using Kurs.Platform.Entities; +using Kurs.Platform.DeveloperKit; + +namespace Kurs.Platform.DynamicServices; + +/// +/// Dynamic AppService yönetimi için ApplicationService implementasyonu +/// +[Authorize] // Sadece giriş yapmış kullanıcılar erişebilir +public class DynamicServiceManager : ApplicationService, IDynamicServiceManager +{ + private readonly IRepository _dynamicAppServiceRepository; + private readonly DynamicServiceCompiler _compiler; + private readonly ICurrentTenant _currentTenant; + + public DynamicServiceManager( + IRepository dynamicAppServiceRepository, + DynamicServiceCompiler compiler, + ICurrentTenant currentTenant) + { + _dynamicAppServiceRepository = dynamicAppServiceRepository; + _compiler = compiler; + _currentTenant = currentTenant; + } + + /// + /// C# kodunu test compile eder + /// + [Authorize(PlatformConsts.DynamicServices.TestCompile)] + public async Task TestCompileAsync(TestCompileRequestDto request) + { + Logger.LogInformation("Test compile başlatıldı. Tenant: {TenantId}", _currentTenant.Id); + + try + { + var result = await _compiler.CompileAndValidateAsync(request.Code, _currentTenant.Id); + + Logger.LogInformation("Test compile tamamlandı. Başarılı: {Success}, Tenant: {TenantId}", + result.Success, _currentTenant.Id); + + return result; + } + catch (Exception ex) + { + Logger.LogError(ex, "Test compile sırasında hata. Tenant: {TenantId}", _currentTenant.Id); + throw; + } + } + + /// + /// AppService'i yayınlar + /// + [Authorize(PlatformConsts.DynamicServices.Publish)] + public async Task PublishAsync(PublishAppServiceRequestDto request) + { + Logger.LogInformation("AppService yayınlama başlatıldı. Ad: {Name}, Tenant: {TenantId}", + request.Name, _currentTenant.Id); + + try + { + // Önce kodu test compile et + var compileResult = await _compiler.CompileAndValidateAsync(request.Code, _currentTenant.Id); + if (!compileResult.Success) + { + return new PublishResultDto + { + Success = false, + ErrorMessage = compileResult.ErrorMessage + }; + } + + // Aynı isimde AppService var mı kontrol et + var existingService = await _dynamicAppServiceRepository + .FirstOrDefaultAsync(x => x.Name == request.Name && x.TenantId == _currentTenant.Id); + + DynamicService appService; + + if (existingService != null) + { + // Mevcut servisi güncelle + existingService.UpdateCode(request.Code); + existingService.DisplayName = request.DisplayName; + existingService.Description = request.Description; + existingService.PrimaryEntityType = request.PrimaryEntityType; + + appService = await _dynamicAppServiceRepository.UpdateAsync(existingService); + Logger.LogInformation("Mevcut AppService güncellendi. ID: {Id}", appService.Id); + } + else + { + // Yeni servis oluştur + appService = new DynamicService( + GuidGenerator.Create(), + request.Name, + request.Code, + _currentTenant.Id) + { + DisplayName = request.DisplayName, + Description = request.Description, + PrimaryEntityType = request.PrimaryEntityType, + ControllerName = GenerateControllerName(request.Name) + }; + + appService = await _dynamicAppServiceRepository.InsertAsync(appService); + Logger.LogInformation("Yeni AppService oluşturuldu. ID: {Id}", appService.Id); + } + + // Runtime'da derle ve yükle + var assemblyName = $"DynamicAppService_{appService.Id}_{appService.Version}"; + var loadResult = await _compiler.CompileAndRegisterForTenantAsync( + _currentTenant.Id ?? Guid.Empty, + request.Code, + assemblyName); + + if (loadResult.Success) + { + // Başarılı derleme durumunu kaydet + appService.MarkCompilationSuccess(); + await _dynamicAppServiceRepository.UpdateAsync(appService); + + var result = new PublishResultDto + { + Success = true, + AppServiceId = appService.Id, + ControllerName = appService.ControllerName, + SwaggerUrl = "/swagger/index.html", + GeneratedEndpoints = GenerateEndpointList(request.Name) + }; + + Logger.LogInformation("AppService başarıyla yayınlandı. ID: {Id}, Controller: {Controller}", + appService.Id, appService.ControllerName); + + return result; + } + else + { + // Derleme hatası durumunu kaydet + appService.MarkCompilationError(loadResult.ErrorMessage); + await _dynamicAppServiceRepository.UpdateAsync(appService); + + return new PublishResultDto + { + Success = false, + ErrorMessage = loadResult.ErrorMessage, + AppServiceId = appService.Id + }; + } + } + catch (Exception ex) + { + Logger.LogError(ex, "AppService yayınlama sırasında hata. Ad: {Name}, Tenant: {TenantId}", + request.Name, _currentTenant.Id); + + return new PublishResultDto + { + Success = false, + ErrorMessage = $"Yayınlama sırasında beklenmeyen hata: {ex.Message}" + }; + } + } + + /// + /// AppService listesini getirir + /// + [Authorize(PlatformConsts.DynamicServices.DynamicAppServices)] + public async Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + Logger.LogDebug("AppService listesi istendi. Tenant: {TenantId}", _currentTenant.Id); + + var queryable = await _dynamicAppServiceRepository.GetQueryableAsync(); + + // Tenant filtresi otomatik uygulanır (IMultiTenant) + var query = queryable.WhereIf(!string.IsNullOrEmpty(input.Sorting), + x => x.CreationTime.ToString().Contains(input.Sorting ?? "")); + + var totalCount = await AsyncExecuter.CountAsync(query); + + var items = await AsyncExecuter.ToListAsync( + query.OrderByDescending(x => x.CreationTime) + .Skip(input.SkipCount) + .Take(input.MaxResultCount) + ); + + var dtos = ObjectMapper.Map, List>(items); + + Logger.LogDebug("AppService listesi döndürüldü. Toplam: {Total}, Dönen: {Count}", + totalCount, dtos.Count); + + return new PagedResultDto(totalCount, dtos); + } + + /// + /// Belirli bir AppService'i getirir + /// + [Authorize(PlatformConsts.DynamicServices.ViewCode)] + public async Task GetAsync(Guid id) + { + Logger.LogDebug("AppService detayı istendi. ID: {Id}, Tenant: {TenantId}", id, _currentTenant.Id); + + var appService = await _dynamicAppServiceRepository.GetAsync(id); + var dto = ObjectMapper.Map(appService); + + return dto; + } + + /// + /// AppService'i siler + /// + [Authorize(PlatformConsts.DynamicServices.Delete)] + public async Task DeleteAsync(Guid id) + { + Logger.LogInformation("AppService silme işlemi başlatıldı. ID: {Id}, Tenant: {TenantId}", + id, _currentTenant.Id); + + var appService = await _dynamicAppServiceRepository.GetAsync(id); + + // TODO: Runtime'dan assembly'yi kaldırma işlemi + // (AssemblyLoadContext.Unload() çağrısı) + + await _dynamicAppServiceRepository.DeleteAsync(id); + + Logger.LogInformation("AppService silindi. ID: {Id}", id); + } + + /// + /// AppService'i aktif/pasif yapar + /// + [Authorize(PlatformConsts.DynamicServices.Manage)] + public async Task SetActiveAsync(Guid id, bool isActive) + { + Logger.LogInformation("AppService aktiflik durumu değiştiriliyor. ID: {Id}, Aktif: {Active}", + id, isActive); + + var appService = await _dynamicAppServiceRepository.GetAsync(id); + appService.IsActive = isActive; + + await _dynamicAppServiceRepository.UpdateAsync(appService); + + Logger.LogInformation("AppService aktiflik durumu güncellendi. ID: {Id}, Aktif: {Active}", + id, isActive); + } + + /// + /// Tüm aktif AppService'leri yeniden yükler + /// + [Authorize(PlatformConsts.DynamicServices.Manage)] + public async Task ReloadAllActiveServicesAsync() + { + Logger.LogInformation("Tüm aktif AppService'ler yeniden yükleniyor. Tenant: {TenantId}", + _currentTenant.Id); + + var activeServices = await _dynamicAppServiceRepository + .GetListAsync(x => x.IsActive && x.CompilationStatus == CompilationStatus.Success); + + var successCount = 0; + var errorCount = 0; + + foreach (var service in activeServices) + { + try + { + var assemblyName = $"DynamicAppService_{service.Id}_{service.Version}"; + var result = await _compiler.CompileAndRegisterForTenantAsync( + _currentTenant.Id ?? Guid.Empty, + service.Code, + assemblyName); + + if (result.Success) + { + successCount++; + Logger.LogDebug("AppService yeniden yüklendi. ID: {Id}, Ad: {Name}", + service.Id, service.Name); + } + else + { + errorCount++; + service.MarkCompilationError(result.ErrorMessage); + await _dynamicAppServiceRepository.UpdateAsync(service); + + Logger.LogWarning("AppService yeniden yüklenemedi. ID: {Id}, Hata: {Error}", + service.Id, result.ErrorMessage); + } + } + catch (Exception ex) + { + errorCount++; + Logger.LogError(ex, "AppService yeniden yükleme hatası. ID: {Id}", service.Id); + + service.MarkCompilationError(ex.Message); + await _dynamicAppServiceRepository.UpdateAsync(service); + } + } + + Logger.LogInformation("AppService yeniden yükleme tamamlandı. Başarılı: {Success}, Hatalı: {Error}, Toplam: {Total}", + successCount, errorCount, activeServices.Count); + } + + /// + /// Belirli bir AppService'i yeniden derler + /// + [Authorize(PlatformConsts.DynamicServices.Manage)] + public async Task RecompileAsync(Guid id) + { + Logger.LogInformation("AppService yeniden derleniyor. ID: {Id}", id); + + var appService = await _dynamicAppServiceRepository.GetAsync(id); + + var assemblyName = $"DynamicAppService_{appService.Id}_{appService.Version + 1}"; + var result = await _compiler.CompileAndRegisterForTenantAsync( + _currentTenant.Id ?? Guid.Empty, + appService.Code, + assemblyName); + + if (result.Success) + { + appService.MarkCompilationSuccess(); + appService.Version++; + } + else + { + appService.MarkCompilationError(result.ErrorMessage); + } + + await _dynamicAppServiceRepository.UpdateAsync(appService); + + Logger.LogInformation("AppService yeniden derleme tamamlandı. ID: {Id}, Başarılı: {Success}", + id, result.Success); + + return result; + } + + /// + /// Controller adını oluşturur + /// + private string GenerateControllerName(string serviceName) + { + // DynamicCustomerAppService -> DynamicCustomer + var controllerName = serviceName; + if (controllerName.EndsWith("AppService")) + { + controllerName = controllerName.Substring(0, controllerName.Length - "AppService".Length); + } + else if (controllerName.EndsWith("ApplicationService")) + { + controllerName = controllerName.Substring(0, controllerName.Length - "ApplicationService".Length); + } + + return controllerName; + } + + /// + /// Örnek endpoint listesi oluşturur + /// + private List GenerateEndpointList(string serviceName) + { + var controllerName = GenerateControllerName(serviceName); + + return new List + { + $"/api/app/{controllerName.ToLowerInvariant()}", + $"/api/app/{controllerName.ToLowerInvariant()}/{{id}}", + $"/api/app/{controllerName.ToLowerInvariant()}/list" + }; + } +} diff --git a/api/src/Kurs.Platform.Application/Kurs.Platform.Application.csproj b/api/src/Kurs.Platform.Application/Kurs.Platform.Application.csproj index 4a184c1b..deef89c2 100644 --- a/api/src/Kurs.Platform.Application/Kurs.Platform.Application.csproj +++ b/api/src/Kurs.Platform.Application/Kurs.Platform.Application.csproj @@ -26,6 +26,9 @@ + + + diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json index c2d645e1..754836e3 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json @@ -9937,6 +9937,12 @@ "en": "fields", "tr": "alan" }, + { + "resourceName": "Platform", + "key": "App.DeveloperKit.DynamicServices", + "en": "Dynamic Services", + "tr": "Dinamik Hizmetler" + }, { "resourceName": "Platform", "key": "App.DeveloperKit.Migration.Generating", diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json index e8ddeddf..9e5ec69c 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/MenusData.json @@ -350,6 +350,15 @@ "App.DeveloperKit.Endpoints" ] }, + { + "key": "admin.developerkit.dynamic-services", + "path": "/admin/developerkit/dynamic-services", + "componentPath": "@/views/developerKit/DynamicServicePage", + "routeType": "protected", + "authority": [ + "App.DeveloperKit.DynamicServices" + ] + }, { "key": "admin.developerkit.components", "path": "/admin/developerkit/components", @@ -1646,6 +1655,16 @@ "RequiredPermissionName": "App.DeveloperKit.CustomEndpoints", "IsDisabled": false }, + { + "ParentCode": "App.DeveloperKit", + "Code": "App.DeveloperKit.DynamicServices", + "DisplayName": "App.DeveloperKit.DynamicServices", + "Order": 5, + "Url": "/admin/developerkit/dynamic-services", + "Icon": "FcCommandLine", + "RequiredPermissionName": "App.DeveloperKit.DynamicServices", + "IsDisabled": false + }, { "ParentCode": "App.DeveloperKit", "Code": "App.DeveloperKit.Components", diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionsData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionsData.json index a31eb6ef..3229e9e1 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionsData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionsData.json @@ -2335,6 +2335,78 @@ "MultiTenancySide": 3, "MenuGroup": "Erp|Kurs" }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices", + "ParentName": "App.DeveloperKit", + "DisplayName": "App.DeveloperKit.DynamicServices", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices.Create", + "ParentName": "App.DeveloperKit.DynamicServices", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices.Update", + "ParentName": "App.DeveloperKit.DynamicServices", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices.Delete", + "ParentName": "App.DeveloperKit.DynamicServices", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices.Manage", + "ParentName": "App.DeveloperKit.DynamicServices", + "DisplayName": "Manage", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices.TestCompile", + "ParentName": "App.DeveloperKit.DynamicServices", + "DisplayName": "TestCompile", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices.Publish", + "ParentName": "App.DeveloperKit.DynamicServices", + "DisplayName": "Publish", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, + { + "GroupName": "App.Administration", + "Name": "App.DeveloperKit.DynamicServices.ViewCode", + "ParentName": "App.DeveloperKit.DynamicServices", + "DisplayName": "ViewCode", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp|Kurs" + }, { "GroupName": "App.Administration", "Name": "App.Reports.Categories", diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs index bff559cd..6fde5742 100644 --- a/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/TableNameEnum.cs @@ -145,5 +145,6 @@ public enum TableNameEnum Partner, PartnerBank, PartnerCertificate, - PartnerContact + PartnerContact, + DynamicService } \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index 3c8f4adc..4c4e4de5 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -71,6 +71,20 @@ public static class PlatformConsts public const string MenuGroup = "MenuGroup"; } + public static class DynamicServices + { + public const string GroupName = "DynamicServices"; + + public const string DynamicAppServices = GroupName + ".DynamicAppServices"; + public const string Create = DynamicAppServices + ".Create"; + public const string Edit = DynamicAppServices + ".Edit"; + public const string Delete = DynamicAppServices + ".Delete"; + public const string Manage = DynamicAppServices + ".Manage"; + public const string TestCompile = DynamicAppServices + ".TestCompile"; + public const string Publish = DynamicAppServices + ".Publish"; + public const string ViewCode = DynamicAppServices + ".ViewCode"; + } + public static class AbpIdentity { public const string GroupName = $"{Prefix.Abp}.Identity"; diff --git a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs index 9c5d4384..365444a6 100644 --- a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs @@ -12,6 +12,7 @@ public static class TableNameResolver _map = new(StringComparer.OrdinalIgnoreCase) { // 🔹 MODULE TABLOLARI + { nameof(TableNameEnum.DynamicService), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.LogEntry), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.Language), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, { nameof(TableNameEnum.LanguageKey), (TablePrefix.PlatformByName, MenuPrefix.Platform) }, diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Administration/DynamicService.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Administration/DynamicService.cs new file mode 100644 index 00000000..6cfa9d02 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Administration/DynamicService.cs @@ -0,0 +1,174 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Volo.Abp; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Kurs.Platform.Entities; + +/// +/// Tenant bazında dinamik olarak tanımlanmış AppService'lerin kod ve meta verilerini saklar +/// +public class DynamicService : FullAuditedEntity, IMultiTenant +{ + /// + /// Tenant ID - IMultiTenant implementasyonu + /// + public Guid? TenantId { get; set; } + + /// + /// AppService'in benzersiz adı (örn: "DynamicCustomerService") + /// + [Required] + [StringLength(256)] + public string Name { get; set; } + + /// + /// AppService'in kullanıcı dostu başlığı + /// + [StringLength(512)] + public string? DisplayName { get; set; } + + /// + /// AppService açıklaması + /// + [StringLength(2000)] + public string? Description { get; set; } + + /// + /// Tam C# sınıf kodu (using'ler ve namespace dahil) + /// + [Required] + public string Code { get; set; } + + /// + /// AppService aktif mi? + /// + public bool IsActive { get; set; } + + /// + /// Son derleme durumu + /// + public CompilationStatus CompilationStatus { get; set; } + + /// + /// Son derleme hatası (varsa) + /// + public string? LastCompilationError { get; set; } + + /// + /// Son başarılı derleme zamanı + /// + public DateTime? LastSuccessfulCompilation { get; set; } + + /// + /// Kod versiyonu (her güncelleme ile artan numara) + /// + public int Version { get; set; } + + /// + /// Kod hash'i (değişiklik kontrolü için) + /// + [StringLength(64)] + public string? CodeHash { get; set; } + + /// + /// AppService'in kullandığı ana entity türü (opsiyonel) + /// + [StringLength(256)] + public string? PrimaryEntityType { get; set; } + + /// + /// Swagger'da görünecek controller adı + /// + [StringLength(256)] + public string? ControllerName { get; set; } + + protected DynamicService() + { + // EF Core constructor + } + + public DynamicService( + Guid id, + string name, + string code, + Guid? tenantId = null) : base(id) + { + Name = Check.NotNullOrWhiteSpace(name, nameof(name), maxLength: 256); + Code = Check.NotNullOrWhiteSpace(code, nameof(code)); + TenantId = tenantId; + IsActive = true; + CompilationStatus = CompilationStatus.Pending; + Version = 1; + } + + /// + /// Kodu günceller ve versiyonu artırır + /// + public void UpdateCode(string newCode) + { + Check.NotNullOrWhiteSpace(newCode, nameof(newCode)); + + if (Code != newCode) + { + Code = newCode; + Version++; + CompilationStatus = CompilationStatus.Pending; + LastCompilationError = null; + CodeHash = GenerateCodeHash(newCode); + } + } + + /// + /// Derleme başarısını işaretler + /// + public void MarkCompilationSuccess() + { + CompilationStatus = CompilationStatus.Success; + LastCompilationError = null; + LastSuccessfulCompilation = DateTime.UtcNow; + } + + /// + /// Derleme hatasını işaretler + /// + public void MarkCompilationError(string error) + { + CompilationStatus = CompilationStatus.Failed; + LastCompilationError = error; + } + + private string GenerateCodeHash(string code) + { + using var sha256 = System.Security.Cryptography.SHA256.Create(); + var hash = sha256.ComputeHash(System.Text.Encoding.UTF8.GetBytes(code)); + return Convert.ToHexString(hash); + } +} + +/// +/// Derleme durumu enum'u +/// +public enum CompilationStatus +{ + /// + /// Henüz derlenmedi + /// + Pending = 0, + + /// + /// Derleme başarılı + /// + Success = 1, + + /// + /// Derleme başarısız + /// + Failed = 2, + + /// + /// Derleme işlemi devam ediyor + /// + InProgress = 3 +} diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index fc676dff..2127639b 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -26,6 +26,7 @@ using System.Text.Json; using static Kurs.Platform.PlatformConsts; using static Kurs.Settings.SettingsConsts; using Kurs.Platform.Enums; +using Kurs.Platform.Domain.DeveloperKit; namespace Kurs.Platform.EntityFrameworkCore; @@ -63,6 +64,7 @@ public class PlatformDbContext : public DbSet GeneratedEndpoints { get; set; } public DbSet CustomEndpoints { get; set; } public DbSet CustomComponents { get; set; } + public DbSet DynamicServices { get; set; } public DbSet ReportTemplates { get; set; } public DbSet ReportParameters { get; set; } public DbSet ReportGenerated { get; set; } @@ -100,6 +102,8 @@ public class PlatformDbContext : public DbSet Contacts { get; set; } public DbSet Sectors { get; set; } public DbSet SkillTypes { get; set; } + + // Dynamic Services public DbSet Skills { get; set; } public DbSet SkillLevels { get; set; } public DbSet UomCategories { get; set; } @@ -2444,5 +2448,24 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.LogEntry)), Prefix.DbSchema); b.ConfigureByConvention(); }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.DynamicService)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.Name).IsRequired().HasMaxLength(256); + b.Property(x => x.DisplayName).HasMaxLength(512); + b.Property(x => x.Description).HasMaxLength(2000); + b.Property(x => x.Code).IsRequired().HasColumnType("text"); // Uzun C# kod metni için + b.Property(x => x.IsActive).IsRequired().HasDefaultValue(true); + b.Property(x => x.CompilationStatus).IsRequired().HasConversion().HasMaxLength(20); + b.Property(x => x.LastCompilationError).HasColumnType("text"); // Uzun hata mesajları için + b.Property(x => x.LastSuccessfulCompilation).IsRequired(false); + b.Property(x => x.Version).IsRequired().HasDefaultValue(1); + b.Property(x => x.CodeHash).HasMaxLength(64); + b.Property(x => x.PrimaryEntityType).HasMaxLength(256); + b.Property(x => x.ControllerName).HasMaxLength(256); + }); } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.Designer.cs new file mode 100644 index 00000000..436eed89 --- /dev/null +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.Designer.cs @@ -0,0 +1,13841 @@ +// +using System; +using Kurs.Platform.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Kurs.Platform.Migrations +{ + [DbContext(typeof(PlatformDbContext))] + [Migration("20251104205840_DynamicService")] + partial class DynamicService + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "9.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Kurs.Languages.Entities.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TwoLetterISOLanguageName") + .HasColumnType("nvarchar(max)"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.HasKey("Id"); + + b.ToTable("Plat_H_Language", (string)null); + }); + + modelBuilder.Entity("Kurs.Languages.Entities.LanguageKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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("Key") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ResourceName", "Key") + .IsUnique(); + + b.ToTable("Plat_H_LanguageKey", (string)null); + }); + + modelBuilder.Entity("Kurs.Languages.Entities.LanguageText", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .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("Key") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ResourceName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.HasIndex("ResourceName", "Key"); + + b.ToTable("Plat_H_LanguageText", (string)null); + }); + + modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Attachment") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("AttachmentParameter") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("AwsMessageId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + 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("From") + .IsRequired() + .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("MailParameter") + .HasMaxLength(8000) + .HasColumnType("nvarchar(max)"); + + b.Property("RelatedRecordId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SendStatus") + .HasColumnType("bit"); + + b.Property("SendTime") + .HasColumnType("datetime2"); + + b.Property("TableName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TableParameter") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("To") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("TableName"); + + b.ToTable("Plat_H_BackgroundWorker_MailQueue", (string)null); + }); + + modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueEvents", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AwsMessageId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + 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("Event") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("EventDate") + .HasColumnType("datetime2"); + + 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("MailAddress") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ResponseDescription") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AwsMessageId"); + + b.ToTable("Plat_H_BackgroundWorker_MailQueueEvents", (string)null); + }); + + modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueTableFormat", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Caption") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ColumnName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Css") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("DataFormat") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DataType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FooterCss") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("HeaderCss") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("IsHidden") + .HasColumnType("bit"); + + b.Property("IsProtected") + .HasColumnType("bit"); + + b.Property("Order") + .HasColumnType("smallint"); + + b.Property("SubTotal") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Width") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TableName", "Order") + .IsUnique() + .HasDatabaseName("IX_MailQueueTableFormat"); + + b.ToTable("Plat_H_BackgroundWorker_MailQueueTableFormat", (string)null); + }); + + modelBuilder.Entity("Kurs.Notifications.Entities.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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("Identifier") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsRead") + .HasColumnType("bit"); + + b.Property("IsSent") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Message") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("NotificationChannel") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("NotificationRuleId") + .HasColumnType("uniqueidentifier"); + + b.Property("NotificationType") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ReadTime") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NotificationRuleId"); + + b.ToTable("Plat_H_Notification", (string)null); + }); + + modelBuilder.Entity("Kurs.Notifications.Entities.NotificationRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Channel") + .IsRequired() + .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("IsActive") + .HasColumnType("bit"); + + b.Property("IsCustomized") + .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("NotificationType") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("RecipientId") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("RecipientType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Plat_H_NotificationRule", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.About", 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("DescriptionsJson") + .HasColumnType("text"); + + 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("SectionsJson") + .HasColumnType("text"); + + b.Property("StatsJson") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_About", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Activity", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + 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("EntityId") + .HasColumnType("nvarchar(max)"); + + b.Property("EntityName") + .HasColumnType("nvarchar(max)"); + + b.Property("FilesJson") + .HasColumnType("nvarchar(max)"); + + 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("Subject") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_Activity", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BotName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("Plat_H_AiBot", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Attachments") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + 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("Departments") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Excerpt") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2"); + + b.Property("ImageUrl") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPinned") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PublishDate") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ViewCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("Net_T_Announcement", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CsharpCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsActive") + .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("Method") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("OperationType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityId"); + + b.ToTable("Sas_T_ApiEndpoint", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ApiMigration", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AppliedAt") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ErrorMessage") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SqlScript") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityId"); + + b.ToTable("Sas_T_ApiMigration", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BackgroundWorker", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AfterSp") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("BeforeSp") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Cron") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DataSourceCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("Options") + .HasColumnType("text"); + + b.Property("WorkerType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Plat_H_BackgroundWorker", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Badge", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BackgroundColor") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Category") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Color") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Criteria") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Icon") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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(150) + .HasColumnType("nvarchar(150)"); + + b.Property("Points") + .HasColumnType("int"); + + b.Property("Rarity") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Hr_T_Badge", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Bank", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address1") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Address2") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Country") + .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("District") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Email") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IdentifierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("PhoneNumber") + .HasMaxLength(64) + .HasColumnType("bigint"); + + b.Property("PostalCode") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Acc_T_Bank", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BankAccount", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccountNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AccountOwner") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("BankId") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanTransferMoney") + .HasColumnType("bit"); + + b.Property("Company") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + 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.HasKey("Id"); + + b.HasIndex("BankId"); + + b.ToTable("Acc_T_BankAccount", (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("Adm_T_Behavior", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", 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("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("Icon") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsActive") + .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(128) + .HasColumnType("nvarchar(128)"); + + b.Property("PostCount") + .HasColumnType("int"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Slug"); + + b.ToTable("Adm_T_BlogCategory", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("CommentCount") + .HasColumnType("int"); + + b.Property("ContentEn") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ContentTr") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoverImage") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LikeCount") + .HasColumnType("int"); + + b.Property("PublishedAt") + .HasColumnType("datetime2"); + + b.Property("ReadTime") + .HasColumnType("nvarchar(max)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Summary") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ViewCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("IsPublished"); + + b.HasIndex("PublishedAt"); + + b.HasIndex("Slug"); + + b.ToTable("Adm_T_BlogPost", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address1") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Address2") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("City") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .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("District") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Email") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("FaxNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("MobileNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("PhoneNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("PostalCode") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("Street") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TaxOffice") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("VknTckn") + .HasColumnType("bigint"); + + b.Property("Website") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_Branch", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "BranchId"); + + b.HasIndex("BranchId"); + + b.ToTable("Sas_T_BranchUsers", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Certificate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CertificateUrl") + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExpiryDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IssueDate") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Score") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TrainingId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("TrainingId"); + + b.ToTable("Net_T_Certificate", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.City", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("Country") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("CountryId") + .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("PlateCode") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("CountryId"); + + b.HasIndex("Country", "Code") + .IsUnique() + .HasFilter("[Country] IS NOT NULL"); + + b.ToTable("Sas_H_City", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Class", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .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("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("BranchId"); + + b.HasIndex("ClassTypeId"); + + b.ToTable("Crd_B_Class", (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("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("Crd_T_ClassCancellationReason", (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("BranchId"); + + b.HasIndex("RegistrationTypeId"); + + b.ToTable("Crd_B_ClassType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Classroom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActualEndTime") + .HasColumnType("datetime2"); + + b.Property("ActualStartTime") + .HasColumnType("datetime2"); + + 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("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Duration") + .HasColumnType("int"); + + 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("MaxParticipants") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ParticipantCount") + .HasColumnType("int"); + + b.Property("ScheduledEndTime") + .HasColumnType("datetime2"); + + b.Property("ScheduledStartTime") + .HasColumnType("datetime2"); + + b.Property("SettingsJson") + .HasColumnType("nvarchar(max)"); + + b.Property("Subject") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TeacherId") + .HasColumnType("uniqueidentifier"); + + b.Property("TeacherName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ScheduledStartTime"); + + b.HasIndex("TeacherId"); + + b.ToTable("Crd_T_Classroom", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", 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("JoinTime") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LeaveTime") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalDurationMinutes") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("JoinTime"); + + b.HasIndex("SessionId"); + + b.HasIndex("StudentId"); + + b.ToTable("Crd_T_ClassroomAttandance", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassroomChat", 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("IsTeacher") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Message") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("MessageType") + .HasColumnType("nvarchar(max)"); + + b.Property("RecipientId") + .HasColumnType("uniqueidentifier"); + + b.Property("RecipientName") + .HasColumnType("nvarchar(max)"); + + b.Property("SenderId") + .HasColumnType("uniqueidentifier"); + + b.Property("SenderName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SessionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Timestamp") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("SenderId"); + + b.HasIndex("SessionId"); + + b.HasIndex("Timestamp"); + + b.ToTable("Crd_T_ClassroomChat", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassroomParticipant", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConnectionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + 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("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsAudioMuted") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHandRaised") + .HasColumnType("bit"); + + b.Property("IsKicked") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsTeacher") + .HasColumnType("bit"); + + b.Property("IsVideoMuted") + .HasColumnType("bit"); + + b.Property("JoinTime") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SessionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("SessionId"); + + b.HasIndex("UserId"); + + b.HasIndex("SessionId", "UserId") + .IsUnique() + .HasFilter("[UserId] IS NOT NULL"); + + b.ToTable("Crd_T_ClassroomParticipant", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Contact", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("BankJson") + .HasColumnType("text"); + + 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(150) + .HasColumnType("nvarchar(150)"); + + 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("Location") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("MapJson") + .HasColumnType("text"); + + b.Property("PhoneNumber") + .HasMaxLength(50) + .HasColumnType("bigint"); + + b.Property("TaxNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WorkHoursJson") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_Contact", (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("Sas_H_ContactTag", (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("Sas_H_ContactTitle", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActualAmount") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("BudgetedAmount") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CostCenterType") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("FiscalYear") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("ParentCostCenterId") + .HasColumnType("uniqueidentifier"); + + b.Property("ResponsibleEmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ParentCostCenterId"); + + b.HasIndex("ResponsibleEmployeeId"); + + b.ToTable("Hr_T_CostCenter", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Country", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("GroupName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + 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("PhoneCode") + .HasColumnType("int"); + + b.Property("StateRequired") + .HasColumnType("bit"); + + b.Property("TaxLabel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ZipRequired") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("GroupName"); + + b.ToTable("Sas_H_Country", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CountryGroup", 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.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Sas_H_CountryGroup", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Currency", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + 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("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("LastUpdated") + .HasColumnType("datetime2"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Rate") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("Symbol") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.HasKey("Id"); + + b.ToTable("Sas_H_Currency", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomComponent", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + 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("Dependencies") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .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(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Props") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_CustomComponent", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomEndpoint", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DataSourceCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + 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("Method") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParametersJson") + .HasColumnType("text"); + + b.Property("PermissionsJson") + .HasColumnType("text"); + + b.Property("Sql") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_CustomEndpoint", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomEntity", 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("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("EndpointStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("HasAuditFields") + .HasColumnType("bit"); + + b.Property("HasSoftDelete") + .HasColumnType("bit"); + + b.Property("IsActive") + .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("MigrationId") + .HasColumnType("uniqueidentifier"); + + b.Property("MigrationStatus") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TableName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_CustomEntity", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomEntityField", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("EntityId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsRequired") + .HasColumnType("bit"); + + b.Property("IsUnique") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxLength") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("EntityId"); + + b.ToTable("Sas_T_CustomEntityField", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomerSegment", 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("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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.HasKey("Id"); + + b.ToTable("Crm_T_CustomerSegment", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomerType", 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("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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.HasKey("Id"); + + b.ToTable("Crm_T_CustomerType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.DataSource", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ConnectionString") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DataSourceType") + .HasColumnType("int"); + + 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.HasKey("Id"); + + b.ToTable("Sas_H_DataSource", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Demo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + 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") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + 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("Message") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("NumberOfBranches") + .HasColumnType("int"); + + b.Property("NumberOfUsers") + .HasColumnType("int"); + + b.Property("OrganizationName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PhoneNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_Demo", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Department", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Budget") + .ValueGeneratedOnAdd() + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)") + .HasDefaultValue(0m); + + b.Property("Code") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CostCenterId") + .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(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("ManagerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ParentDepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CostCenterId"); + + b.HasIndex("ManagerId"); + + b.HasIndex("ParentDepartmentId"); + + b.ToTable("Hr_T_Department", (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("Adm_T_Disease", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.District", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("CityId") + .HasColumnType("uniqueidentifier"); + + b.Property("Country") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + 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("Street") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Township") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ZipCode") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.HasKey("Id"); + + b.HasIndex("CityId"); + + b.HasIndex("Country", "City", "Name", "Township", "Street", "ZipCode") + .IsUnique() + .HasFilter("[Country] IS NOT NULL AND [Township] IS NOT NULL AND [Street] IS NOT NULL AND [ZipCode] IS NOT NULL"); + + b.ToTable("Sas_H_District", (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("Adm_T_Document", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.DynamicService", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasColumnType("text"); + + b.Property("CodeHash") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompilationStatus") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("ControllerName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + 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(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("DisplayName") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastCompilationError") + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastSuccessfulCompilation") + .HasColumnType("datetime2"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PrimaryEntityType") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.HasKey("Id"); + + b.ToTable("Plat_H_DynamicService", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", 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("Order") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_EducationStatus", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Employee", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address1") + .HasColumnType("nvarchar(max)"); + + b.Property("Address2") + .HasColumnType("nvarchar(max)"); + + b.Property("Avatar") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("BadgeId") + .HasColumnType("uniqueidentifier"); + + b.Property("BankAccountId") + .HasColumnType("uniqueidentifier"); + + b.Property("BaseSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("City") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Country") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("District") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("EmergencyContactName") + .HasColumnType("nvarchar(max)"); + + b.Property("EmergencyContactPhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("EmergencyContactRelationship") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("EmploymentTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("FullName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Gender") + .HasColumnType("nvarchar(max)"); + + b.Property("HireDate") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JobPositionId") + .HasColumnType("uniqueidentifier"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManagerId") + .HasColumnType("uniqueidentifier"); + + b.Property("MaritalStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("MobileNumber") + .HasMaxLength(50) + .HasColumnType("bigint"); + + b.Property("NationalId") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("PayrollGroup") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PhoneNumber") + .HasMaxLength(50) + .HasColumnType("bigint"); + + b.Property("PostalCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Street") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TerminationDate") + .HasColumnType("datetime2"); + + b.Property("WorkLocation") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.HasKey("Id"); + + b.HasIndex("BadgeId"); + + b.HasIndex("BankAccountId"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("EmploymentTypeId"); + + b.HasIndex("JobPositionId"); + + b.HasIndex("ManagerId"); + + b.ToTable("Hr_T_Employee", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EmploymentType", 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("Hr_T_EmploymentType", (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("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + 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("Likes") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ParticipantsCount") + .HasColumnType("int"); + + 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.Property("isPublished") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("TypeId"); + + b.ToTable("Net_T_Event", (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("Net_T_EventCategory", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("EventId") + .HasColumnType("uniqueidentifier"); + + 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("Likes") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EventId"); + + b.ToTable("Net_T_EventComment", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", 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("EventId") + .HasColumnType("uniqueidentifier"); + + 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("Url") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("EventId"); + + b.ToTable("Net_T_EventPhoto", (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("Net_T_EventType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Expense", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Amount") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ApprovalDate") + .HasColumnType("datetime2"); + + b.Property("ApproverId") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + 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("Notes") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Project") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("RejectionReason") + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.Property("RequestDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ApproverId"); + + b.HasIndex("EmployeeId"); + + b.ToTable("Hr_T_Expense", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.GlobalSearch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Group") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("System") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Term") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Weight") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_GlobalSearch", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.InstallmentOption", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Commission") + .HasPrecision(5, 3) + .HasColumnType("decimal(5,3)"); + + 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("Installment") + .HasColumnType("int"); + + 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(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_InstallmentOption", (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("Prt_T_Interesting", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.IpRestriction", 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("IP") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + 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("ResourceId") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ResourceType") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_IpRestriction", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("Level") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaxSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("MinSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("Qualifications") + .HasColumnType("text"); + + b.Property("RequiredSkills") + .HasColumnType("text"); + + b.Property("Responsibilities") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("Hr_T_JobPosition", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Lawyer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + 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("FaxNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("FullName") + .IsRequired() + .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("MobileNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("PhoneNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + 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("Adm_T_Lawyer", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Leave", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AppliedDate") + .HasColumnType("datetime2"); + + b.Property("ApprovedById") + .HasColumnType("uniqueidentifier"); + + b.Property("ApprovedDate") + .HasColumnType("datetime2"); + + b.Property("Attachments") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHalfDay") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LeaveType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Reason") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("RejectionReason") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalDays") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("Hr_T_Leave", (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.HasIndex("BranchId"); + + b.ToTable("Crd_B_LessonPeriod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .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("LevelType") + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("MonthlyPaymentRate") + .HasPrecision(18, 4) + .HasColumnType("decimal(18,4)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("BranchId"); + + b.HasIndex("ClassTypeId"); + + b.ToTable("Crd_B_Level", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListForm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdaptiveLayoutJson") + .HasColumnType("text"); + + b.Property("AnimationJson") + .HasColumnType("text"); + + b.Property("AnnotationsJson") + .HasColumnType("text"); + + b.Property("ArgumentAxisJson") + .HasColumnType("text"); + + b.Property("ColumnOptionJson") + .HasColumnType("text"); + + b.Property("CommandColumnJson") + .HasColumnType("text"); + + b.Property("CommonAnnotationsSettingsJson") + .HasColumnType("text"); + + b.Property("CommonAxisSettingsJson") + .HasColumnType("text"); + + b.Property("CommonJson") + .HasColumnType("text"); + + b.Property("CommonPaneSettingsJson") + .HasColumnType("text"); + + b.Property("CommonSeriesSettingsJson") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CrosshairJson") + .HasColumnType("text"); + + b.Property("CultureName") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("CustomJsSourcesJson") + .HasColumnType("text"); + + b.Property("CustomStyleSourcesJson") + .HasColumnType("text"); + + b.Property("DataSourceCode") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("DataSourceJson") + .HasColumnType("text"); + + b.Property("DefaultFilter") + .HasColumnType("text"); + + b.Property("DeleteCommand") + .HasColumnType("text"); + + b.Property("DeleteFieldsDefaultValueJson") + .HasColumnType("text"); + + b.Property("DeleteServiceAddress") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("EditingFormJson") + .HasColumnType("text"); + + b.Property("EditingOptionJson") + .HasColumnType("text"); + + b.Property("ExportJson") + .HasColumnType("text"); + + b.Property("ExtraFilterJson") + .HasColumnType("text"); + + b.Property("FilterPanelJson") + .HasColumnType("text"); + + b.Property("FilterRowJson") + .HasColumnType("text"); + + b.Property("FormFieldsDefaultValueJson") + .HasColumnType("text"); + + b.Property("GroupPanelJson") + .HasColumnType("text"); + + b.Property("HeaderFilterJson") + .HasColumnType("text"); + + b.Property("Height") + .HasColumnType("int"); + + b.Property("InsertCommand") + .HasColumnType("text"); + + b.Property("InsertFieldsDefaultValueJson") + .HasColumnType("text"); + + b.Property("InsertServiceAddress") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("IsBranch") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsOrganizationUnit") + .HasColumnType("bit"); + + b.Property("IsSubForm") + .HasColumnType("bit"); + + b.Property("IsTenant") + .HasColumnType("bit"); + + b.Property("KeyFieldDbSourceType") + .HasColumnType("int"); + + b.Property("KeyFieldName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LayoutJson") + .HasColumnType("text"); + + b.Property("LegendJson") + .HasColumnType("text"); + + b.Property("ListFormCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ListFormType") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("MarginJson") + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("PageSize") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(20); + + b.Property("PagerOptionJson") + .HasColumnType("text"); + + b.Property("PanesJson") + .HasColumnType("text"); + + b.Property("PermissionJson") + .HasColumnType("text"); + + b.Property("PivotOptionJson") + .HasColumnType("text"); + + b.Property("RoleId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("RowJson") + .HasColumnType("nvarchar(max)"); + + b.Property("ScrollBarJson") + .HasColumnType("text"); + + b.Property("SearchPanelJson") + .HasColumnType("text"); + + b.Property("SelectCommand") + .HasColumnType("text"); + + b.Property("SelectCommandType") + .HasColumnType("int"); + + b.Property("SelectFieldsDefaultValueJson") + .HasColumnType("text"); + + b.Property("SelectionJson") + .HasColumnType("text"); + + b.Property("SeriesJson") + .HasColumnType("text"); + + b.Property("ShowActivity") + .HasColumnType("bit"); + + b.Property("SizeJson") + .HasColumnType("text"); + + b.Property("SortMode") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("StateStoringJson") + .HasColumnType("text"); + + b.Property("SubFormsJson") + .HasColumnType("text"); + + b.Property("TableName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Title") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TitleJson") + .HasColumnType("text"); + + b.Property("TooltipJson") + .HasColumnType("text"); + + b.Property("UpdateCommand") + .HasColumnType("text"); + + b.Property("UpdateFieldsDefaultValueJson") + .HasColumnType("text"); + + b.Property("UpdateServiceAddress") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("UserId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ValueAxisJson") + .HasColumnType("text"); + + b.Property("WidgetsJson") + .HasColumnType("text"); + + b.Property("Width") + .HasColumnType("int"); + + b.Property("ZoomAndPanJson") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Sas_H_ListForm", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomizationData") + .HasColumnType("text"); + + b.Property("CustomizationType") + .HasColumnType("int"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("FilterName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + 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("ListFormCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoleId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("UserId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("ListFormCode"); + + b.ToTable("Sas_H_ListFormCustomization", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormField", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Alignment") + .ValueGeneratedOnAdd() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)") + .HasDefaultValue("left"); + + b.Property("AllowSearch") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("BandName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("CaptionName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ColumnCssClass") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ColumnCssValue") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ColumnCustomizationJson") + .HasColumnType("text"); + + b.Property("ColumnFilterJson") + .HasColumnType("text"); + + b.Property("ColumnHeaderJson") + .HasColumnType("text"); + + b.Property("ColumnStylingJson") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EditingJson") + .HasColumnType("text"); + + b.Property("EditorOptions") + .HasColumnType("text"); + + b.Property("FieldName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Format") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("GroupSummaryJson") + .HasColumnType("text"); + + b.Property("GroupingJson") + .HasColumnType("text"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JoinTableJson") + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ListFormCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ListOrderNo") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(30); + + b.Property("LookupJson") + .HasColumnType("text"); + + b.Property("PermissionJson") + .HasColumnType("text"); + + b.Property("PivotSettingsJson") + .HasColumnType("text"); + + b.Property("RoleId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("SortDirection") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("SortIndex") + .HasColumnType("int"); + + b.Property("SourceDbType") + .HasColumnType("int"); + + b.Property("TotalSummaryJson") + .HasColumnType("text"); + + b.Property("UserId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ValidationRuleJson") + .HasColumnType("text"); + + b.Property("Visible") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("Width") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100); + + b.HasKey("Id"); + + b.HasIndex("ListFormCode"); + + b.ToTable("Sas_H_ListFormField", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormImport", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlobName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + 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("ListFormCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TotalRows") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ListFormCode"); + + b.ToTable("Sas_H_ListFormImport", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormImportExecute", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BlobName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + 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("ErrorRows") + .HasColumnType("int"); + + b.Property("ErrorsJson") + .HasColumnType("text"); + + b.Property("ExecRows") + .HasColumnType("int"); + + b.Property("ImportId") + .HasColumnType("uniqueidentifier"); + + 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("Progress") + .HasColumnType("float"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ValidRows") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ImportId"); + + b.ToTable("Sas_H_ListFormImportExecute", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.LogEntry", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Exception") + .HasColumnType("nvarchar(max)"); + + b.Property("Level") + .HasColumnType("nvarchar(max)"); + + b.Property("Message") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageTemplate") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("TimeStamp") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Plat_H_LogEntry", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.MaterialGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .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(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("ParentGroupId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ParentGroupId"); + + b.ToTable("Scp_T_MaterialGroup", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.MaterialType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .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(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("Scp_T_MaterialType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Meal", 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("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("Materials") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalCalorie") + .HasPrecision(9, 2) + .HasColumnType("decimal(9,2)"); + + b.Property("Type") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId"); + + b.ToTable("Net_B_Meal", (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("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") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Prt_T_MeetingMethod", (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("Order") + .HasColumnType("smallint"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Prt_T_MeetingResult", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Menu", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CssClass") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("CultureName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ElementId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Icon") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDisabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ParentCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RequiredPermissionName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("RoleId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Target") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Url") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("UserId") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.ToTable("Sas_H_Menu", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.NoteType", 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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Prt_T_NoteType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Order", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address1") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Address2") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("City") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Commission") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Country") + .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("District") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Email") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("FaxNumber") + .HasColumnType("bigint"); + + b.Property("Founder") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Installment") + .HasColumnType("int"); + + b.Property("IsActive") + .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("MenuGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MobileNumber") + .HasColumnType("bigint"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OrganizationName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("PaymentDataJson") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("PaymentMethodId") + .HasColumnType("uniqueidentifier"); + + b.Property("PhoneNumber") + .HasColumnType("bigint"); + + b.Property("PostalCode") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("Subtotal") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("TaxOffice") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Total") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("VknTckn") + .HasColumnType("bigint"); + + b.Property("Website") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_Order", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillingCycle") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + 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("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("TotalPrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.ToTable("Adm_T_OrderItem", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Overtime", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Amount") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("ApprovedById") + .HasColumnType("uniqueidentifier"); + + b.Property("ApprovedDate") + .HasColumnType("datetime2"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasMaxLength(10) + .HasColumnType("datetime2"); + + 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("Rate") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Reason") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("RejectionReason") + .HasColumnType("nvarchar(max)"); + + b.Property("StartTime") + .HasMaxLength(10) + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalHours") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("Hr_T_Overtime", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Partner", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address1") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Address2") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("AssignedEmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("AverageOrderValue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("CardNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreditLimit") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("CurrentBalance") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("CustomerSegmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomerTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiscountRate") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("District") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Email") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("FaxNumber") + .HasMaxLength(32) + .HasColumnType("bigint"); + + 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("LastOrderDate") + .HasColumnType("datetime2"); + + b.Property("LifetimeValue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("MobileNumber") + .HasMaxLength(32) + .HasColumnType("bigint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PartyType") + .HasColumnType("int"); + + b.Property("PaymentTermId") + .HasColumnType("uniqueidentifier"); + + b.Property("PerformanceMetricsJson") + .HasColumnType("text"); + + b.Property("PhoneNumber") + .HasMaxLength(32) + .HasColumnType("bigint"); + + b.Property("PostalCode") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SectorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Street") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SupplierTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("SupplyCardTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaxNumber") + .HasColumnType("bigint"); + + b.Property("TaxOffice") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TeamCode") + .HasMaxLength(95) + .HasColumnType("nvarchar(95)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalRevenue") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("ValidFrom") + .HasColumnType("datetime2"); + + b.Property("ValidTo") + .HasColumnType("datetime2"); + + b.Property("Website") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("AssignedEmployeeId"); + + b.HasIndex("CurrencyId"); + + b.HasIndex("CustomerSegmentId"); + + b.HasIndex("CustomerTypeId"); + + b.HasIndex("PaymentTermId"); + + b.HasIndex("SectorId"); + + b.HasIndex("SupplierTypeId"); + + b.HasIndex("SupplyCardTypeId"); + + b.ToTable("Adm_T_Partner", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PartnerBank", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccountNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AccountOwner") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("AccountType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Balance") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("BankName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("BranchName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("DailyTransferLimit") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Iban") + .IsRequired() + .HasMaxLength(34) + .HasColumnType("nvarchar(34)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDefault") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + 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("OverdraftLimit") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); + + b.Property("PartnerId") + .HasColumnType("uniqueidentifier"); + + b.Property("SwiftCode") + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CurrencyId"); + + b.HasIndex("PartnerId"); + + b.ToTable("Adm_T_PartnerBank", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PartnerCertificate", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Certificate") + .IsRequired() + .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("ExpiryDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IssueDate") + .HasColumnType("datetime2"); + + b.Property("Issuer") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartnerId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("PartnerId"); + + b.ToTable("Adm_T_PartnerCertificate", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PartnerContact", 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("Department") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Email") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPrimary") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MobileNumber") + .HasMaxLength(32) + .HasColumnType("bigint"); + + b.Property("PartnerId") + .HasColumnType("uniqueidentifier"); + + b.Property("PhoneNumber") + .HasMaxLength(32) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("PartnerId"); + + b.ToTable("Adm_T_PartnerContact", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PaymentMethod", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Commission") + .HasPrecision(5, 3) + .HasColumnType("decimal(5,3)"); + + 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("Logo") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_PaymentMethod", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PaymentTerm", 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("Scp_T_PaymentTerm", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Payroll", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BaseSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Bonus") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("GrossSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + 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("NetSalary") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Overtime") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("PaymentDate") + .HasColumnType("datetime2"); + + b.Property("PeriodMonth") + .HasMaxLength(20) + .HasColumnType("int"); + + b.Property("PeriodYear") + .HasColumnType("int"); + + b.Property("SocialSecurity") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxNumber") + .HasPrecision(18, 2) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Hr_T_Payroll", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PayrollItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Amount") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + 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("ItemType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Mandatory") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("PayrollItemId") + .HasColumnType("uniqueidentifier"); + + b.Property("Taxable") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("PayrollItemId"); + + b.ToTable("Hr_T_PayrollItem", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Performans360", 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("DepartmentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + 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("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TargetEmployees") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("TemplateId"); + + b.ToTable("Hr_T_Performance360", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Product", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .IsRequired() + .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("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ImageUrl") + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsQuantityBased") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MonthlyPrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("YearlyPrice") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_Product", (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("Crd_T_Program", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Psychologist", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + 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("PhoneNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("Status") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_Psychologist", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Question", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("CorrectAnswer") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + 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("Difficulty") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Explanation") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + 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("MediaType") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("MediaUrl") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Points") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("QuestionPoolId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeLimit") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Title") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("QuestionPoolId"); + + b.ToTable("Crd_T_Question", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.QuestionOption", 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("IsCorrect") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + 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("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionPoolId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("QuestionId"); + + b.ToTable("Crd_T_QuestionOption", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.QuestionPool", 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("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + 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("Tags") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Crd_T_QuestionPool", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.QuestionTag", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Color") + .HasMaxLength(7) + .HasColumnType("nvarchar(7)"); + + 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(500) + .HasColumnType("nvarchar(500)"); + + 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.Property("UsageCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.HasKey("Id"); + + b.ToTable("Crd_T_QuestionTag", (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("BranchId"); + + b.HasIndex("RegistrationTypeId"); + + b.ToTable("Crd_B_RegistrationMethod", (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.HasIndex("BranchId"); + + b.ToTable("Crd_B_RegistrationType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", 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("Description") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("Icon") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Sas_T_ReportCategory", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", 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("GeneratedContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + 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("Parameters") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("TemplateName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TemplateId"); + + b.ToTable("Sas_T_ReportGenerated", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportParameter", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultValue") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + 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(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Placeholder") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TemplateId"); + + b.ToTable("Sas_T_ReportParameter", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportTemplate", 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("HtmlContent") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + 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(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Tags") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("Sas_T_ReportTemplate", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Reservation", 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + 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("Notes") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Participants") + .HasColumnType("int"); + + b.Property("Purpose") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .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.HasIndex("EmployeeId"); + + b.ToTable("Net_T_Reservation", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Route", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Authority") + .HasColumnType("nvarchar(max)"); + + b.Property("ComponentPath") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + 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("Key") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("RouteType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Key") + .IsUnique(); + + b.ToTable("Sas_H_Route", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SalesRejectionReason", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .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("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("Prt_T_SalesRejectionReason", (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.HasIndex("BranchId"); + + b.ToTable("Crd_B_Schedule", (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("Crd_B_ScheduleLesson", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Sector", 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("Sas_T_Sector", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Service", 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("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Features") + .HasColumnType("nvarchar(max)"); + + b.Property("Icon") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Adm_T_Service", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ShuttleRoute", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArrivalTime") + .HasMaxLength(10) + .HasColumnType("datetime2"); + + b.Property("Available") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Capacity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + 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("DepartureTime") + .HasMaxLength(10) + .HasColumnType("datetime2"); + + 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(150) + .HasColumnType("nvarchar(150)"); + + b.Property("Route") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.HasKey("Id"); + + b.ToTable("Net_T_ShuttleRoute", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Skill", 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("SkillTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SkillTypeId"); + + b.ToTable("Adm_T_Skill", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", 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("IsDefault") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + 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("Progress") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("SkillTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SkillTypeId"); + + b.ToTable("Adm_T_SkillLevel", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", 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("Adm_T_SkillType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialComment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(8000) + .HasColumnType("nvarchar(max)"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + 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("SocialPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("SocialPostId"); + + b.ToTable("Net_T_SocialComment", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialLike", 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + 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("SocialPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("SocialPostId"); + + b.ToTable("Net_T_SocialLike", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialLocation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + 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("Lat") + .HasColumnType("float"); + + b.Property("Lng") + .HasColumnType("float"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PlaceId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SocialPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SocialPostId") + .IsUnique(); + + b.ToTable("Net_T_SocialLocation", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialMedia", 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("PollEndsAt") + .HasColumnType("datetime2"); + + b.Property("PollQuestion") + .HasColumnType("nvarchar(max)"); + + b.Property("PollTotalVotes") + .HasColumnType("int"); + + b.Property("PollUserVoteId") + .HasColumnType("nvarchar(max)"); + + b.Property("SocialPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.PrimitiveCollection("Urls") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("Id"); + + b.HasIndex("SocialPostId") + .IsUnique(); + + b.ToTable("Net_T_SocialMedia", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialPollOption", 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("SocialMediaId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Votes") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("SocialMediaId"); + + b.ToTable("Net_T_SocialPollOption", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialPost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsLiked") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsOwnPost") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LikeCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("Net_T_SocialPost", (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("Prt_T_Source", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SupplyCardType", 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("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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.HasKey("Id"); + + b.ToTable("Scp_T_SupplyCardType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SupplyType", 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("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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.HasKey("Id"); + + b.ToTable("Scp_T_SupplyType", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Survey", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Deadline") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("IsAnonymous") + .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("Responses") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Status") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.HasKey("Id"); + + b.ToTable("Hr_T_Survey", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyAnswer", 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("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("QuestionType") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ResponseId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("QuestionId"); + + b.HasIndex("ResponseId"); + + b.ToTable("Hr_T_SurveyAnswer", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestion", 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("IsRequired") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("QuestionText") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("SurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("SurveyId"); + + b.ToTable("Hr_T_SurveyQuestion", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestionOption", 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("Order") + .HasColumnType("int"); + + b.Property("QuestionId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("QuestionId"); + + b.ToTable("Hr_T_SurveyQuestionOption", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyResponse", 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("EmployeeId") + .HasColumnType("uniqueidentifier"); + + 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("SubmissionTime") + .HasColumnType("datetime2"); + + b.Property("SurveyId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("SurveyId"); + + b.ToTable("Hr_T_SurveyResponse", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Template360", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssessorTypes") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + 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(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("QuestionGroupsJson") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("Hr_T_Template360", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Training", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .IsRequired() + .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("Duration") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("Enrolled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Instructor") + .IsRequired() + .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("Location") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("MaxParticipants") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Thumbnail") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Net_T_Training", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Uom", 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("IsActive") + .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(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Ratio") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("Rounding") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("UomCategoryId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UomCategoryId"); + + b.ToTable("Adm_T_Uom", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", 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("Adm_T_UomCategory", (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("Adm_T_Vaccine", (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("Adm_T_Vehicle", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Visitor", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BadgeNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CheckIn") + .HasColumnType("datetime2"); + + b.Property("CheckOut") + .HasColumnType("datetime2"); + + b.Property("CompanyName") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + 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(150) + .HasColumnType("nvarchar(150)"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("FullName") + .IsRequired() + .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("PhoneNumber") + .HasMaxLength(20) + .HasColumnType("bigint"); + + b.Property("Photo") + .HasColumnType("nvarchar(max)"); + + b.Property("Purpose") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("VisitDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("Net_T_Visitor", (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") + .HasMaxLength(8) + .HasColumnType("datetime2"); + + b.Property("Friday") + .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("Monday") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Saturday") + .HasColumnType("bit"); + + b.Property("StartHour") + .HasMaxLength(8) + .HasColumnType("datetime2"); + + 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("Adm_T_WorkHour", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", 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("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("Icon") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsLocked") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPostDate") + .HasColumnType("datetime2"); + + b.Property("LastPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("LastPostUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LastPostUserName") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("PostCount") + .HasColumnType("int"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TopicCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DisplayOrder"); + + b.ToTable("Sas_H_ForumCategory", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumPost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + 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("IsAcceptedAnswer") + .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("LikeCount") + .HasColumnType("int"); + + b.Property("ParentPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TopicId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ParentPostId"); + + b.HasIndex("TopicId"); + + b.ToTable("Sas_H_ForumPost", (string)null); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + 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("IsLocked") + .HasColumnType("bit"); + + b.Property("IsPinned") + .HasColumnType("bit"); + + b.Property("IsSolved") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPostDate") + .HasColumnType("datetime2"); + + b.Property("LastPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("LastPostUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LastPostUserName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LikeCount") + .HasColumnType("int"); + + b.Property("ReplyCount") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ViewCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.HasIndex("IsPinned"); + + b.HasIndex("LastPostDate"); + + b.ToTable("Sas_H_ForumTopic", (string)null); + }); + + modelBuilder.Entity("Kurs.Settings.Entities.SettingDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DescriptionKey") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEncrypted") + .HasColumnType("bit"); + + b.Property("IsInherited") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MainGroupKey") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("NameKey") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("Providers") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequiredPermissionName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SelectOptions") + .HasColumnType("nvarchar(max)"); + + b.Property("SubGroupKey") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.ToTable("Plat_H_SettingDefinition", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("nvarchar(max)"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime2"); + + b.Property("NextTryTime") + .HasColumnType("datetime2"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + 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") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("IsVerified") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetimeoffset"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("LoginEndDate") + .HasColumnType("datetime2"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("RocketUsername") + .HasColumnType("nvarchar(max)"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("bit"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + 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("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + 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("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientUri") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .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("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("nvarchar(max)"); + + b.Property("Permissions") + .HasColumnType("nvarchar(max)"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Requirements") + .HasColumnType("nvarchar(max)"); + + b.Property("Settings") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Scopes") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("Descriptions") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + 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(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Resources") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedemptionDate") + .HasColumnType("datetime2"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("MenuGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("bit"); + + b.Property("IsInherited") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address1") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Address2") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("City") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Country") + .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("District") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FaxNumber") + .HasColumnType("bigint"); + + b.Property("Founder") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + 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("MenuGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MobileNumber") + .HasColumnType("bigint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OrganizationName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PhoneNumber") + .HasColumnType("bigint"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Street") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TaxOffice") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("VknTckn") + .HasColumnType("bigint"); + + b.Property("Website") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("Kurs.Languages.Entities.LanguageText", b => + { + b.HasOne("Kurs.Languages.Entities.Language", null) + .WithMany() + .HasForeignKey("CultureName") + .HasPrincipalKey("CultureName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Kurs.Languages.Entities.LanguageKey", "LanguageKey") + .WithMany("Texts") + .HasForeignKey("ResourceName", "Key") + .HasPrincipalKey("ResourceName", "Key") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("LanguageKey"); + }); + + modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueue", b => + { + b.HasOne("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueTableFormat", "TableFormat") + .WithMany("MailQueues") + .HasForeignKey("TableName") + .HasPrincipalKey("TableName") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TableFormat"); + }); + + modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueEvents", b => + { + b.HasOne("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueue", "MailQueue") + .WithMany("Events") + .HasForeignKey("AwsMessageId") + .HasPrincipalKey("AwsMessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MailQueue"); + }); + + modelBuilder.Entity("Kurs.Notifications.Entities.Notification", b => + { + b.HasOne("Kurs.Notifications.Entities.NotificationRule", "NotificationRule") + .WithMany("Notifications") + .HasForeignKey("NotificationRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("NotificationRule"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Announcement", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("Announcements") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b => + { + b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity") + .WithMany() + .HasForeignKey("EntityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Entity"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ApiMigration", b => + { + b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity") + .WithMany() + .HasForeignKey("EntityId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Entity"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BankAccount", b => + { + b.HasOne("Kurs.Platform.Entities.Bank", "Bank") + .WithMany() + .HasForeignKey("BankId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Bank"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BlogPost", b => + { + b.HasOne("Kurs.Platform.Entities.BlogCategory", "Category") + .WithMany("Posts") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("BlogPosts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BranchUsers", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("UserBranches") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Branch"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Certificate", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("Certificates") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Kurs.Platform.Entities.Training", "Training") + .WithMany("Certificates") + .HasForeignKey("TrainingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Training"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.City", b => + { + b.HasOne("Kurs.Platform.Entities.Country", null) + .WithMany("Cities") + .HasForeignKey("CountryId"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Class", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Classes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") + .WithMany("Classes") + .HasForeignKey("ClassTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Branch"); + + b.Navigation("ClassType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassType", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("ClassTypes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") + .WithMany("ClassTypes") + .HasForeignKey("RegistrationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Branch"); + + b.Navigation("RegistrationType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassroomAttandance", b => + { + b.HasOne("Kurs.Platform.Entities.Classroom", "Session") + .WithMany("AttendanceRecords") + .HasForeignKey("SessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Session"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassroomChat", b => + { + b.HasOne("Kurs.Platform.Entities.Classroom", "Session") + .WithMany("ChatMessages") + .HasForeignKey("SessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Session"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ClassroomParticipant", b => + { + b.HasOne("Kurs.Platform.Entities.Classroom", "Session") + .WithMany("Participants") + .HasForeignKey("SessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Session"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => + { + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("Kurs.Platform.Entities.CostCenter", "ParentCostCenter") + .WithMany("SubCostCenters") + .HasForeignKey("ParentCostCenterId"); + + b.HasOne("Kurs.Platform.Entities.Employee", "ResponsibleEmployee") + .WithMany() + .HasForeignKey("ResponsibleEmployeeId"); + + b.Navigation("Department"); + + b.Navigation("ParentCostCenter"); + + b.Navigation("ResponsibleEmployee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Country", b => + { + b.HasOne("Kurs.Platform.Entities.CountryGroup", null) + .WithMany() + .HasForeignKey("GroupName") + .HasPrincipalKey("Name") + .OnDelete(DeleteBehavior.Restrict); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomEntityField", b => + { + b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity") + .WithMany("Fields") + .HasForeignKey("EntityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Entity"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Department", b => + { + b.HasOne("Kurs.Platform.Entities.CostCenter", "CostCenter") + .WithMany() + .HasForeignKey("CostCenterId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Employee", "Manager") + .WithMany() + .HasForeignKey("ManagerId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Department", "ParentDepartment") + .WithMany("SubDepartments") + .HasForeignKey("ParentDepartmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CostCenter"); + + b.Navigation("Manager"); + + b.Navigation("ParentDepartment"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.District", b => + { + b.HasOne("Kurs.Platform.Entities.City", null) + .WithMany("Districts") + .HasForeignKey("CityId"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Employee", b => + { + b.HasOne("Kurs.Platform.Entities.Badge", "Badge") + .WithMany() + .HasForeignKey("BadgeId"); + + b.HasOne("Kurs.Platform.Entities.BankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.HasOne("Kurs.Platform.Entities.EmploymentType", "EmploymentType") + .WithMany() + .HasForeignKey("EmploymentTypeId"); + + b.HasOne("Kurs.Platform.Entities.JobPosition", "JobPosition") + .WithMany() + .HasForeignKey("JobPositionId"); + + b.HasOne("Kurs.Platform.Entities.Employee", "Manager") + .WithMany() + .HasForeignKey("ManagerId"); + + b.Navigation("Badge"); + + b.Navigation("BankAccount"); + + b.Navigation("Department"); + + b.Navigation("EmploymentType"); + + b.Navigation("JobPosition"); + + b.Navigation("Manager"); + }); + + 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.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Kurs.Platform.Entities.EventType", "Type") + .WithMany("Events") + .HasForeignKey("TypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Category"); + + b.Navigation("Employee"); + + b.Navigation("Type"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b => + { + b.HasOne("Kurs.Platform.Entities.Event", "Event") + .WithMany("Comments") + .HasForeignKey("EventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Event"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b => + { + b.HasOne("Kurs.Platform.Entities.Event", "Event") + .WithMany("Photos") + .HasForeignKey("EventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Event"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Expense", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Approver") + .WithMany() + .HasForeignKey("ApproverId"); + + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("ExpenseRequests") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Approver"); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.JobPosition", b => + { + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany() + .HasForeignKey("DepartmentId"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Leave", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("Leaves") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.LessonPeriod", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("LessonPeriods") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Level", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Levels") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType") + .WithMany("Levels") + .HasForeignKey("ClassTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Branch"); + + b.Navigation("ClassType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormCustomization", b => + { + b.HasOne("Kurs.Platform.Entities.ListForm", null) + .WithMany() + .HasForeignKey("ListFormCode") + .HasPrincipalKey("ListFormCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormField", b => + { + b.HasOne("Kurs.Platform.Entities.ListForm", null) + .WithMany() + .HasForeignKey("ListFormCode") + .HasPrincipalKey("ListFormCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormImport", b => + { + b.HasOne("Kurs.Platform.Entities.ListForm", null) + .WithMany() + .HasForeignKey("ListFormCode") + .HasPrincipalKey("ListFormCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ListFormImportExecute", b => + { + b.HasOne("Kurs.Platform.Entities.ListFormImport", null) + .WithMany() + .HasForeignKey("ImportId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.MaterialGroup", b => + { + b.HasOne("Kurs.Platform.Entities.MaterialGroup", "ParentGroup") + .WithMany("SubGroups") + .HasForeignKey("ParentGroupId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("ParentGroup"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Meal", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Meals") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.OrderItem", b => + { + b.HasOne("Kurs.Platform.Entities.Order", "Order") + .WithMany("Items") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Order"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Overtime", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("Overtimes") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Partner", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "AssignedEmployee") + .WithMany("Partners") + .HasForeignKey("AssignedEmployeeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + + b.HasOne("Kurs.Platform.Entities.CustomerSegment", "CustomerSegment") + .WithMany("Partners") + .HasForeignKey("CustomerSegmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.CustomerType", "CustomerType") + .WithMany("Partners") + .HasForeignKey("CustomerTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.PaymentTerm", "PaymentTerm") + .WithMany() + .HasForeignKey("PaymentTermId"); + + b.HasOne("Kurs.Platform.Entities.Sector", "Sector") + .WithMany() + .HasForeignKey("SectorId"); + + b.HasOne("Kurs.Platform.Entities.SupplyType", "SupplierType") + .WithMany("Partners") + .HasForeignKey("SupplierTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.SupplyCardType", "SupplyCardType") + .WithMany("Partners") + .HasForeignKey("SupplyCardTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("AssignedEmployee"); + + b.Navigation("Currency"); + + b.Navigation("CustomerSegment"); + + b.Navigation("CustomerType"); + + b.Navigation("PaymentTerm"); + + b.Navigation("Sector"); + + b.Navigation("SupplierType"); + + b.Navigation("SupplyCardType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PartnerBank", b => + { + b.HasOne("Kurs.Platform.Entities.Currency", "Currency") + .WithMany() + .HasForeignKey("CurrencyId"); + + b.HasOne("Kurs.Platform.Entities.Partner", "Partner") + .WithMany("Banks") + .HasForeignKey("PartnerId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Currency"); + + b.Navigation("Partner"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PartnerCertificate", b => + { + b.HasOne("Kurs.Platform.Entities.Partner", "Partner") + .WithMany("Certificates") + .HasForeignKey("PartnerId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Partner"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PartnerContact", b => + { + b.HasOne("Kurs.Platform.Entities.Partner", "Partner") + .WithMany("Contacts") + .HasForeignKey("PartnerId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Partner"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.PayrollItem", b => + { + b.HasOne("Kurs.Platform.Entities.Payroll", "Payroll") + .WithMany("Items") + .HasForeignKey("PayrollItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Payroll"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Performans360", b => + { + b.HasOne("Kurs.Platform.Entities.Department", "Department") + .WithMany("Performans360s") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Template360", "Template") + .WithMany("Performans360s") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("Department"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Question", b => + { + b.HasOne("Kurs.Platform.Entities.QuestionPool", "QuestionPool") + .WithMany("Questions") + .HasForeignKey("QuestionPoolId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("QuestionPool"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.QuestionOption", b => + { + b.HasOne("Kurs.Platform.Entities.Question", "Question") + .WithMany("Options") + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationMethod", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("RegistrationMethods") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.RegistrationType", "RegistrationType") + .WithMany("Methods") + .HasForeignKey("RegistrationTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Branch"); + + b.Navigation("RegistrationType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("RegistrationTypes") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportGenerated", b => + { + b.HasOne("Kurs.Platform.Entities.ReportTemplate", "ReportTemplate") + .WithMany("Generated") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("ReportTemplate"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportParameter", b => + { + b.HasOne("Kurs.Platform.Entities.ReportTemplate", "ReportTemplate") + .WithMany("Parameters") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ReportTemplate"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportTemplate", b => + { + b.HasOne("Kurs.Platform.Entities.ReportCategory", "ReportCategory") + .WithMany("ReportTemplates") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ReportCategory"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Reservation", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("Reservations") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.HasOne("Kurs.Platform.Entities.Branch", "Branch") + .WithMany("Schedules") + .HasForeignKey("BranchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Branch"); + }); + + 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") + .WithMany("Skills") + .HasForeignKey("SkillTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SkillType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillLevel", b => + { + b.HasOne("Kurs.Platform.Entities.SkillType", "SkillType") + .WithMany("Levels") + .HasForeignKey("SkillTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SkillType"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialComment", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId"); + + b.HasOne("Kurs.Platform.Entities.SocialPost", "SocialPost") + .WithMany("Comments") + .HasForeignKey("SocialPostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("SocialPost"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialLike", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId"); + + b.HasOne("Kurs.Platform.Entities.SocialPost", "SocialPost") + .WithMany("Likes") + .HasForeignKey("SocialPostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("SocialPost"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialLocation", b => + { + b.HasOne("Kurs.Platform.Entities.SocialPost", "SocialPost") + .WithOne("Location") + .HasForeignKey("Kurs.Platform.Entities.SocialLocation", "SocialPostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SocialPost"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialMedia", b => + { + b.HasOne("Kurs.Platform.Entities.SocialPost", "SocialPost") + .WithOne("Media") + .HasForeignKey("Kurs.Platform.Entities.SocialMedia", "SocialPostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SocialPost"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialPollOption", b => + { + b.HasOne("Kurs.Platform.Entities.SocialMedia", "SocialMedia") + .WithMany("PollOptions") + .HasForeignKey("SocialMediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SocialMedia"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialPost", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId"); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyAnswer", b => + { + b.HasOne("Kurs.Platform.Entities.SurveyQuestion", "Question") + .WithMany() + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Kurs.Platform.Entities.SurveyResponse", "Response") + .WithMany("Answers") + .HasForeignKey("ResponseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + + b.Navigation("Response"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestion", b => + { + b.HasOne("Kurs.Platform.Entities.Survey", "Survey") + .WithMany("Questions") + .HasForeignKey("SurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Survey"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestionOption", b => + { + b.HasOne("Kurs.Platform.Entities.SurveyQuestion", "Question") + .WithMany("Options") + .HasForeignKey("QuestionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Question"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyResponse", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("SurveyResponses") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Entities.Survey", "Survey") + .WithMany("SurveyResponses") + .HasForeignKey("SurveyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Survey"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Uom", b => + { + b.HasOne("Kurs.Platform.Entities.UomCategory", "UomCategory") + .WithMany("Uoms") + .HasForeignKey("UomCategoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("UomCategory"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Visitor", b => + { + b.HasOne("Kurs.Platform.Entities.Employee", "Employee") + .WithMany("Visitors") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumPost", b => + { + b.HasOne("Kurs.Platform.Forum.ForumPost", "ParentPost") + .WithMany("Replies") + .HasForeignKey("ParentPostId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Kurs.Platform.Forum.ForumTopic", "Topic") + .WithMany("Posts") + .HasForeignKey("TopicId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ParentPost"); + + b.Navigation("Topic"); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumTopic", b => + { + b.HasOne("Kurs.Platform.Forum.ForumCategory", "Category") + .WithMany("Topics") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Category"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Kurs.Languages.Entities.LanguageKey", b => + { + b.Navigation("Texts"); + }); + + modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueue", b => + { + b.Navigation("Events"); + }); + + modelBuilder.Entity("Kurs.MailQueue.Domain.Entities.BackgroundWorker_MailQueueTableFormat", b => + { + b.Navigation("MailQueues"); + }); + + modelBuilder.Entity("Kurs.Notifications.Entities.NotificationRule", b => + { + b.Navigation("Notifications"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b => + { + b.Navigation("Posts"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Branch", b => + { + b.Navigation("ClassTypes"); + + b.Navigation("Classes"); + + b.Navigation("LessonPeriods"); + + b.Navigation("Levels"); + + b.Navigation("Meals"); + + b.Navigation("RegistrationMethods"); + + b.Navigation("RegistrationTypes"); + + b.Navigation("Schedules"); + + b.Navigation("UserBranches"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.City", b => + { + 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"); + + b.Navigation("ChatMessages"); + + b.Navigation("Participants"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CostCenter", b => + { + b.Navigation("SubCostCenters"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Country", b => + { + b.Navigation("Cities"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomEntity", b => + { + b.Navigation("Fields"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomerSegment", b => + { + b.Navigation("Partners"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.CustomerType", b => + { + b.Navigation("Partners"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Department", b => + { + b.Navigation("Performans360s"); + + b.Navigation("SubDepartments"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Employee", b => + { + b.Navigation("Announcements"); + + b.Navigation("BlogPosts"); + + b.Navigation("Certificates"); + + b.Navigation("ExpenseRequests"); + + b.Navigation("Leaves"); + + b.Navigation("Overtimes"); + + b.Navigation("Partners"); + + b.Navigation("Reservations"); + + b.Navigation("SurveyResponses"); + + b.Navigation("Visitors"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Event", b => + { + b.Navigation("Comments"); + + b.Navigation("Photos"); + }); + + 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.MaterialGroup", b => + { + b.Navigation("SubGroups"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Order", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Partner", b => + { + b.Navigation("Banks"); + + b.Navigation("Certificates"); + + b.Navigation("Contacts"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Payroll", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Question", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.QuestionPool", b => + { + b.Navigation("Questions"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.RegistrationType", b => + { + b.Navigation("ClassTypes"); + + b.Navigation("Methods"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportCategory", b => + { + b.Navigation("ReportTemplates"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.ReportTemplate", b => + { + b.Navigation("Generated"); + + b.Navigation("Parameters"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Schedule", b => + { + b.Navigation("Lessons"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SkillType", b => + { + b.Navigation("Levels"); + + b.Navigation("Skills"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialMedia", b => + { + b.Navigation("PollOptions"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SocialPost", b => + { + b.Navigation("Comments"); + + b.Navigation("Likes"); + + b.Navigation("Location"); + + b.Navigation("Media"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SupplyCardType", b => + { + b.Navigation("Partners"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SupplyType", b => + { + b.Navigation("Partners"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Survey", b => + { + b.Navigation("Questions"); + + b.Navigation("SurveyResponses"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyQuestion", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.SurveyResponse", b => + { + b.Navigation("Answers"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Template360", b => + { + b.Navigation("Performans360s"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.Training", b => + { + b.Navigation("Certificates"); + }); + + modelBuilder.Entity("Kurs.Platform.Entities.UomCategory", b => + { + b.Navigation("Uoms"); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumCategory", b => + { + b.Navigation("Topics"); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumPost", b => + { + b.Navigation("Replies"); + }); + + modelBuilder.Entity("Kurs.Platform.Forum.ForumTopic", b => + { + b.Navigation("Posts"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.cs new file mode 100644 index 00000000..f90d8729 --- /dev/null +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251104205840_DynamicService.cs @@ -0,0 +1,53 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Kurs.Platform.Migrations +{ + /// + public partial class DynamicService : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Plat_H_DynamicService", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + DisplayName = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Code = table.Column(type: "text", nullable: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + CompilationStatus = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), + LastCompilationError = table.Column(type: "text", nullable: true), + LastSuccessfulCompilation = table.Column(type: "datetime2", nullable: true), + Version = table.Column(type: "int", nullable: false, defaultValue: 1), + CodeHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PrimaryEntityType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ControllerName = table.Column(type: "nvarchar(256)", maxLength: 256, 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_Plat_H_DynamicService", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Plat_H_DynamicService"); + } + } +} diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 9d8164d0..70b50b63 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -3554,6 +3554,100 @@ namespace Kurs.Platform.Migrations b.ToTable("Adm_T_Document", (string)null); }); + modelBuilder.Entity("Kurs.Platform.Entities.DynamicService", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasColumnType("text"); + + b.Property("CodeHash") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompilationStatus") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("ControllerName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + 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(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("DisplayName") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastCompilationError") + .HasColumnType("text"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastSuccessfulCompilation") + .HasColumnType("datetime2"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PrimaryEntityType") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.HasKey("Id"); + + b.ToTable("Plat_H_DynamicService", (string)null); + }); + modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b => { b.Property("Id") diff --git a/api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs b/api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs new file mode 100644 index 00000000..ffd9301e --- /dev/null +++ b/api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.ApplicationParts; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.DependencyInjection; + +namespace Kurs.Platform.DynamicServices +{ + /// + /// Dinamik assembly'leri runtime'da DI ve MVC sistemine kaydeden background service + /// + public class DynamicAssemblyRegistrationService : BackgroundService, ITransientDependency + { + private readonly IServiceProvider _serviceProvider; + private readonly ILogger _logger; + private readonly ApplicationPartManager _partManager; + private readonly IOptions _mvcOptions; + + // Bekleyen assembly kayıt istekleri + private static readonly Queue _pendingRegistrations = new(); + private static readonly object _lock = new object(); + + public DynamicAssemblyRegistrationService( + IServiceProvider serviceProvider, + ILogger logger, + ApplicationPartManager partManager, + IOptions mvcOptions) + { + _serviceProvider = serviceProvider; + _logger = logger; + _partManager = partManager; + _mvcOptions = mvcOptions; + } + + /// + /// Yeni assembly kaydı istemi + /// + public static void RequestAssemblyRegistration(Guid tenantId, Assembly assembly, string assemblyName) + { + lock (_lock) + { + _pendingRegistrations.Enqueue(new AssemblyRegistrationRequest + { + TenantId = tenantId, + Assembly = assembly, + AssemblyName = assemblyName, + RequestTime = DateTime.UtcNow + }); + } + } + + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + _logger.LogInformation("Dynamic Assembly Registration Service başlatıldı"); + + while (!stoppingToken.IsCancellationRequested) + { + try + { + await ProcessPendingRegistrations(); + + // 5 saniye bekle + await Task.Delay(5000, stoppingToken); + } + catch (Exception ex) + { + _logger.LogError(ex, "Assembly registration service hatası"); + } + } + + _logger.LogInformation("Dynamic Assembly Registration Service durduruluyor"); + } + + private async Task ProcessPendingRegistrations() + { + var requests = new List(); + + lock (_lock) + { + while (_pendingRegistrations.Count > 0) + { + requests.Add(_pendingRegistrations.Dequeue()); + } + } + + if (requests.Count == 0) + return; + + _logger.LogDebug("İşlenecek {Count} assembly kaydı var", requests.Count); + + foreach (var request in requests) + { + try + { + await RegisterAssembly(request); + } + catch (Exception ex) + { + _logger.LogError(ex, "Assembly kaydı başarısız. Tenant: {TenantId}, Assembly: {Assembly}", + request.TenantId, request.AssemblyName); + } + } + } + + private async Task RegisterAssembly(AssemblyRegistrationRequest request) + { + _logger.LogInformation("Assembly kaydediliyor. Tenant: {TenantId}, Assembly: {Assembly}", + request.TenantId, request.AssemblyName); + + // ApplicationService türlerini bul + var appServiceTypes = request.Assembly.GetTypes() + .Where(t => IsApplicationServiceType(t)) + .ToList(); + + if (appServiceTypes.Count == 0) + { + _logger.LogWarning("Assembly'de ApplicationService bulunamadı: {Assembly}", request.AssemblyName); + return; + } + + // Dependency Injection Container'a ekle + using (var scope = _serviceProvider.CreateScope()) + { + var services = scope.ServiceProvider.GetRequiredService(); + + foreach (var serviceType in appServiceTypes) + { + // Transient olarak kaydet + services.AddTransient(serviceType); + _logger.LogDebug("DI'ya eklendi: {ServiceType}", serviceType.FullName); + } + } + + // MVC Application Parts'a ekle (Controllers için) + var assemblyPart = new AssemblyPart(request.Assembly); + _partManager.ApplicationParts.Add(assemblyPart); + + // ABP Conventional Controllers'a ekle + _mvcOptions.Value.ConventionalControllers.Create(request.Assembly); + + _logger.LogInformation("Assembly başarıyla kaydedildi. Tenant: {TenantId}, Assembly: {Assembly}, Service Count: {Count}", + request.TenantId, request.AssemblyName, appServiceTypes.Count); + + await Task.CompletedTask; + } + + private bool IsApplicationServiceType(Type type) + { + try + { + return !type.IsAbstract && + !type.IsInterface && + type.IsClass && + (type.Name.EndsWith("AppService") || type.Name.EndsWith("ApplicationService")) && + HasApplicationServiceBase(type); + } + catch (Exception ex) + { + _logger.LogWarning(ex, "Tip kontrolü sırasında hata: {Type}", type?.FullName); + return false; + } + } + + private bool HasApplicationServiceBase(Type type) + { + var currentType = type.BaseType; + while (currentType != null) + { + if (currentType.Name.Contains("ApplicationService")) + { + return true; + } + currentType = currentType.BaseType; + } + return false; + } + + private class AssemblyRegistrationRequest + { + public Guid TenantId { get; set; } + public Assembly Assembly { get; set; } + public string AssemblyName { get; set; } + public DateTime RequestTime { get; set; } + } + } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs b/api/src/Kurs.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs index f28f9961..761abbd2 100644 --- a/api/src/Kurs.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs +++ b/api/src/Kurs.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs @@ -49,6 +49,7 @@ using Volo.Abp.Security.Claims; using Volo.Abp.Swashbuckle; using Volo.Abp.UI.Navigation.Urls; using Volo.Abp.VirtualFileSystem; +using Kurs.Platform.DynamicServices; using static Kurs.Platform.PlatformConsts; using static Kurs.Settings.SettingsConsts; @@ -120,6 +121,8 @@ public class PlatformHttpApiHostModule : AbpModule ConfigureHangfire(context, configuration); ConfigureBlobStoring(configuration); ConfigureAuditing(); + + ConfigureDynamicServices(context); context.Services.AddSignalR(); @@ -352,6 +355,15 @@ public class PlatformHttpApiHostModule : AbpModule }); } + private void ConfigureDynamicServices(ServiceConfigurationContext context) + { + // Dynamic AppService Background Service + context.Services.AddHostedService(); + + // Roslyn Compiler Servisleri + context.Services.AddSingleton(); + } + public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); diff --git a/api/src/Kurs.Platform.HttpApi.Host/Program.cs b/api/src/Kurs.Platform.HttpApi.Host/Program.cs index 5e205f32..52e38cff 100644 --- a/api/src/Kurs.Platform.HttpApi.Host/Program.cs +++ b/api/src/Kurs.Platform.HttpApi.Host/Program.cs @@ -4,6 +4,7 @@ using System.IO; using System.Threading.Tasks; using Kurs.Platform.Classrooms; using Kurs.Platform.Enums; +using Kurs.Platform.DynamicServices; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Configuration; @@ -146,6 +147,9 @@ public class Program var app = builder.Build(); app.UseCors("Dynamic"); + + // Dynamic Assembly Registration Delegate Setup + DynamicServiceCompiler.NotifyAssemblyRegistration = DynamicAssemblyRegistrationService.RequestAssemblyRegistration; await app.InitializeApplicationAsync(); await app.RunAsync(); return 0; diff --git a/api/src/Kurs.Platform.HttpApi/DynamicServices/DynamicAppServiceController.cs b/api/src/Kurs.Platform.HttpApi/DynamicServices/DynamicAppServiceController.cs new file mode 100644 index 00000000..e403481f --- /dev/null +++ b/api/src/Kurs.Platform.HttpApi/DynamicServices/DynamicAppServiceController.cs @@ -0,0 +1,97 @@ +using System; +using System.Threading.Tasks; +using Kurs.Platform.DeveloperKit; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; + +namespace Kurs.Platform.DynamicServices +{ + /// + /// Dynamic AppService yönetimi HTTP API Controller + /// + [Area("app")] + [Route("api/app/dynamic-app-service")] + public class DynamicAppServiceController : AbpController + { + private readonly IDynamicServiceManager _dynamicAppServiceManager; + + public DynamicAppServiceController(IDynamicServiceManager dynamicAppServiceManager) + { + _dynamicAppServiceManager = dynamicAppServiceManager; + } + + /// + /// Kod test derlemesi + /// + [HttpPost("test-compile")] + public async Task TestCompileAsync(TestCompileRequestDto request) + { + return await _dynamicAppServiceManager.TestCompileAsync(request); + } + + /// + /// AppService yayınlama + /// + [HttpPost("publish")] + public async Task PublishAsync(PublishAppServiceRequestDto request) + { + return await _dynamicAppServiceManager.PublishAsync(request); + } + + /// + /// AppService listesi + /// + [HttpGet] + public async Task> GetListAsync( + [FromQuery] PagedAndSortedResultRequestDto input) + { + return await _dynamicAppServiceManager.GetListAsync(input); + } + + /// + /// AppService detayı + /// + [HttpGet("{id}")] + public async Task GetAsync(Guid id) + { + return await _dynamicAppServiceManager.GetAsync(id); + } + + /// + /// AppService silme + /// + [HttpDelete("{id}")] + public async Task DeleteAsync(Guid id) + { + await _dynamicAppServiceManager.DeleteAsync(id); + } + + /// + /// AppService aktiflik durumu + /// + [HttpPut("{id}/active")] + public async Task SetActiveAsync(Guid id, [FromBody] bool isActive) + { + await _dynamicAppServiceManager.SetActiveAsync(id, isActive); + } + + /// + /// Tüm aktif servisleri yeniden yükle + /// + [HttpPost("reload-all")] + public async Task ReloadAllActiveServicesAsync() + { + await _dynamicAppServiceManager.ReloadAllActiveServicesAsync(); + } + + /// + /// AppService yeniden derleme + /// + [HttpPost("{id}/recompile")] + public async Task RecompileAsync(Guid id) + { + return await _dynamicAppServiceManager.RecompileAsync(id); + } + } +} \ No newline at end of file diff --git a/ui/src/components/developerKit/DynamicAppServiceEditor.tsx b/ui/src/components/developerKit/DynamicAppServiceEditor.tsx new file mode 100644 index 00000000..e7a9d10e --- /dev/null +++ b/ui/src/components/developerKit/DynamicAppServiceEditor.tsx @@ -0,0 +1,628 @@ +import React, { useState, useRef, useEffect } from 'react' +import { Editor } from '@monaco-editor/react' +import { + FaPlay, + FaUpload, + FaCode, + FaCheckCircle, + FaExclamationCircle, + FaSpinner, + FaCopy, + FaExternalLinkAlt, + FaTrash, + FaSync, +} from 'react-icons/fa' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { + dynamicServiceService, + type CompileResult, + type PublishResult, + type DynamicServiceDto, + postTestCompile, + TestCompileRequestDto, +} from '@/services/dynamicService.service' + +const DynamicAppServiceEditor: React.FC = () => { + // State + const [code, setCode] = useState('') + const [serviceName, setServiceName] = useState('') + const [displayName, setDisplayName] = useState('') + const [description, setDescription] = useState('') + const [primaryEntityType, setPrimaryEntityType] = useState('') + + const [isCompiling, setIsCompiling] = useState(false) + const [isPublishing, setIsPublishing] = useState(false) + const [isLoading, setIsLoading] = useState(false) + + const [compileResult, setCompileResult] = useState(null) + const [publishResult, setPublishResult] = useState(null) + + const [services, setServices] = useState([]) + const [selectedService, setSelectedService] = useState(null) + + const [showServiceList, setShowServiceList] = useState(true) + + const { translate } = useLocalization() + + // Template kod + const defaultTemplate = `using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; +using Microsoft.AspNetCore.Authorization; + +namespace DynamicServices +{ + [Authorize] + public class DynamicCustomerAppService : ApplicationService + { + // Repository injection örneği (kendi entity'nizi kullanın) + // private readonly IRepository _customerRepository; + + // public DynamicCustomerAppService(IRepository customerRepository) + // { + // _customerRepository = customerRepository; + // } + + public virtual async Task GetHelloWorldAsync() + { + return await Task.FromResult("Hello World from Dynamic AppService!"); + } + + public virtual async Task> GetSampleDataAsync() + { + return await Task.FromResult(new List + { + "Item 1", + "Item 2", + "Item 3" + }); + } + + // Repository kullanım örneği: + // public virtual async Task> GetCustomersAsync() + // { + // return await _customerRepository.GetListAsync(); + // } + } +}` + + // Component mount + useEffect(() => { + setCode(defaultTemplate) + loadServices() + }, []) + + // Monaco Editor ayarları + const editorOptions = { + fontSize: 14, + lineNumbers: 'on' as const, + roundedSelection: false, + scrollBeyondLastLine: false, + automaticLayout: true, + minimap: { enabled: false }, + folding: true, + wordWrap: 'on' as const, + theme: 'vs-dark', + } + + // Servisleri yükle + const loadServices = async () => { + try { + setIsLoading(true) + const response = await dynamicServiceService.getList() + setServices(response.items || []) + } catch (error) { + console.error('Servisler yüklenirken hata:', error) + } finally { + setIsLoading(false) + } + } + + // Test compile + const handleTestCompile = async () => { + if (!code.trim()) { + alert('Lütfen kod girin') + return + } + + try { + setIsCompiling(true) + setCompileResult(null) + console.log('Test compile code:', code) + const input = { code: code } as TestCompileRequestDto + const result = await postTestCompile(input) + setCompileResult(result.data) + + } catch (error: any) { + console.error('Test compile error:', error) + console.error('Error response:', error.response?.data) + setCompileResult({ + success: false, + errorMessage: error.response?.data?.message || 'Derleme sırasında hata oluştu', + compilationTimeMs: 0, + hasWarnings: false, + errors: [], + }) + } finally { + setIsCompiling(false) + } + } + + // Publish + const handlePublish = async () => { + if (!code.trim() || !serviceName.trim()) { + alert('Lütfen kod ve servis adını girin') + return + } + + try { + setIsPublishing(true) + setPublishResult(null) + + const requestData = { + name: serviceName, + code: code, + displayName: displayName, + description: description, + primaryEntityType: primaryEntityType, + } + console.log('Publish request data:', requestData) + + const result = await dynamicServiceService.publish(requestData) + + setPublishResult(result) + + if (result.success) { + await loadServices() // Listeyi yenile + } + } catch (error: any) { + console.error('Publish error:', error) + console.error('Error response:', error.response?.data) + setPublishResult({ + success: false, + errorMessage: error.response?.data?.message || 'Yayınlama sırasında hata oluştu', + }) + } finally { + setIsPublishing(false) + } + } + + // Servisi yükle + const loadService = async (service: DynamicServiceDto) => { + try { + const data = await dynamicServiceService.getById(service.id) + + setSelectedService(data) + setCode(data.code) + setServiceName(data.name) + setDisplayName(data.displayName || '') + setDescription(data.description || '') + setPrimaryEntityType(data.primaryEntityType || '') + + setCompileResult(null) + setPublishResult(null) + } catch (error) { + console.error('Servis yüklenirken hata:', error) + } + } + + // Servisi sil + const deleteService = async (serviceId: string) => { + if (!confirm('Bu servisi silmek istediğinizden emin misiniz?')) { + return + } + + try { + await dynamicServiceService.delete(serviceId) + await loadServices() + + if (selectedService?.id === serviceId) { + setSelectedService(null) + setCode(defaultTemplate) + setServiceName('') + setDisplayName('') + setDescription('') + setPrimaryEntityType('') + } + } catch (error) { + console.error('Servis silinirken hata:', error) + alert('Servis silinirken hata oluştu') + } + } + + // Yeni servis + const newService = () => { + setSelectedService(null) + setCode(defaultTemplate) + setServiceName('') + setDisplayName('') + setDescription('') + setPrimaryEntityType('') + setCompileResult(null) + setPublishResult(null) + } + + // Swagger aç + const openSwagger = () => { + window.open(`${import.meta.env.VITE_API_URL}/swagger/index.html`, '_blank') + } + + // Kodu kopyala + const copyCode = () => { + navigator.clipboard.writeText(code) + alert('Kod panoya kopyalandı') + } + + return ( +
+
+ {/* Header */} +
+
+
+

Dynamic AppService Editor

+

+ C# kod yazarak dinamik AppService'ler oluşturun ve yayınlayın +

+
+
+ + +
+
+
+ +
+ {/* Service List */} + {showServiceList && ( +
+
+
+
+

Mevcut Servisler

+
+ + +
+
+
+ +
+ {isLoading ? ( +
+ + Yükleniyor... +
+ ) : services.length > 0 ? ( + services.map((service) => ( +
loadService(service)} + > +
+
+

{service.name}

+ {service.displayName && ( +

{service.displayName}

+ )} +
+ + {service.compilationStatus} + + v{service.version} +
+
+ +
+
+ )) + ) : ( +
Henüz servis yok
+ )} +
+
+
+ )} + + {/* Main Editor */} +
+ {/* Service Info Form */} +
+
+
+ + setServiceName(e.target.value)} + placeholder="ör: DynamicCustomerAppService" + className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent" + /> +
+
+ + setDisplayName(e.target.value)} + placeholder="ör: Müşteri Yönetimi" + className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent" + /> +
+
+ +