Hr Reservations ve Shuttleroute

This commit is contained in:
Sedat ÖZTÜRK 2025-10-24 18:00:36 +03:00
parent 1806cd4b26
commit 768dfdfd16
98 changed files with 2214 additions and 366 deletions

View file

@ -7621,6 +7621,24 @@
"tr": "Eğitimler",
"en": "Trainings"
},
{
"resourceName": "Platform",
"key": "App.Hr.Meal",
"tr": "Yemekler",
"en": "Meals"
},
{
"resourceName": "Platform",
"key": "App.Hr.Reservation",
"tr": "Rezervasyonlar",
"en": "Reservations"
},
{
"resourceName": "Platform",
"key": "App.Hr.ShuttleRoute",
"tr": "Servis Rotaları",
"en": "Shuttle Routes"
},
{
"resourceName": "Platform",
"key": "App.Definitions.Information",
@ -7711,12 +7729,6 @@
"tr": "Psikologlar",
"en": "Psychologists"
},
{
"resourceName": "Platform",
"key": "App.Definitions.Meal",
"tr": "Yemekler",
"en": "Meals"
},
{
"resourceName": "Platform",
"key": "App.Definitions.Lawyer",
@ -14224,16 +14236,6 @@
"RequiredPermissionName": "App.Definitions.Lawyer",
"IsDisabled": false
},
{
"ParentCode": "App.Definitions",
"Code": "App.Definitions.Meal",
"DisplayName": "App.Definitions.Meal",
"Order": 16,
"Url": "/admin/list/list-meal",
"Icon": "FcLike",
"RequiredPermissionName": "App.Definitions.Meal",
"IsDisabled": false
},
{
"ParentCode": null,
"Code": "App.Participant",
@ -15096,6 +15098,36 @@
"RequiredPermissionName": "App.Hr.Training",
"IsDisabled": false
},
{
"ParentCode": "App.Hr",
"Code": "App.Hr.Meal",
"DisplayName": "App.Hr.Meal",
"Order": 16,
"Url": "/admin/list/list-meal",
"Icon": "FcLike",
"RequiredPermissionName": "App.Hr.Meal",
"IsDisabled": false
},
{
"ParentCode": "App.Hr",
"Code": "App.Hr.Reservation",
"DisplayName": "App.Hr.Reservation",
"Order": 17,
"Url": "/admin/list/list-reservation",
"Icon": "FcAlarmClock",
"RequiredPermissionName": "App.Hr.Reservation",
"IsDisabled": false
},
{
"ParentCode": "App.Hr",
"Code": "App.Hr.ShuttleRoute",
"DisplayName": "App.Hr.ShuttleRoute",
"Order": 17,
"Url": "/admin/list/list-shuttleroute",
"Icon": "FcAutomotive",
"RequiredPermissionName": "App.Hr.ShuttleRoute",
"IsDisabled": false
},
{
"ParentCode": null,
@ -20562,70 +20594,6 @@
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Definitions.Meal",
"ParentName": null,
"DisplayName": "App.Definitions.Meal",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Definitions.Meal.Create",
"ParentName": "App.Definitions.Meal",
"DisplayName": "Create",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Definitions.Meal.Update",
"ParentName": "App.Definitions.Meal",
"DisplayName": "Update",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Definitions.Meal.Delete",
"ParentName": "App.Definitions.Meal",
"DisplayName": "Delete",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Definitions.Meal.Export",
"ParentName": "App.Definitions.Meal",
"DisplayName": "Export",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Definitions.Meal.Import",
"ParentName": "App.Definitions.Meal",
"DisplayName": "Import",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Administration",
"Name": "App.Definitions.Meal.Activity",
"ParentName": "App.Definitions.Meal",
"DisplayName": "Activity",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Participant",
"Name": "App.Definitions.MeetingMethod",
@ -24858,6 +24826,195 @@
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Meal",
"ParentName": null,
"DisplayName": "App.Hr.Meal",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Meal.Create",
"ParentName": "App.Hr.Meal",
"DisplayName": "Create",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Meal.Update",
"ParentName": "App.Hr.Meal",
"DisplayName": "Update",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Meal.Delete",
"ParentName": "App.Hr.Meal",
"DisplayName": "Delete",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Meal.Export",
"ParentName": "App.Hr.Meal",
"DisplayName": "Export",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Meal.Import",
"ParentName": "App.Hr.Meal",
"DisplayName": "Import",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Meal.Activity",
"ParentName": "App.Hr.Meal",
"DisplayName": "Activity",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Reservation",
"ParentName": null,
"DisplayName": "App.Hr.Reservation",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Reservation.Create",
"ParentName": "App.Hr.Reservation",
"DisplayName": "Create",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Reservation.Update",
"ParentName": "App.Hr.Reservation",
"DisplayName": "Update",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Reservation.Delete",
"ParentName": "App.Hr.Reservation",
"DisplayName": "Delete",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Reservation.Export",
"ParentName": "App.Hr.Reservation",
"DisplayName": "Export",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Reservation.Import",
"ParentName": "App.Hr.Reservation",
"DisplayName": "Import",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.Reservation.Activity",
"ParentName": "App.Hr.Reservation",
"DisplayName": "Activity",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.ShuttleRoute",
"ParentName": null,
"DisplayName": "App.Hr.ShuttleRoute",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.ShuttleRoute.Create",
"ParentName": "App.Hr.ShuttleRoute",
"DisplayName": "Create",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.ShuttleRoute.Update",
"ParentName": "App.Hr.ShuttleRoute",
"DisplayName": "Update",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.ShuttleRoute.Delete",
"ParentName": "App.Hr.ShuttleRoute",
"DisplayName": "Delete",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.ShuttleRoute.Export",
"ParentName": "App.Hr.ShuttleRoute",
"DisplayName": "Export",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.ShuttleRoute.Import",
"ParentName": "App.Hr.ShuttleRoute",
"DisplayName": "Import",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Hr",
"Name": "App.Hr.ShuttleRoute.Activity",
"ParentName": "App.Hr.ShuttleRoute",
"DisplayName": "Activity",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Kurs"
},
{
"GroupName": "App.Crm",

File diff suppressed because it is too large Load diff

View file

@ -118,5 +118,7 @@ public enum TableNameEnum
Template360,
Performance360,
Training,
Certificate
Certificate,
Reservation,
ShuttleRoute
}

