From a20d47cab87661de09ad1f18264eb4fdf0e4168c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 4 Sep 2026 16:09:43 +0300 Subject: [PATCH] seed/data Seeder Event --- .../lowcode-reference.instructions.md | 2 +- .../ListFormSeeder_Administration.cs | 63 +++- .../Migrations/MenusData.json | 13 +- .../Seeds/TenantData.json | 350 ------------------ .../Seeds/TenantDataSeeder.cs | 112 +----- .../host/data/App.Intranet.Events.Event.json | 50 +++ .../App.Intranet.Events.EventCategory.json | 28 ++ .../App.Intranet.Events.EventComment.json | 71 ++++ .../data/App.Intranet.Events.EventType.json | 208 +++++++++++ 9 files changed, 432 insertions(+), 465 deletions(-) create mode 100644 configs/seeds/host/data/App.Intranet.Events.Event.json create mode 100644 configs/seeds/host/data/App.Intranet.Events.EventCategory.json create mode 100644 configs/seeds/host/data/App.Intranet.Events.EventComment.json create mode 100644 configs/seeds/host/data/App.Intranet.Events.EventType.json diff --git a/.github/instructions/lowcode-reference.instructions.md b/.github/instructions/lowcode-reference.instructions.md index 79e926fe..33a515e4 100644 --- a/.github/instructions/lowcode-reference.instructions.md +++ b/.github/instructions/lowcode-reference.instructions.md @@ -1211,7 +1211,7 @@ Kök menü `App.Administration`. Bu menünün tabloları `Adm_T_*` — yani **ki | **Intranet › Announcement (+Like/Comment)** | `App.Intranet.Announcement` | `Adm_T_Announcement` · `Adm_T_AnnouncementLike` · `Adm_T_AnnouncementComment` | Duyuru + beğeni + yorum: **ana kayıt / alt etkileşim** kalıbının hazır örneği. | | **Intranet › Survey (+Question/Option/Response/Answer)** | `App.Intranet.Survey` | `Adm_T_Survey` · `Adm_T_SurveyQuestion` · `Adm_T_SurveyQuestionOption` · `Adm_T_SurveyResponse` · `Adm_T_SurveyAnswer` | Anket motoru; soru–seçenek–yanıt zinciri **iki seviyeli alt form** ihtiyacının referansıdır. | | **Intranet › Social Post (+Comment/Like)** | `App.Intranet.SocialPost` | `Adm_T_SocialPost` · `Adm_T_SocialComment` · `Adm_T_SocialLike` (+ `SocialPollOption`, `SocialMedia`, `SocialLocation`) | Kurum içi akış; `IsLiked`, `IsOwnPost` gibi hesaplanmış kolonların view içinde üretilmesine örnek. | -| **Intranet › Event Type / Category / Event (+Like/Comment)** | `App.Intranet.Events.*` | `Adm_T_EventType` · `Adm_T_EventCategory` · `Adm_T_Event` · `Adm_T_EventPhoto` · `Adm_T_EventLike` · `Adm_T_EventComment` | Etkinlik yönetimi; foto ve katılımcı sayacı olan kayıt kalıbı. | +| **Intranet › Event Type / Category / Event (+Like/Comment)** | `App.Intranet.Events.*` | `Adm_T_EventType` · `Adm_T_EventCategory` · `Adm_T_Event` · `Adm_T_EventPhoto` · `Adm_T_EventLike` · `Adm_T_EventComment` | Etkinlik yönetimi; foto ve katılımcı sayacı olan kayıt kalıbı. `EventComment` menüde Intranet altında (Documents'ın üstünde), `EventPhoto` menüde yer almaz; ikisinin yetkisi de `App.Intranet.Events.Event` altındadır. `Adm_T_EventPhoto` tablosu `configs/seeds/host/sql/object/Adm_T_EventPhoto.sql` ile oluşturulur. | | **Restrictions › Work Hour** | `App.Restrictions.WorkHour` | `Adm_T_WorkHour` | Gün bazlı çalışma saati (`Monday`…`Sunday`, `StartTime`, `EndTime`); kullanıcıya `AbpUsers.WorkHour` ile bağlanır. "Sadece mesai saatinde girilebilsin" burada çözülür. | | **Restrictions › IP Restrictions** | `App.Restrictions.IpRestrictions` | `Adm_T_IpRestriction` | `ResourceType` + `ResourceId` + `IP` — kullanıcı/rol bazlı IP kısıtı. | | **Identity › Permission Groups / Permissions** | `Abp.Identity.PermissionGroups` · `Abp.Identity.Permissions` | `AbpPermissionGroups` · `AbpPermissions` | Yetki ağacı (tree düzeni). Yeni ekranın yetkileri burada görünür; `Modules` kolonu yetkiyi modüllere bağlar (pipe ile çoklu). | diff --git a/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Administration.cs b/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Administration.cs index 4881d50f..98387c0c 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Administration.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Migrations/ListFormSeeder_Administration.cs @@ -4752,6 +4752,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Description = $"{listFormName}.Description", SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventType)), + SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName), + SeedSyncInsert = false, + SeedSyncUpdate = false, + SeedSyncDelete = false, KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = DefaultFilterJson, @@ -4842,6 +4846,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Description = $"{listFormName}.Description", SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventCategory)), + SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName), + SeedSyncInsert = false, + SeedSyncUpdate = false, + SeedSyncDelete = false, KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = DefaultFilterJson, @@ -4932,6 +4940,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Description = $"{listFormName}.Description", SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Event)), + SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName), + SeedSyncInsert = false, + SeedSyncUpdate = false, + SeedSyncDelete = false, KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = DefaultFilterJson, @@ -5236,6 +5248,26 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() + { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "isPublished", + EditGroupOrderNo = 1, + EditOrderNo = 8, + EditorType2 = EditorTypes.dxCheckBox, + ColSpan = 1, + CaptionName = "App.Listform.ListformField.IsPublished", + Width = 0, + ListOrderNo = 12, + Visible = true, + IsActive = true, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, // Photos new() { @@ -5394,6 +5426,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Description = $"{listFormName}.Description", SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventComment)), + SeedFilePath = SeedPathResolver.GetDataFilePath(listFormName), + SeedSyncInsert = false, + SeedSyncUpdate = false, + SeedSyncDelete = false, KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, DefaultFilter = DefaultFilterJson, @@ -5483,10 +5519,33 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, FieldName = "EventId", - CaptionName = "App.Listform.ListformField.EventId", + EditGroupOrderNo = 1, + EditOrderNo = 3, + EditorType2 = EditorTypes.dxSelectBox, + ColSpan = 1, + EditorOptions = EditorOptions.ShowClearButton(), + CaptionName = "App.Listform.ListformField.Event", Width = 0, ListOrderNo = 4, - Visible = false, + Visible = true, + IsActive = true, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Event), "Id", "Name"), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "Likes", + CaptionName = "App.Listform.ListformField.Likes", + Alignment = "right", + Width = 0, + ListOrderNo = 5, + Visible = true, IsActive = true, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), diff --git a/api/src/Sozsoft.Platform.DbMigrator/Migrations/MenusData.json b/api/src/Sozsoft.Platform.DbMigrator/Migrations/MenusData.json index 02cd3be3..2c5fd560 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Migrations/MenusData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Migrations/MenusData.json @@ -1294,11 +1294,22 @@ "IsDisabled": false, "ModuleId": "Adm" }, + { + "ParentCode": "App.Administration.Intranet", + "Code": "App.Intranet.Events.EventComment", + "DisplayName": "App.Intranet.Events.EventComment", + "Order": 7, + "Url": "/admin/list/App.Intranet.Events.EventComment", + "Icon": "FcFeedback", + "RequiredPermissionName": "App.Intranet.Events.EventComment", + "IsDisabled": false, + "ModuleId": "Adm" + }, { "ParentCode": "App.Administration.Intranet", "Code": "App.Intranet.Document", "DisplayName": "App.Intranet.Document", - "Order": 7, + "Order": 8, "Url": "/admin/intranet-documents", "Icon": "FcOpenedFolder", "RequiredPermissionName": "App.Intranet.Document", diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json index de1d491c..ff5504b0 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json @@ -527,355 +527,5 @@ "postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨", "userName": "system@sozsoft.com" } - ], - "EventTypes": [ - { - "Name": "Futbol Turnuvası" - }, - { - "Name": "Basketbol Maçı" - }, - { - "Name": "Koşu Etkinliği" - }, - { - "Name": "Tenis Turnuvası" - }, - { - "Name": "Yüzme Yarışı" - }, - { - "Name": "Bisiklet Turu" - }, - { - "Name": "Doğa Yürüyüşü" - }, - { - "Name": "Yoga Seansı" - }, - { - "Name": "Voleybol Turnuvası" - }, - { - "Name": "Kayak Gezisi" - }, - { - "Name": "Resim Sergisi" - }, - { - "Name": "Tiyatro Gösterisi" - }, - { - "Name": "Sinema Gecesi" - }, - { - "Name": "Heykel Atölyesi" - }, - { - "Name": "Fotoğraf Sergisi" - }, - { - "Name": "Ebru Atölyesi" - }, - { - "Name": "Kısa Film Yarışması" - }, - { - "Name": "Karikatür Sergisi" - }, - { - "Name": "Grafik Tasarım Workshopu" - }, - { - "Name": "Kültürel Sanat Günü" - }, - { - "Name": "Şehir Gezisi" - }, - { - "Name": "Tarihi Miras Turu" - }, - { - "Name": "Müze Ziyareti" - }, - { - "Name": "Kültürel Tanıtım Günü" - }, - { - "Name": "Yöresel Lezzetler Etkinliği" - }, - { - "Name": "Farklı Kültürlerle Tanışma" - }, - { - "Name": "Festival Katılımı" - }, - { - "Name": "Köy Gezisi" - }, - { - "Name": "Anıt ve Ören Yeri Ziyareti" - }, - { - "Name": "Uluslararası Kültür Buluşması" - }, - { - "Name": "Konser" - }, - { - "Name": "Koro Gösterisi" - }, - { - "Name": "Enstrüman Atölyesi" - }, - { - "Name": "DJ Gecesi" - }, - { - "Name": "Karaoke Yarışması" - }, - { - "Name": "Müzik Festivali" - }, - { - "Name": "Caz Akşamı" - }, - { - "Name": "Halk Müziği Gecesi" - }, - { - "Name": "Rock Konseri" - }, - { - "Name": "Müzik Dinleti Gecesi" - }, - { - "Name": "Teknik Eğitim Semineri" - }, - { - "Name": "Kariyer Gelişim Workshopu" - }, - { - "Name": "Liderlik Eğitimi" - }, - { - "Name": "İş Güvenliği Eğitimi" - }, - { - "Name": "İletişim Becerileri Atölyesi" - }, - { - "Name": "Yazılım Geliştirme Kampı" - }, - { - "Name": "Sunum Teknikleri Eğitimi" - }, - { - "Name": "Yapay Zeka Semineri" - }, - { - "Name": "Proje Yönetimi Eğitimi" - }, - { - "Name": "Yabancı Dil Workshopu" - } - ], - "EventCategories": [ - { - "Name": "Spor" - }, - { - "Name": "Sanat" - }, - { - "Name": "Kültür" - }, - { - "Name": "Müzik" - }, - { - "Name": "Eğitim" - } - ], - "Events": [ - { - "CategoryName": "Spor", - "TypeName": "Futbol Turnuvası", - "Date": "2026-11-05T10:00:00", - "Name": "Yaz Futbol Turnuvası 2026", - "Description": "Tüm departmanların katılımıyla düzenlenen geleneksel yaz futbol turnuvası.", - "Place": "Şirket Kampüsü Spor Alanı", - "Status": "published", - "UserName": "system@sozsoft.com", - "ParticipantsCount": 64, - "IsPublished": true, - "Likes": 0, - "Photos": [], - "Comments": [] - }, - { - "CategoryName": "Kültür", - "TypeName": "Kültürel Sanat Günü", - "Date": "2026-11-01T10:00:00", - "Name": "Kültür Gezisi: Kapadokya", - "Description": "Çalışanlarımıza özel, rehber eşliğinde 2 günlük kültürel gezi.", - "Place": "Kapadokya, Nevşehir", - "Status": "published", - "UserName": "system@sozsoft.com", - "ParticipantsCount": 25, - "IsPublished": true, - "Likes": 0, - "Photos": [], - "Comments": [] - }, - { - "CategoryName": "Müzik", - "TypeName": "Caz Akşamı", - "Date": "2026-11-09T10:00:00", - "Name": "Müzik Dinletisi: Jazz Akşamı", - "Description": "Caz müziğinin en güzel örneklerinin canlı performanslarla sunulacağı özel akşam.", - "Place": "Şirket Konferans Salonu", - "Status": "published", - "UserName": "system@sozsoft.com", - "ParticipantsCount": 40, - "IsPublished": true, - "Likes": 0, - "Photos": [], - "Comments": [] - } - ], - "EventComments": [ - { - "EventName": "Yaz Futbol Turnuvası 2025", - "UserName": "system@sozsoft.com", - "Content": "Muhteşem bir gündü! Yılın en güzel etkinliği 🎉", - "Likes": 12 - }, - { - "EventName": "Yaz Futbol Turnuvası 2025", - "UserName": "system@sozsoft.com", - "Content": "Voleybol turnuvası harikaydı, gelecek yıl yine yapalım!", - "Likes": 8 - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "UserName": "system@sozsoft.com", - "Content": "Ekibimiz 2. oldu! Çok gurur duydum herkesle 💪", - "Likes": 15 - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "UserName": "system@sozsoft.com", - "Content": "Gece boyunca kod yazmak ve pizza yemek priceless! 🍕", - "Likes": 10 - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", - "Content": "İT departmanı şampiyon oldu! Gelecek sene kupayı koruyacağız 🏆", - "Likes": 18 - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", - "Content": "Yılın en şık gecesi! Organizasyon mükemmeldi 👏", - "Likes": 25 - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", - "Content": "Tombala hediyelerim harika, çok teşekkürler! 🎁", - "Likes": 14 - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", - "Content": "Müzik grubunuz süperdi, dans pistinden ayrılamadık! 🎵", - "Likes": 19 - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", - "Content": "İlk defa ebru yaptım, çok huzurlu bir deneyimdi 🎨", - "Likes": 11 - } - ], - "EventPhotos": [ - { - "EventName": "Yaz Futbol Turnuvası 2025", - "Url": "https://images.unsplash.com/photo-1530541930197-ff16ac917b0e?w=800" - }, - { - "EventName": "Yaz Futbol Turnuvası 2025", - "Url": "https://images.unsplash.com/photo-1527529482837-4698179dc6ce?w=800" - }, - { - "EventName": "Yaz Futbol Turnuvası 2025", - "Url": "https://images.unsplash.com/photo-1528605105345-5344ea20e269?w=800" - }, - { - "EventName": "Yaz Futbol Turnuvası 2025", - "Url": "https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1531482615713-2afd69097998?w=800" - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "Url": "hhttps://images.unsplash.com/photo-1579952363873-27f3bade9f55?w=800" - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "Url": "https://images.unsplash.com/photo-1574629810360-7efbbe195018?w=800" - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "Url": "https://images.unsplash.com/photo-1431324155629-1a6deb1dec8d?w=800" - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "Url": "https://images.unsplash.com/photo-1553778263-73a83bab9b0c?w=800" - }, - { - "EventName": "Müzik Dinletisi: Jazz Akşamı", - "Url": "https://images.unsplash.com/photo-1511795409834-ef04bbd61622?w=800" - }, - { - "EventName": "Yaz Futbol Turnuvası 2025", - "Url": "https://images.unsplash.com/photo-1519167758481-83f29da8c2b9?w=800" - }, - { - "EventName": "Yaz Futbol Turnuvası 2025", - "Url": "https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1478147427282-58a87a120781?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1492684223066-81342ee5ff30?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1460661419201-fd4cecdf8a8b?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1513364776144-60967b0f800f?w=800" - }, - { - "EventName": "Kültür Gezisi: Kapadokya", - "Url": "https://images.unsplash.com/photo-1515405295579-ba7b45403062?w=800" - } ] } diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs index 62535585..a78c31cb 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs @@ -39,11 +39,6 @@ public class TenantSeederDto public List SocialPollOptions { get; set; } public List SocialComments { get; set; } public List SocialLikes { get; set; } - public List EventTypes { get; set; } - public List EventCategories { get; set; } - public List Events { get; set; } - public List EventPhotos { get; set; } - public List EventComments { get; set; } } public class SocialPostSeedDto @@ -90,47 +85,6 @@ public class SocialLikeSeedDto public string UserName { get; set; } } -public class EventTypeSeedDto -{ - public Guid Id { get; set; } - public string Name { get; set; } -} - -public class EventCategorySeedDto -{ - public Guid Id { get; set; } - public string Name { get; set; } -} - -public class EventSeedDto -{ - public string CategoryName { get; set; } - public string TypeName { get; set; } - public DateTime Date { get; set; } - public string Name { get; set; } - public string Description { get; set; } - public string Place { get; set; } - public string Status { get; set; } - public string UserName { get; set; } - public int ParticipantsCount { get; set; } - public int Likes { get; set; } - public bool IsPublished { get; set; } -} - -public class EventCommentSeedDto -{ - public string EventName { get; set; } - public string UserName { get; set; } - public string Content { get; set; } - public int Likes { get; set; } -} - -public class EventPhotoSeedDto -{ - public string EventName { get; set; } - public string Url { get; set; } -} - public class ServiceSeedDto { public string Icon { get; set; } @@ -224,9 +178,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _socialCommentRepository; private readonly IRepository _socialLikeRepository; - private readonly IRepository _eventTypeRepository; - private readonly IRepository _eventCategoryRepository; - private readonly IRepository _eventRepository; public TenantDataSeeder( @@ -242,10 +193,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository socialMediaRepository, IRepository socialPollOptionRepository, IRepository socialCommentRepository, - IRepository socialLikeRepository, - IRepository eventTypeRepository, - IRepository eventCategoryRepository, - IRepository eventRepository + IRepository socialLikeRepository ) { _lookupNormalizer = lookupNormalizer; @@ -260,9 +208,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency _socialPollOptionRepository = socialPollOptionRepository; _socialCommentRepository = socialCommentRepository; _socialLikeRepository = socialLikeRepository; - _eventTypeRepository = eventTypeRepository; - _eventCategoryRepository = eventCategoryRepository; - _eventRepository = eventRepository; } public async Task SeedAsync(DataSeedContext context) @@ -455,60 +400,5 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency }, autoSave: true); } - foreach (var item in items.EventTypes) - { - var exists = await _eventTypeRepository.AnyAsync(x => x.Name == item.Name); - - if (!exists) - { - await _eventTypeRepository.InsertAsync(new EventType { Name = item.Name }, autoSave: true); - } - } - - foreach (var item in items.EventCategories) - { - var exists = await _eventCategoryRepository.AnyAsync(x => x.Name == item.Name); - - if (!exists) - { - await _eventCategoryRepository.InsertAsync( - new EventCategory - { - Name = item.Name - }, autoSave: true - ); - } - } - - foreach (var item in items.Events) - { - var exists = await _eventRepository.AnyAsync(x => x.Name == item.Name); - - if (!exists) - { - var category = await _eventCategoryRepository.FirstOrDefaultAsync(x => x.Name == item.CategoryName); - var type = await _eventTypeRepository.FirstOrDefaultAsync(x => x.Name == item.TypeName); - var user = await _repositoryUser.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName(item.UserName)); - - if (category != null && type != null) - { - await _eventRepository.InsertAsync(new Event - { - CategoryId = category.Id, - TypeId = type.Id, - Date = item.Date, - Name = item.Name, - Place = item.Place, - Description = item.Description, - UserId = user != null ? user.Id : null, - Status = item.Status, - ParticipantsCount = item.ParticipantsCount, - Likes = item.Likes, - isPublished = item.IsPublished, - }, autoSave: true); - } - } - } - } } diff --git a/configs/seeds/host/data/App.Intranet.Events.Event.json b/configs/seeds/host/data/App.Intranet.Events.Event.json new file mode 100644 index 00000000..b3517125 --- /dev/null +++ b/configs/seeds/host/data/App.Intranet.Events.Event.json @@ -0,0 +1,50 @@ +{ + "ListFormCode": "App.Intranet.Events.Event", + "KeyFieldName": "Id", + "GeneratedAt": "2026-09-04T00:00:00Z", + "Order": 20, + "Rows": [ + { + "Id": "f11d0f64-e6c2-59f0-8bdc-c10122899300", + "CategoryId": "520e4c04-2877-59fd-b698-44e31280090a", + "TypeId": "ddf73c73-14b6-560b-8b4b-76935573f919", + "Date": "2026-11-05T10:00:00", + "Name": "Yaz Futbol Turnuvası 2026", + "Place": "Şirket Kampüsü Spor Alanı", + "Description": "Tüm departmanların katılımıyla düzenlenen geleneksel yaz futbol turnuvası.", + "UserId": "@USER:system@sozsoft.com", + "ParticipantsCount": 64, + "Likes": 0, + "Status": "published", + "isPublished": true + }, + { + "Id": "a1c4751e-6f60-547a-812b-7d1b704a252d", + "CategoryId": "c7db7c05-307d-5598-a706-aa223691dc7a", + "TypeId": "1c8eeb6f-f674-5c0b-912d-7bfd2ad060d3", + "Date": "2026-11-01T10:00:00", + "Name": "Kültür Gezisi: Kapadokya", + "Place": "Kapadokya, Nevşehir", + "Description": "Çalışanlarımıza özel, rehber eşliğinde 2 günlük kültürel gezi.", + "UserId": "@USER:system@sozsoft.com", + "ParticipantsCount": 25, + "Likes": 0, + "Status": "published", + "isPublished": true + }, + { + "Id": "d6eb5ad4-fe9a-5bb2-8502-174105c0c539", + "CategoryId": "80b7e523-219f-5528-a32f-e10c46b453ff", + "TypeId": "9773bb7d-fe07-539c-b0e0-fc2b5d31543a", + "Date": "2026-11-09T10:00:00", + "Name": "Müzik Dinletisi: Jazz Akşamı", + "Place": "Şirket Konferans Salonu", + "Description": "Caz müziğinin en güzel örneklerinin canlı performanslarla sunulacağı özel akşam.", + "UserId": "@USER:system@sozsoft.com", + "ParticipantsCount": 40, + "Likes": 0, + "Status": "published", + "isPublished": true + } + ] +} diff --git a/configs/seeds/host/data/App.Intranet.Events.EventCategory.json b/configs/seeds/host/data/App.Intranet.Events.EventCategory.json new file mode 100644 index 00000000..b48d721e --- /dev/null +++ b/configs/seeds/host/data/App.Intranet.Events.EventCategory.json @@ -0,0 +1,28 @@ +{ + "ListFormCode": "App.Intranet.Events.EventCategory", + "KeyFieldName": "Id", + "GeneratedAt": "2026-09-04T00:00:00Z", + "Order": 10, + "Rows": [ + { + "Id": "520e4c04-2877-59fd-b698-44e31280090a", + "Name": "Spor" + }, + { + "Id": "7db8b233-4d4b-5fc2-ace7-31e85b121be1", + "Name": "Sanat" + }, + { + "Id": "c7db7c05-307d-5598-a706-aa223691dc7a", + "Name": "Kültür" + }, + { + "Id": "80b7e523-219f-5528-a32f-e10c46b453ff", + "Name": "Müzik" + }, + { + "Id": "f44dae29-cc3a-586b-bd06-3df71e509bfb", + "Name": "Eğitim" + } + ] +} diff --git a/configs/seeds/host/data/App.Intranet.Events.EventComment.json b/configs/seeds/host/data/App.Intranet.Events.EventComment.json new file mode 100644 index 00000000..9fb1bd8b --- /dev/null +++ b/configs/seeds/host/data/App.Intranet.Events.EventComment.json @@ -0,0 +1,71 @@ +{ + "ListFormCode": "App.Intranet.Events.EventComment", + "KeyFieldName": "Id", + "GeneratedAt": "2026-09-04T00:00:00Z", + "Order": 30, + "Rows": [ + { + "Id": "dbe2fd97-df02-5ebd-b77b-0cde5c220c55", + "EventId": "f11d0f64-e6c2-59f0-8bdc-c10122899300", + "UserId": "@USER:system@sozsoft.com", + "Content": "Muhteşem bir gündü! Yılın en güzel etkinliği 🎉", + "Likes": 12 + }, + { + "Id": "31c40713-43b0-5e0f-98cf-baa0f19a69c9", + "EventId": "f11d0f64-e6c2-59f0-8bdc-c10122899300", + "UserId": "@USER:system@sozsoft.com", + "Content": "Voleybol turnuvası harikaydı, gelecek yıl yine yapalım!", + "Likes": 8 + }, + { + "Id": "fac3c82b-6b76-5fc0-8873-a5da0c2624a2", + "EventId": "a1c4751e-6f60-547a-812b-7d1b704a252d", + "UserId": "@USER:system@sozsoft.com", + "Content": "Ekibimiz 2. oldu! Çok gurur duydum herkesle 💪", + "Likes": 15 + }, + { + "Id": "ea1f0599-14ac-54a9-a4f5-6d9a08e0ce0f", + "EventId": "a1c4751e-6f60-547a-812b-7d1b704a252d", + "UserId": "@USER:system@sozsoft.com", + "Content": "Gece boyunca kod yazmak ve pizza yemek priceless! 🍕", + "Likes": 10 + }, + { + "Id": "541702c7-165e-567e-a108-690a4ddf072a", + "EventId": "d6eb5ad4-fe9a-5bb2-8502-174105c0c539", + "UserId": "@USER:system@sozsoft.com", + "Content": "İT departmanı şampiyon oldu! Gelecek sene kupayı koruyacağız 🏆", + "Likes": 18 + }, + { + "Id": "06883c01-95db-5139-a441-ab04a7c413d2", + "EventId": "d6eb5ad4-fe9a-5bb2-8502-174105c0c539", + "UserId": "@USER:system@sozsoft.com", + "Content": "Yılın en şık gecesi! Organizasyon mükemmeldi 👏", + "Likes": 25 + }, + { + "Id": "36c55694-ac88-5021-a157-0e5d62d3c414", + "EventId": "d6eb5ad4-fe9a-5bb2-8502-174105c0c539", + "UserId": "@USER:system@sozsoft.com", + "Content": "Tombala hediyelerim harika, çok teşekkürler! 🎁", + "Likes": 14 + }, + { + "Id": "095626eb-70e7-5b1f-8329-990e32cb949c", + "EventId": "d6eb5ad4-fe9a-5bb2-8502-174105c0c539", + "UserId": "@USER:system@sozsoft.com", + "Content": "Müzik grubunuz süperdi, dans pistinden ayrılamadık! 🎵", + "Likes": 19 + }, + { + "Id": "02d14982-66e4-5ec1-8499-975cc1ae1b95", + "EventId": "d6eb5ad4-fe9a-5bb2-8502-174105c0c539", + "UserId": "@USER:system@sozsoft.com", + "Content": "İlk defa ebru yaptım, çok huzurlu bir deneyimdi 🎨", + "Likes": 11 + } + ] +} diff --git a/configs/seeds/host/data/App.Intranet.Events.EventType.json b/configs/seeds/host/data/App.Intranet.Events.EventType.json new file mode 100644 index 00000000..d93685b7 --- /dev/null +++ b/configs/seeds/host/data/App.Intranet.Events.EventType.json @@ -0,0 +1,208 @@ +{ + "ListFormCode": "App.Intranet.Events.EventType", + "KeyFieldName": "Id", + "GeneratedAt": "2026-09-04T00:00:00Z", + "Order": 10, + "Rows": [ + { + "Id": "ddf73c73-14b6-560b-8b4b-76935573f919", + "Name": "Futbol Turnuvası" + }, + { + "Id": "5990761c-b457-563e-b6b6-c94cebc1cd8b", + "Name": "Basketbol Maçı" + }, + { + "Id": "e8add5dc-0c99-5085-925c-7ae98f3a7cfd", + "Name": "Koşu Etkinliği" + }, + { + "Id": "e96c7b1d-e82a-5808-a028-6bda654220e5", + "Name": "Tenis Turnuvası" + }, + { + "Id": "e467303a-98a6-5cdb-ba77-791ebff49797", + "Name": "Yüzme Yarışı" + }, + { + "Id": "6b8b6bb9-4b02-54c6-a433-048de830da29", + "Name": "Bisiklet Turu" + }, + { + "Id": "e9a9884c-3eaf-52e0-b77b-8f81ce125bbc", + "Name": "Doğa Yürüyüşü" + }, + { + "Id": "97973bed-afca-5184-90e7-1b6936cf0621", + "Name": "Yoga Seansı" + }, + { + "Id": "e55bec5e-d6fe-5761-99e9-0f3dae7ca62e", + "Name": "Voleybol Turnuvası" + }, + { + "Id": "9705b55c-1bbe-5e4e-9335-d5e724459981", + "Name": "Kayak Gezisi" + }, + { + "Id": "83d1002a-8af0-5194-a57f-2e980318acea", + "Name": "Resim Sergisi" + }, + { + "Id": "6424a2eb-67f1-5ff8-9682-32d1fce69adc", + "Name": "Tiyatro Gösterisi" + }, + { + "Id": "b103a61b-88a4-5a1a-9668-00cbf5fcf4c6", + "Name": "Sinema Gecesi" + }, + { + "Id": "ac158989-9a0b-5211-a418-63aa326f5e25", + "Name": "Heykel Atölyesi" + }, + { + "Id": "2e13f2cd-fc7f-5e2a-bcad-be59d2a4f1ad", + "Name": "Fotoğraf Sergisi" + }, + { + "Id": "0b879a38-7264-5bb4-acfd-f713d8754c58", + "Name": "Ebru Atölyesi" + }, + { + "Id": "6de977b7-f012-5fc0-8f0b-2abfd6d92142", + "Name": "Kısa Film Yarışması" + }, + { + "Id": "32d0859c-62d0-5364-a9ba-aad2f186b180", + "Name": "Karikatür Sergisi" + }, + { + "Id": "810d3068-066f-5488-957b-d086d60e8fc8", + "Name": "Grafik Tasarım Workshopu" + }, + { + "Id": "1c8eeb6f-f674-5c0b-912d-7bfd2ad060d3", + "Name": "Kültürel Sanat Günü" + }, + { + "Id": "c4309f13-74fd-5cb5-a084-0b92535c63b8", + "Name": "Şehir Gezisi" + }, + { + "Id": "7925be0d-d96b-512c-bf69-f363259dfd1e", + "Name": "Tarihi Miras Turu" + }, + { + "Id": "a4dab52d-e0c9-5bae-9398-a961b39521fc", + "Name": "Müze Ziyareti" + }, + { + "Id": "c759fb80-6103-5d7c-8784-41a36a6947f9", + "Name": "Kültürel Tanıtım Günü" + }, + { + "Id": "58a409bc-6222-560e-9647-7efce2e6e71a", + "Name": "Yöresel Lezzetler Etkinliği" + }, + { + "Id": "699aa886-ca2d-52ec-8461-5350761347a6", + "Name": "Farklı Kültürlerle Tanışma" + }, + { + "Id": "21d32628-6d7f-52bf-88c2-4c14642d94de", + "Name": "Festival Katılımı" + }, + { + "Id": "752828be-c021-5d16-8672-2f15aed74add", + "Name": "Köy Gezisi" + }, + { + "Id": "0a42b58f-1bcb-568b-acaf-9ac21fc099c6", + "Name": "Anıt ve Ören Yeri Ziyareti" + }, + { + "Id": "066ab279-b117-5083-a1d5-6e2346a95845", + "Name": "Uluslararası Kültür Buluşması" + }, + { + "Id": "1d25df7d-ef49-50ee-8f55-8c378ac5b8a9", + "Name": "Konser" + }, + { + "Id": "6c58acc5-b191-5024-af97-53c75a381728", + "Name": "Koro Gösterisi" + }, + { + "Id": "07e3a960-d96b-5e60-ac7f-24a917497711", + "Name": "Enstrüman Atölyesi" + }, + { + "Id": "abb2cbe6-8256-5822-9250-7afec6415bc9", + "Name": "DJ Gecesi" + }, + { + "Id": "1f80b5ca-b954-5133-b9e4-6e43abfa652c", + "Name": "Karaoke Yarışması" + }, + { + "Id": "091f7349-c1a7-5262-a2c1-8663c3abab81", + "Name": "Müzik Festivali" + }, + { + "Id": "9773bb7d-fe07-539c-b0e0-fc2b5d31543a", + "Name": "Caz Akşamı" + }, + { + "Id": "8da90d6b-bd25-5d03-a74a-d93d865abd5c", + "Name": "Halk Müziği Gecesi" + }, + { + "Id": "15bdc6d6-c066-596c-9976-22c58691e38b", + "Name": "Rock Konseri" + }, + { + "Id": "47811a35-cd41-543e-b080-c4218ad74786", + "Name": "Müzik Dinleti Gecesi" + }, + { + "Id": "ce7ff702-a74b-5116-a337-89036e09774b", + "Name": "Teknik Eğitim Semineri" + }, + { + "Id": "89d57816-67e0-5025-bbfc-ccf88ec106b5", + "Name": "Kariyer Gelişim Workshopu" + }, + { + "Id": "50e0b330-53e7-51e6-9d49-350df412afc4", + "Name": "Liderlik Eğitimi" + }, + { + "Id": "ac0eb6d9-bf7c-5c8b-a682-6d00d9ada3dd", + "Name": "İş Güvenliği Eğitimi" + }, + { + "Id": "f3d4d585-a81b-5746-97d3-a52d85c96a72", + "Name": "İletişim Becerileri Atölyesi" + }, + { + "Id": "d5fbc75d-87e8-5f1a-b979-88564b9458e0", + "Name": "Yazılım Geliştirme Kampı" + }, + { + "Id": "aa7b59cc-6dd8-5fef-b10c-436704a12330", + "Name": "Sunum Teknikleri Eğitimi" + }, + { + "Id": "2604306d-ae18-5958-bba7-b7dfcd595673", + "Name": "Yapay Zeka Semineri" + }, + { + "Id": "7b2a8af8-c0b4-58db-a839-24ce976864d8", + "Name": "Proje Yönetimi Eğitimi" + }, + { + "Id": "f306a47d-8c20-50c4-b3f5-ae00dbb2598d", + "Name": "Yabancı Dil Workshopu" + } + ] +}