More AI changes

This commit is contained in:
moarten
2026-04-09 22:35:54 +02:00
parent 569cfbb85d
commit 87d15b99ed
24 changed files with 973 additions and 20 deletions

View File

@@ -4,17 +4,32 @@ namespace Lutra.Domain.Entities;
public class Verspakket : BaseEntity
{
private readonly List<Beoordeling> _beoordelingen = [];
[MaxLength(50)]
public required string Naam { get; set; }
[Range(1, 10)]
public int AantalPersonen { get; set; }
public int AantalPersonen { get; set; }
public required Guid SupermarktId { get; set; }
public required virtual Beoordeling[]? Beoordelingen { get; set; }
public required virtual Supermarkt Supermarkt { get; set; }
}
public IReadOnlyCollection<Beoordeling> Beoordelingen => _beoordelingen.AsReadOnly();
public void AddBeoordeling(Beoordeling beoordeling)
{
_beoordelingen.Add(beoordeling);
}
public bool RemoveBeoordeling(Guid id)
{
var beoordeling = _beoordelingen.Find(b => b.Id == id);
if (beoordeling is null)
return false;
_beoordelingen.Remove(beoordeling);
return true;
}
}