View file

@ -527,6 +527,8 @@ public static class PlatformConsts
public const string Template360 = "list-template360";
public const string Performance360 = "list-performance360";
public const string Training = "list-training";
public const string Reservation = "list-reservation";
public const string ShuttleRoute = "list-shuttleroute";
}
}

View file

@ -74,7 +74,6 @@ public static class TableNameResolver
{ nameof(TableNameEnum.Psychologist), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Vaccine), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Lawyer), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Meal), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Document), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.Vehicle), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
{ nameof(TableNameEnum.WorkHour), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
@ -136,6 +135,9 @@ public static class TableNameResolver
{ nameof(TableNameEnum.Event), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
{ nameof(TableNameEnum.Training), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
{ nameof(TableNameEnum.Certificate), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
{ nameof(TableNameEnum.Meal), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Hr) },
{ nameof(TableNameEnum.Reservation), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
{ nameof(TableNameEnum.ShuttleRoute), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Hr) },
// 🔹 ACCOUNTING
{ nameof(TableNameEnum.Bank), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Accounting) },

View file

@ -19,6 +19,7 @@ public class BranchSeedManager : DomainService
private readonly IRepository<Level, Guid> _levelRepository;
private readonly IRepository<LessonPeriod, Guid> _lessonPeriodRepository;
private readonly IRepository<Schedule, Guid> _scheduleRepository;
private readonly IRepository<Meal, Guid> _mealRepository;
public BranchSeedManager(
IRepository<Branch, Guid> branchRepository,
@ -28,7 +29,9 @@ public class BranchSeedManager : DomainService
IRepository<Class, Guid> classRepository,
IRepository<Level, Guid> levelRepository,
IRepository<LessonPeriod, Guid> lessonPeriodRepository,
IRepository<Schedule, Guid> scheduleRepository)
IRepository<Schedule, Guid> scheduleRepository,
IRepository<Meal, Guid> mealRepository
)
{
_branchRepository = branchRepository;
_registrationTypeRepository = registrationTypeRepository;
@ -38,6 +41,7 @@ public class BranchSeedManager : DomainService
_levelRepository = levelRepository;
_lessonPeriodRepository = lessonPeriodRepository;
_scheduleRepository = scheduleRepository;
_mealRepository = mealRepository;
}
public async Task<BranchSeedResult> SeedRecordsAsync(Guid? tenantId, Guid branchId)
@ -268,6 +272,28 @@ public class BranchSeedManager : DomainService
}
result.Details.Add(scheduleLog);
var mealLog = CreateLog(nameof(Meal));
foreach (var item in items.Meals)
{
var exists = await _mealRepository.AnyAsync(x => x.Date == item.Date && x.Type == item.Type && x.BranchId == branchId);
if (!exists)
{
await _mealRepository.InsertAsync(new()
{
TenantId = tenantId,
BranchId = branchId,
Date = item.Date,
Type = item.Type,
TotalCalorie = item.TotalCalorie,
Materials = item.Materials
}, autoSave: true);
mealLog.InsertedCount++;
mealLog.InsertedItems.Add(string.Format("{0} {1} {2}", item.Date, item.Type, item.Materials));
}
}
result.Details.Add(mealLog);
result.Success = true;
result.Message = $"Seed işlemi başarıyla tamamlandı. Toplam {result.TotalInsertedCount} kayıt eklendi.";
return result;

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
namespace Kurs.Platform.Branchs;
@ -11,6 +12,15 @@ public class BranchSeederDto
public List<LevelSeedDto> Levels { get; set; }
public List<LessonPeriodSeedDto> LessonPeriods { get; set; }
public List<ScheduleSeedDto> Schedules { get; set; }
public List<MealSeedDto> Meals { get; set; }
}
public class MealSeedDto
{
public DateTime Date { get; set; }
public string Type { get; set; }
public decimal TotalCalorie { get; set; }
public string Materials { get; set; }
}
public class RegistrationTypeSeedDto

