Annotations with constraints to entities
Petr mentioned:
The repository layer seems adequate, but I would recommend adding annotations for each attribute. While there may be some defaults from the Entity annotation, specifying attributes explicitly can help other developers quickly understand the contents of the database. Additionally, applying constraints on columns can help ensure a consistent database and improve data reliability. As we can see in the Flight Service, there are already many checks in place, but constraints in the database are a powerful tool for maintaining data integrity. Furthermore, these annotations can help with validation in upper layers, reducing the need for bazzilion conditional checks on attribute existence and values.