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
@@ -26,12 +26,21 @@ namespace skydiveLogs_api.DomainBusiness
#region Public Methods
/// <summary>
/// Adds a new drop zone to the system.
/// </summary>
/// <param name="newdropZone">The DropZone entity containing the new drop zone data.</param>
public void AddNewDz(DropZone newdropZone)
{
_dropZoneRepository.Add(newdropZone);
_cacheService.Delete(CacheType.DropZone);
}
/// <summary>
/// Adds a drop zone to the user's favorites.
/// </summary>
/// <param name="dzId">The drop zone ID to add to favorites.</param>
/// <returns>True if the drop zone was added to favorites, false otherwise.</returns>
public bool AddToFavorite(int dzId)
{
var dzToAddToFavorite = GetDzById(dzId);
@@ -47,11 +56,19 @@ namespace skydiveLogs_api.DomainBusiness
return result > 0;
}
/// <summary>
/// Deletes a drop zone by its ID.
/// </summary>
/// <param name="id">The drop zone ID to delete.</param>
public void DeleteDzById(int id)
{
throw new NotImplementedException();
}
/// <summary>
/// Retrieves a list of all drop zones with favorites status.
/// </summary>
/// <returns>A collection of DropZone entities containing all drop zones with their favorite status.</returns>
public IEnumerable<DropZone> GetAllDzs()
{
var results = Enumerable.Empty<DropZone>();
@@ -78,12 +95,22 @@ namespace skydiveLogs_api.DomainBusiness
return results.ToList();
}
/// <summary>
/// Retrieves a drop zone by its ID.
/// </summary>
/// <param name="id">The drop zone ID to retrieve.</param>
/// <returns>A DropZone entity containing the drop zone details.</returns>
public DropZone GetDzById(int id)
{
var allDzs = GetAllRefDzs();
return allDzs.Single(g => g.Id == id);
}
/// <summary>
/// Removes a drop zone from the user's favorites.
/// </summary>
/// <param name="dzId">The drop zone ID to remove from favorites.</param>
/// <returns>True if the drop zone was removed from favorites, false otherwise.</returns>
public bool RemoveToFavorite(int dzId)
{
var result = _favoriteDropZoneRepository.Delete(dzId, _identityService.ConnectedUser.Id);
@@ -92,6 +119,13 @@ namespace skydiveLogs_api.DomainBusiness
return result > 0;
}
/// <summary>
/// Updates an existing drop zone.
/// </summary>
/// <param name="id">The drop zone ID to update.</param>
/// <param name="dropZone">DropZone entity containing the updated drop zone data.</param>
/// <param name="resetCache">Whether to reset the cache after update.</param>
/// <returns>True if the update was successful, false otherwise.</returns>
public bool UpdateDz(int id, DropZone dropZone, bool resetCache = true)
{
dropZone.Id = id;
@@ -124,4 +158,4 @@ namespace skydiveLogs_api.DomainBusiness
#endregion Private Fields
}
}
}