View file

@ -808,5 +808,33 @@
"Lesson3": "Ana",
"Lesson4": "Ana"
}
],
"Meals": [
{
"date": "01-10-2025",
"type": "lunch",
"totalCalorie": 650,
"materials": "Mercimek Çorbası|Tavuk Şinitzel|Bulgur Pilavı|Salata|Meyve"
},
{
"date": "02-10-2025",
"type": "lunch",
"materials": "Domates Çorbası|Etli Kuru Fasulye|Pilav|Turşu|Komposto"
},
{
"date": "03-10-2025",
"type": "lunch",
"materials": "Tarator|Köfte|Patates Püresi|Salata|Meyve"
},
{
"date": "04-10-2025",
"type": "lunch",
"materials": "Yoğurtlu Kabak Salatası|Fırında Levrek|Kuskus|Roka Salatası|Meyve"
},
{
"date": "05-10-2025",
"type": "lunch",
"materials": "Mercimek Çorbası|Tavuk Şinitzel|Bulgur Pilavı|Salata|Meyve"
}
]
}

View file

@ -466,6 +466,9 @@ public static class SeedConsts
public const string Event = Events + ".Event";
public const string Training = Default + ".Training";
public const string Meal = Default + ".Meal";
public const string Reservation = Default + ".Reservation";
public const string ShuttleRoute = Default + ".ShuttleRoute";
}
public static class Accounting

View file

@ -10,9 +10,9 @@ public class Meal : FullAuditedEntity<Guid>, IMultiTenant
public Guid? BranchId { get; set; }
public DateTime Date { get; set; }
public string Breakfast { get; set; }
public string Lunch { get; set; }
public string Snack { get; set; }
public string Type { get; set; }
public decimal TotalCalorie { get; set; }
public string Materials { get; set; }
Guid? IMultiTenant.TenantId => TenantId;
}

View file

@ -0,0 +1,24 @@
// Domain/Entities/Reservation.cs
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class Reservation : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Type { get; set; } // room | vehicle | equipment
public string ResourceName { get; set; }
public Guid? EmployeeId { get; set; }
public Employee Employee { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public string Purpose { get; set; } //Amaç
public int? Participants { get; set; } //Katılımcı Sayısı
public string Notes { get; set; }
public string Status { get; set; } // pending | approved | rejected | completed
}

View file

@ -0,0 +1,19 @@
// Domain/Entities/ShuttleRoute.cs
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Kurs.Platform.Entities;
public class ShuttleRoute : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Type { get; set; }
public string Name { get; set; }
public string DepartureTime { get; set; }
public string ArrivalTime { get; set; }
public int Capacity { get; set; }
public int Available { get; set; }
public string Route { get; set; }
}

View file

