diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs index 9a8b1f82..62244a73 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs @@ -24,7 +24,6 @@ using EFCore.BulkExtensions; using System.Collections.Generic; using Kurs.Platform.Contacts; using static Kurs.Settings.SettingsConsts; -using DocumentFormat.OpenXml.Wordprocessing; namespace Kurs.Platform.Data.Seeds; @@ -69,6 +68,7 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _servicesRepository; private readonly IRepository _aboutRepository; private readonly IRepository _contactRepository; + private readonly IRepository _classroomRepository; public PlatformDataSeeder( IRepository languages, @@ -100,16 +100,17 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency IRepository blogPostsRepository, IRepository forumCategoryRepository, IRepository aiBotRepository, - IRepository RouteRepository, - IRepository CustomEndpointRepository, - IRepository ProductRepository, - IRepository PaymentMethodRepository, - IRepository InstallmentOptionRepository, - IRepository CustomComponentRepository, - IRepository ReportCategoriesRepository, - IRepository ServicesRepository, - IRepository AboutRepository, - IRepository ContactRepository + IRepository routeRepository, + IRepository customEndpointRepository, + IRepository productRepository, + IRepository paymentMethodRepository, + IRepository installmentOptionRepository, + IRepository customComponentRepository, + IRepository reportCategoriesRepository, + IRepository servicesRepository, + IRepository aboutRepository, + IRepository contactRepository, + IRepository classroomRepository ) { _languages = languages; @@ -141,16 +142,17 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency _blogPostsRepository = blogPostsRepository; _forumCategoryRepository = forumCategoryRepository; _aiBotRepository = aiBotRepository; - _routeRepository = RouteRepository; - _customEndpointRepository = CustomEndpointRepository; - _productRepository = ProductRepository; - _paymentMethodRepository = PaymentMethodRepository; - _installmentOptionRepository = InstallmentOptionRepository; - _customComponentRepository = CustomComponentRepository; - _reportCategoriesRepository = ReportCategoriesRepository; - _servicesRepository = ServicesRepository; - _aboutRepository = AboutRepository; - _contactRepository = ContactRepository; + _routeRepository = routeRepository; + _customEndpointRepository = customEndpointRepository; + _productRepository = productRepository; + _paymentMethodRepository = paymentMethodRepository; + _installmentOptionRepository = installmentOptionRepository; + _customComponentRepository = customComponentRepository; + _reportCategoriesRepository = reportCategoriesRepository; + _servicesRepository = servicesRepository; + _aboutRepository = aboutRepository; + _contactRepository = contactRepository; + _classroomRepository = classroomRepository; } private static IConfigurationRoot BuildConfiguration() @@ -1030,6 +1032,29 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency } } + foreach (var item in items.Classrooms) + { + var exists = await _classroomRepository.AnyAsync(x => x.Name == item.Name); + + if (!exists) + { + await _classroomRepository.InsertAsync(new Classroom( + Guid.NewGuid(), + item.Name, + item.Description, + item.Subject, + item.TeacherId, + item.TeacherName, + item.ScheduledStartTime, + item.Duration, + item.MaxParticipants, + item.IsActive, + item.IsScheduled, + item.SettingsJson + )); + } + } + await SeedCountyGroupsAsync(); await SeedCountriesAsync(); diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 7b157ec6..b079fbcf 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -17674,5 +17674,55 @@ "referrerPolicy": "no-referrer-when-downgrade" } } + ], + "Classrooms": [ + { + "name": "Matematik 101 - Diferansiyel Denklemler", + "description": "İleri matematik konuları ve uygulamaları", + "subject": "Matematik", + "teacherId": "995220ff-2751-afd6-3d99-3a1bfc55f78e", + "teacherName": "Prof. Dr. Mehmet Özkan", + "scheduledStartTime": "2025-08-27T10:00:00Z", + "actualStartTime": "", + "endTime": "", + "duration": 90, + "maxParticipants": 30, + "isActive": false, + "isScheduled": true, + "participantCount": 0, + "settingsJson": null + }, + { + "name": "Fizik 201 - Kuantum Mekaniği", + "description": "Modern fizik ve kuantum teorisi temelleri", + "subject": "Fizik", + "teacherId": "995220ff-2751-afd6-3d99-3a1bfc55f78e", + "teacherName": "Dr. Ayşe Kaya", + "scheduledStartTime": "2025-08-26T10:00:00Z", + "actualStartTime": "", + "endTime": "", + "duration": 120, + "maxParticipants": 25, + "isActive": false, + "isScheduled": true, + "participantCount": 0, + "settingsJson": null + }, + { + "name": "Kimya 301 - Organik Kimya", + "description": "Organik bileşikler ve reaksiyon mekanizmaları", + "subject": "Kimya", + "teacherId": "995220ff-2751-afd6-3d99-3a1bfc55f78e", + "teacherName": "Dr. Ali Veli", + "scheduledStartTime": "2025-08-28T10:00:00Z", + "actualStartTime": "", + "endTime": "", + "duration": 75, + "maxParticipants": 20, + "isActive": false, + "isScheduled": true, + "participantCount": 0, + "settingsJson": null + } ] } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs index 8e882347..4731f972 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs @@ -46,6 +46,7 @@ public class SeederDto public List Services { get; set; } public List Abouts { get; set; } public List Contacts { get; set; } + public List Classrooms { get; set; } } public class ChartsSeedDto @@ -324,4 +325,22 @@ public class ContactSeedDto public BankDto Bank { get; set; } public WorkHoursDto WorkHour { get; set; } public MapDto Map { get; set; } +} + +public class ClassroomSeedDto +{ + public string Name { get; set; } + public string Description { get; set; } + public string Subject { get; set; } + public Guid? TeacherId { get; set; } + public string TeacherName { get; set; } + public DateTime ScheduledStartTime { get; set; } + public DateTime? ActualStartTime { get; set; } + public DateTime? EndTime { get; set; } + public int Duration { get; set; } + public int MaxParticipants { get; set; } + public bool IsActive { get; set; } + public bool IsScheduled { get; set; } + public int ParticipantCount { get; set; } + public string SettingsJson { get; set; } } \ No newline at end of file diff --git a/ui/dev-dist/sw.js b/ui/dev-dist/sw.js index 2957e2a8..b68ee707 100644 --- a/ui/dev-dist/sw.js +++ b/ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.8cs01edqoio" + "revision": "0.cb06g8q0ck8" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {