For one, it seems using UUIDs as primary keys (and identifiers, that is) is kinda a business rule, so it should go in the service layer.
On the other hand, because this is highly tied to the database, it seems it should go to the repository layer, even if no logic besides "how to store this" should be there.
... and, on top of everything, even if I'm talking about hexagonal architecture and layers, which are used in OO design, I don't plan on use an OO language.