@ -179,6 +179,8 @@ public class PlatformDbContext :
public DbSet<Performans360> Performans360s { get; set; }
public DbSet<Training> Trainings { get; set; }
public DbSet<Certificate> Certificates { get; set; }
public DbSet<Reservation> Reservations { get; set; }
public DbSet<ShuttleRoute> ShuttleRoutes { get; set; }
#endregion
@ -1247,9 +1249,9 @@ public class PlatformDbContext :
b.ConfigureByConvention();
b.Property(x => x.Date).IsRequired();
b.Property(x => x.Breakfast).HasMaxLength(200);
b.Property(x => x.Lunch).HasMaxLength(200);
b.Property(x => x.Snack).HasMaxLength(200);
b.Property(x => x.Type).HasMaxLength(20);
b.Property(x => x.TotalCalorie).HasPrecision(9, 2);
b.Property(x => x.Materials).HasMaxLength(500);
});
builder.Entity<Document>(b =>
@ -1916,5 +1918,32 @@ public class PlatformDbContext :
.HasPrincipalKey(e => e.Id)
.OnDelete(DeleteBehavior.Cascade);
});
builder.Entity<Reservation>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Reservation)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Type).IsRequired().HasMaxLength(50);
b.Property(x => x.EmployeeId).IsRequired();
b.Property(x => x.ResourceName).IsRequired().HasMaxLength(200);
b.Property(x => x.Purpose).IsRequired().HasMaxLength(500);
b.Property(x => x.Notes).HasMaxLength(1000);
b.Property(x => x.Status).IsRequired().HasMaxLength(50);
});
builder.Entity<ShuttleRoute>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ShuttleRoute)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(150);
b.Property(x => x.Route).IsRequired(); // serialized list
b.Property(x => x.DepartureTime).HasMaxLength(10);
b.Property(x => x.ArrivalTime).HasMaxLength(10);
b.Property(x => x.Type).HasMaxLength(20);
b.Property(x => x.Capacity).HasDefaultValue(0);
b.Property(x => x.Available).HasDefaultValue(0);
});
}
}

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Kurs.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20251024083852_Initial")]
[Migration("20251024144858_Initial")]
partial class Initial
{
/// <inheritdoc />
@ -5212,10 +5212,6 @@ namespace Kurs.Platform.Migrations
b.Property<Guid?>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Breakfast")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -5249,21 +5245,25 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Lunch")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Snack")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Materials")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<decimal>("TotalCalorie")
.HasPrecision(9, 2)
.HasColumnType("decimal(9,2)");
b.Property<string>("Type")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.HasKey("Id");
b.ToTable("B_Adm_Meal", (string)null);
b.ToTable("B_Hr_Meal", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b =>
@ -6950,6 +6950,88 @@ namespace Kurs.Platform.Migrations
b.ToTable("T_Sas_ReportTemplate", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Reservation", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<Guid>("EmployeeId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("EndDate")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Notes")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<int?>("Participants")
.HasColumnType("int");
b.Property<string>("Purpose")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("ResourceName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateTime>("StartDate")
.HasColumnType("datetime2");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.ToTable("T_Hr_Reservation", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Route", b =>
{
b.Property<Guid>("Id")
@ -7361,6 +7443,81 @@ namespace Kurs.Platform.Migrations
b.ToTable("T_Adm_Service", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.ShuttleRoute", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ArrivalTime")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<int>("Available")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<int>("Capacity")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("DepartureTime")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("Route")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("Type")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.HasKey("Id");
b.ToTable("T_Hr_ShuttleRoute", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Skill", b =>
{
b.Property<Guid>("Id")
@ -10803,6 +10960,17 @@ namespace Kurs.Platform.Migrations
b.Navigation("ReportCategory");
});
modelBuilder.Entity("Kurs.Platform.Entities.Reservation", b =>
{
b.HasOne("Kurs.Platform.Entities.Employee", "Employee")
.WithMany()
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Employee");
});
modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b =>
{
b.HasOne("Kurs.Platform.Entities.Schedule", "Schedule")

View file

@ -434,30 +434,6 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_AbpUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "B_Adm_Meal",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Date = table.Column<DateTime>(type: "datetime2", nullable: false),
Breakfast = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Lunch = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Snack = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_B_Adm_Meal", x => x.Id);
});
migrationBuilder.CreateTable(
name: "B_Crd_LessonPeriod",
columns: table => new
@ -543,6 +519,30 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_B_Crd_Schedule", x => x.Id);
});
migrationBuilder.CreateTable(
name: "B_Hr_Meal",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Date = table.Column<DateTime>(type: "datetime2", nullable: false),
Type = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
TotalCalorie = table.Column<decimal>(type: "decimal(9,2)", precision: 9, scale: 2, nullable: false),
Materials = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_B_Hr_Meal", x => x.Id);
});
migrationBuilder.CreateTable(
name: "OpenIddictApplications",
columns: table => new
@ -1829,6 +1829,32 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_T_Hr_Payroll", x => x.Id);
});
migrationBuilder.CreateTable(
name: "T_Hr_ShuttleRoute",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Type = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
Name = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false),
DepartureTime = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
ArrivalTime = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
Capacity = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
Available = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
Route = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Hr_ShuttleRoute", x => x.Id);
});
migrationBuilder.CreateTable(
name: "T_Hr_Template360",
columns: table => new
@ -4199,6 +4225,40 @@ namespace Kurs.Platform.Migrations
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_Hr_Reservation",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
ResourceName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
EmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Purpose = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
Participants = table.Column<int>(type: "int", nullable: true),
Notes = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Status = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_Hr_Reservation", x => x.Id);
table.ForeignKey(
name: "FK_T_Hr_Reservation_T_Hr_Employee_EmployeeId",
column: x => x.EmployeeId,
principalTable: "T_Hr_Employee",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_AuditLogId",
table: "AbpAuditLogActions",
@ -4858,6 +4918,11 @@ namespace Kurs.Platform.Migrations
table: "T_Hr_Performance360",
column: "TemplateId");
migrationBuilder.CreateIndex(
name: "IX_T_Hr_Reservation_EmployeeId",
table: "T_Hr_Reservation",
column: "EmployeeId");
migrationBuilder.CreateIndex(
name: "IX_T_Sas_ApiEndpoint_EntityId",
table: "T_Sas_ApiEndpoint",
@ -5018,9 +5083,6 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable(
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "B_Adm_Meal");
migrationBuilder.DropTable(
name: "B_Crd_Class");
@ -5036,6 +5098,9 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable(
name: "B_Crd_ScheduleLesson");
migrationBuilder.DropTable(
name: "B_Hr_Meal");
migrationBuilder.DropTable(
name: "OpenIddictScopes");
@ -5195,6 +5260,12 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable(
name: "T_Hr_Performance360");
migrationBuilder.DropTable(
name: "T_Hr_Reservation");
migrationBuilder.DropTable(
name: "T_Hr_ShuttleRoute");
migrationBuilder.DropTable(
name: "T_Prt_Interesting");

View file

@ -5209,10 +5209,6 @@ namespace Kurs.Platform.Migrations
b.Property<Guid?>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Breakfast")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -5246,21 +5242,25 @@ namespace Kurs.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Lunch")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Snack")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<string>("Materials")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<decimal>("TotalCalorie")
.HasPrecision(9, 2)
.HasColumnType("decimal(9,2)");
b.Property<string>("Type")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.HasKey("Id");
b.ToTable("B_Adm_Meal", (string)null);
b.ToTable("B_Hr_Meal", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.MeetingMethod", b =>
@ -6947,6 +6947,88 @@ namespace Kurs.Platform.Migrations
b.ToTable("T_Sas_ReportTemplate", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Reservation", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<Guid>("EmployeeId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("EndDate")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Notes")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<int?>("Participants")
.HasColumnType("int");
b.Property<string>("Purpose")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("ResourceName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateTime>("StartDate")
.HasColumnType("datetime2");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.ToTable("T_Hr_Reservation", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Route", b =>
{
b.Property<Guid>("Id")
@ -7358,6 +7440,81 @@ namespace Kurs.Platform.Migrations
b.ToTable("T_Adm_Service", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.ShuttleRoute", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ArrivalTime")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<int>("Available")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<int>("Capacity")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("DepartureTime")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property<string>("Route")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("Type")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.HasKey("Id");
b.ToTable("T_Hr_ShuttleRoute", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.Skill", b =>
{
b.Property<Guid>("Id")
@ -10800,6 +10957,17 @@ namespace Kurs.Platform.Migrations
b.Navigation("ReportCategory");
});
modelBuilder.Entity("Kurs.Platform.Entities.Reservation", b =>
{
b.HasOne("Kurs.Platform.Entities.Employee", "Employee")
.WithMany()
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Employee");
});
modelBuilder.Entity("Kurs.Platform.Entities.ScheduleLesson", b =>
{
b.HasOne("Kurs.Platform.Entities.Schedule", "Schedule")

View file

@ -3467,5 +3467,110 @@
"location": "Eğitim Salonu D",
"thumbnail": "https://images.unsplash.com/photo-1550751827-4bd374c3f58b?w=400&h=300&fit=crop"
}
],
"Reservations": [
{
"type": "room",
"resourceName": "Toplantı Salonu A",
"employeeCode": "EMP-001",
"startDate": "10-10-2024 09:00:00",
"endDate": "10-10-2024 11:00:00",
"purpose": "Sprint Planning Toplantısı",
"status": "approved",
"participants": 8,
"notes": "Projeksiyon cihazı gerekli"
},
{
"type": "vehicle",
"resourceName": "Şirket Aracı - 34 ABC 123",
"employeeCode": "EMP-001",
"startDate": "11-10-2024 08:00:00",
"endDate": "11-10-2024 18:00:00",
"purpose": "Müşteri Ziyareti",
"status": "pending",
"notes": "Ankara çıkışı"
},
{
"type": "equipment",
"resourceName": "Kamera ve Tripod Seti",
"employeeCode": "EMP-001",
"startDate": "09-10-2024 14:00:00",
"endDate": "09-10-2024 17:00:00",
"purpose": "Ürün Tanıtım Videosu Çekimi",
"status": "approved"
},
{
"type": "room",
"resourceName": "Eğitim Salonu B",
"employeeCode": "EMP-001",
"startDate": "05-10-2024 09:00:00",
"endDate": "05-10-2024 17:00:00",
"purpose": "Etkili İletişim Eğitimi",
"status": "approved",
"participants": 15,
"notes": "Tüm gün rezervasyon, öğle yemeği dahil"
}
],
"ShuttleRoutes": [
{
"name": "Kadıköy - Ofis",
"route": [
"Kadıköy İskele",
"Bostancı",
"Acıbadem",
"Kozyatağı",
"Ofis"
],
"departureTime": "07:30",
"arrivalTime": "08:45",
"capacity": 25,
"available": 3,
"type": "morning"
},
{
"name": "Üsküdar - Ofis",
"route": [
"Üsküdar Meydanı",
"Kısıklı",
"Bulgurlu",
"Ümraniye",
"Ofis"
],
"departureTime": "07:45",
"arrivalTime": "08:50",
"capacity": 25,
"available": 8,
"type": "morning"
},
{
"name": "Ofis - Kadıköy",
"route": [
"Ofis",
"Kozyatağı",
"Acıbadem",
"Bostancı",
"Kadıköy İskele"
],
"departureTime": "18:00",
"arrivalTime": "19:15",
"capacity": 25,
"available": 5,
"type": "evening"
},
{
"name": "Ofis - Üsküdar",
"route": [
"Ofis",
"Ümraniye",
"Bulgurlu",
"Kısıklı",
"Üsküdar Meydanı"
],
"departureTime": "18:15",
"arrivalTime": "19:20",
"capacity": 25,
"available": 12,
"type": "evening"
}
]
}

View file

@ -74,6 +74,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
private readonly IRepository<Template360, Guid> _template360Repository;
private readonly IRepository<Performans360, Guid> _performans360Repository;
private readonly IRepository<Training, Guid> _trainingRepository;
private readonly IRepository<Reservation, Guid> _reservationRepository;
private readonly IRepository<ShuttleRoute, Guid> _shuttleRouteRepository;
public TenantDataSeeder(
IRepository<IdentityUser, Guid> repositoryUser,
@ -131,7 +133,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<Payroll, Guid> payrollRepository,
IRepository<Template360, Guid> template360Repository,
IRepository<Performans360, Guid> performans360Repository,
IRepository<Training, Guid> trainingRepository
IRepository<Training, Guid> trainingRepository,
IRepository<Reservation, Guid> reservationRepository,
IRepository<ShuttleRoute, Guid> shuttleRouteRepository
)
{
_repositoryUser = repositoryUser;
@ -190,6 +194,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
_template360Repository = template360Repository;
_performans360Repository = performans360Repository;
_trainingRepository = trainingRepository;
_reservationRepository = reservationRepository;
_shuttleRouteRepository = shuttleRouteRepository;
}
private static IConfigurationRoot BuildConfiguration()
@ -1203,5 +1209,44 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
Thumbnail = item.Thumbnail
}, autoSave: true);
}
foreach (var item in items.Reservations)
{
var exists = await _reservationRepository.AnyAsync(x => x.ResourceName == item.ResourceName && x.StartDate == item.StartDate);
if (exists)
continue;
var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode);
await _reservationRepository.InsertAsync(new Reservation
{
Type = item.Type,
ResourceName = item.ResourceName,
EmployeeId = employee != null ? employee.Id : null,
StartDate = item.StartDate,
EndDate = item.EndDate,
Purpose = item.Purpose,
Participants = item.Participants,
Notes = item.Notes,
Status = item.Status
}, autoSave: true);
}
foreach (var item in items.ShuttleRoutes)
{
var exists = await _shuttleRouteRepository.AnyAsync(x => x.Name == item.Name);
if (exists)
continue;
await _shuttleRouteRepository.InsertAsync(new ShuttleRoute
{
Name = item.Name,
Route = item.Route != null ? string.Join("|", item.Route) : null,
DepartureTime = item.DepartureTime,
ArrivalTime = item.ArrivalTime,
Capacity = item.Capacity,
Available = item.Available,
Type = item.Type
}, autoSave: true);
}
}
}

