Little test with AI + Add the equipment (#8)

Tests using local LLM AI to add comments in the C# files
For the flights tunnel, show the total to day/hours
For the jump, add the equipment (now just with the wingsuit)

Reviewed-on: #8
Co-authored-by: sandre <perso@sebastienandre.com>
Co-committed-by: sandre <perso@sebastienandre.com>
This commit was merged in pull request #8.
This commit is contained in:
2026-05-16 09:24:13 +00:00
committed by sandre
parent 0ebdbca549
commit ceed44f997
70 changed files with 12142 additions and 10444 deletions
@@ -24,6 +24,10 @@ namespace skydiveLogs_api.DomainBusiness
#region Public Methods
/// <summary>
/// Adds a new gear item to the system.
/// </summary>
/// <param name="newGear">The Gear entity containing the new gear data.</param>
public void AddNewGear(Gear newGear)
{
newGear.User = _identityService.ConnectedUser;
@@ -33,6 +37,10 @@ namespace skydiveLogs_api.DomainBusiness
_cacheService.Delete(CacheType.Gear, userId: userId);
}
/// <summary>
/// Adds rental gear to the system for a new user.
/// </summary>
/// <param name="newUser">The new user for whom rental gear should be added.</param>
public void AddRentalGear(User newUser)
{
var rentalGear = new Gear
@@ -50,11 +58,19 @@ namespace skydiveLogs_api.DomainBusiness
_gearRepository.Add(rentalGear);
}
/// <summary>
/// Deletes a gear item by its ID.
/// </summary>
/// <param name="id">The gear ID to delete.</param>
public void DeleteGearById(int id)
{
throw new NotImplementedException();
}
/// <summary>
/// Retrieves all gear items.
/// </summary>
/// <returns>A collection of Gear entities containing all gear data.</returns>
public IEnumerable<Gear> GetAllGears()
{
var userId = _identityService.ConnectedUser.Id;
@@ -67,17 +83,33 @@ namespace skydiveLogs_api.DomainBusiness
return _cacheService.Get<IEnumerable<Gear>>(CacheType.Gear, userId: userId);
}
/// <summary>
/// Retrieves a gear item by its ID.
/// </summary>
/// <param name="id">The gear ID to retrieve.</param>
/// <returns>A Gear entity containing the gear details.</returns>
public Gear GetGearById(int id)
{
var allGears = GetAllGears();
return allGears.Single(g => g.Id == id);
}
/// <summary>
/// Updates an existing gear item.
/// </summary>
/// <param name="id">The gear ID to update.</param>
/// <param name="gear">Gear entity containing the updated gear data.</param>
/// <returns>True if the update was successful, false otherwise.</returns>
public bool UpdateGear(int id, Gear gear)
{
gear.Id = id;
gear.User = _identityService.ConnectedUser;
return _gearRepository.Update(gear);
var tmp = _gearRepository.Update(gear);
var userId = _identityService.ConnectedUser.Id;
_cacheService.Delete(CacheType.Gear, userId: userId);
return tmp;
}
#endregion Public Methods
@@ -90,4 +122,4 @@ namespace skydiveLogs_api.DomainBusiness
#endregion Private Fields
}
}
}