View file

@ -63,8 +63,34 @@ public class TenantSeederDto
public List<Template360SeedDto> Template360s { get; set; }
public List<Performans360SeedDto> Performans360s { get; set; }
public List<TrainingSeedDto> Trainings { get; set; }
public List<ReservationSeedDto> Reservations { get; set; }
public List<ShuttleRouteSeedDto> ShuttleRoutes { get; set; }
}
public class ShuttleRouteSeedDto
{
public string Name { get; set; }
public List<string> Route { get; set; }
public string DepartureTime { get; set; }
public string ArrivalTime { get; set; }
public int Capacity { get; set; }
public int Available { get; set; }
public string Type { get; set; }
}
public class ReservationSeedDto
{
public string Type { get; set; }
public string ResourceName { get; set; }
public string EmployeeCode { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public string Purpose { get; set; }
public int? Participants { get; set; }
public string Notes { get; set; }
public string Status { get; set; }
}
public class TrainingSeedDto
{
public string Title { get; set; }

View file

@ -387,160 +387,6 @@ export const mockDocuments: Document[] = [
},
]
export const mockReservations: Reservation[] = [
{
id: 'res1',
type: 'room',
resourceName: 'Toplantı Salonu A',
bookedBy: mockEmployees[2],
startDate: new Date('2024-10-20T09:00:00'),
endDate: new Date('2024-10-20T11:00:00'),
purpose: 'Sprint Planning Toplantısı',
status: 'approved',
participants: 8,
notes: 'Projeksiyon cihazı gerekli',
},
{
id: 'res2',
type: 'vehicle',
resourceName: 'Şirket Aracı - 34 ABC 123',
bookedBy: mockEmployees[3],
startDate: new Date('2024-10-22T08:00:00'),
endDate: new Date('2024-10-22T18:00:00'),
purpose: 'Müşteri Ziyareti',
status: 'pending',
notes: 'Ankara çıkışı',
},
{
id: 'res3',
type: 'equipment',
resourceName: 'Kamera ve Tripod Seti',
bookedBy: mockEmployees[5],
startDate: new Date('2024-10-19T14:00:00'),
endDate: new Date('2024-10-19T17:00:00'),
purpose: 'Ürün Tanıtım Videosu Çekimi',
status: 'approved',
},
{
id: 'res4',
type: 'room',
resourceName: 'Eğitim Salonu B',
bookedBy: mockEmployees[6],
startDate: new Date('2024-10-25T09:00:00'),
endDate: new Date('2024-10-25T17:00:00'),
purpose: 'Etkili İletişim Eğitimi',
status: 'approved',
participants: 15,
notes: 'Tüm gün rezervasyon, öğle yemeği dahil',
},
]
export const mockMealMenus: MealMenu[] = [
{
id: 'menu1',
date: new Date('2025-10-20'),
dayOfWeek: 'Pazartesi',
meals: [
{
type: 'lunch',
items: ['Mercimek Çorbası', 'Tavuk Şinitzel', 'Bulgur Pilavı', 'Salata', 'Meyve'],
calories: 650,
},
],
},
{
id: 'menu2',
date: new Date('2025-10-21'),
dayOfWeek: 'Salı',
meals: [
{
type: 'lunch',
items: ['Yayla Çorbası', 'Köfte', 'Patates Püresi', 'Cacık', 'Ayran'],
calories: 720,
},
],
},
{
id: 'menu3',
date: new Date('2025-10-22'),
dayOfWeek: 'Çarşamba',
meals: [
{
type: 'lunch',
items: ['Domates Çorbası', 'Etli Kuru Fasulye', 'Pilav', 'Turşu', 'Komposto'],
calories: 680,
},
],
},
{
id: 'menu4',
date: new Date('2025-10-23'),
dayOfWeek: 'Perşembe',
meals: [
{
type: 'lunch',
items: ['Tarhana Çorbası', 'Fırın Tavuk', 'Makarna', 'Yeşil Salata', 'Sütlaç'],
calories: 700,
},
],
},
{
id: 'menu5',
date: new Date('2025-10-24'),
dayOfWeek: 'Cuma',
meals: [
{
type: 'lunch',
items: ['Ezogelin Çorbası', 'Balık', 'Bulgur Pilavı', 'Salata', 'Meyve'],
calories: 620,
},
],
},
]
export const mockShuttleRoutes: ShuttleRoute[] = [
{
id: 'shuttle1',
name: 'Kadıköy - Ofis',
route: ['Kadıköy İskele', 'Bostancı', 'Acıbadem', 'Kozyatağı', 'Ofis'],
departureTime: '07:30',
arrivalTime: '08:45',
capacity: 25,
available: 3,
type: 'morning',
},
{
id: 'shuttle2',
name: 'Üsküdar - Ofis',
route: ['Üsküdar Meydanı', 'Kısıklı', 'Bulgurlu', 'Ümraniye', 'Ofis'],
departureTime: '07:45',
arrivalTime: '08:50',
capacity: 25,
available: 8,
type: 'morning',
},
{
id: 'shuttle3',
name: 'Ofis - Kadıköy',
route: ['Ofis', 'Kozyatağı', 'Acıbadem', 'Bostancı', 'Kadıköy İskele'],
departureTime: '18:00',
arrivalTime: '19:15',
capacity: 25,
available: 5,
type: 'evening',
},
{
id: 'shuttle4',
name: 'Ofis - Üsküdar',
route: ['Ofis', 'Ümraniye', 'Bulgurlu', 'Kısıklı', 'Üsküdar Meydanı'],
departureTime: '18:15',
arrivalTime: '19:20',
capacity: 25,
available: 12,
type: 'evening',
},
]
export const mockSurveys: Survey[] = [
{
id: 'survey1',
@ -979,4 +825,158 @@ export const mockCertificates: Certificate[] = [
certificateUrl: '/certificates/cert3.pdf',
score: 92,
},
]
export const mockMealMenus: MealMenu[] = [
{
id: 'menu1',
date: new Date('2025-10-20'),
dayOfWeek: 'Pazartesi',
meals: [
{
type: 'lunch',
items: ['Mercimek Çorbası', 'Tavuk Şinitzel', 'Bulgur Pilavı', 'Salata', 'Meyve'],
calories: 650,
},
],
},
{
id: 'menu2',
date: new Date('2025-10-21'),
dayOfWeek: 'Salı',
meals: [
{
type: 'lunch',
items: ['Yayla Çorbası', 'Köfte', 'Patates Püresi', 'Cacık', 'Ayran'],
calories: 720,
},
],
},
{
id: 'menu3',
date: new Date('2025-10-22'),
dayOfWeek: 'Çarşamba',
meals: [
{
type: 'lunch',
items: ['Domates Çorbası', 'Etli Kuru Fasulye', 'Pilav', 'Turşu', 'Komposto'],
calories: 680,
},
],
},
{
id: 'menu4',
date: new Date('2025-10-23'),
dayOfWeek: 'Perşembe',
meals: [
{
type: 'lunch',
items: ['Tarhana Çorbası', 'Fırın Tavuk', 'Makarna', 'Yeşil Salata', 'Sütlaç'],
calories: 700,
},
],
},
{
id: 'menu5',
date: new Date('2025-10-24'),
dayOfWeek: 'Cuma',
meals: [
{
type: 'lunch',
items: ['Ezogelin Çorbası', 'Balık', 'Bulgur Pilavı', 'Salata', 'Meyve'],
calories: 620,
},
],
},
]
export const mockReservations: Reservation[] = [
{
id: 'res1',
type: 'room',
resourceName: 'Toplantı Salonu A',
bookedBy: mockEmployees[2],
startDate: new Date('2024-10-20T09:00:00'),
endDate: new Date('2024-10-20T11:00:00'),
purpose: 'Sprint Planning Toplantısı',
status: 'approved',
participants: 8,
notes: 'Projeksiyon cihazı gerekli',
},
{
id: 'res2',
type: 'vehicle',
resourceName: 'Şirket Aracı - 34 ABC 123',
bookedBy: mockEmployees[3],
startDate: new Date('2024-10-22T08:00:00'),
endDate: new Date('2024-10-22T18:00:00'),
purpose: 'Müşteri Ziyareti',
status: 'pending',
notes: 'Ankara çıkışı',
},
{
id: 'res3',
type: 'equipment',
resourceName: 'Kamera ve Tripod Seti',
bookedBy: mockEmployees[5],
startDate: new Date('2024-10-19T14:00:00'),
endDate: new Date('2024-10-19T17:00:00'),
purpose: 'Ürün Tanıtım Videosu Çekimi',
status: 'approved',
},
{
id: 'res4',
type: 'room',
resourceName: 'Eğitim Salonu B',
bookedBy: mockEmployees[6],
startDate: new Date('2024-10-25T09:00:00'),
endDate: new Date('2024-10-25T17:00:00'),
purpose: 'Etkili İletişim Eğitimi',
status: 'approved',
participants: 15,
notes: 'Tüm gün rezervasyon, öğle yemeği dahil',
},
]
export const mockShuttleRoutes: ShuttleRoute[] = [
{
id: 'shuttle1',
name: 'Kadıköy - Ofis',
route: ['Kadıköy İskele', 'Bostancı', 'Acıbadem', 'Kozyatağı', 'Ofis'],
departureTime: '07:30',
arrivalTime: '08:45',
capacity: 25,
available: 3,
type: 'morning',
},
{
id: 'shuttle2',
name: 'Üsküdar - Ofis',
route: ['Üsküdar Meydanı', 'Kısıklı', 'Bulgurlu', 'Ümraniye', 'Ofis'],
departureTime: '07:45',
arrivalTime: '08:50',
capacity: 25,
available: 8,
type: 'morning',
},
{
id: 'shuttle3',
name: 'Ofis - Kadıköy',
route: ['Ofis', 'Kozyatağı', 'Acıbadem', 'Bostancı', 'Kadıköy İskele'],
departureTime: '18:00',
arrivalTime: '19:15',
capacity: 25,
available: 5,
type: 'evening',
},
{
id: 'shuttle4',
name: 'Ofis - Üsküdar',
route: ['Ofis', 'Ümraniye', 'Bulgurlu', 'Kısıklı', 'Üsküdar Meydanı'],
departureTime: '18:15',
arrivalTime: '19:20',
capacity: 25,
available: 12,
type: 'evening',
},
]