This question has come up before and was, from memory, answered by Yoav (one of the Wix Code developers). Search for “auto-increment” or combinations thereof. But in short: it´s not available. You can try to develop it yourself, and in a low volume environment it might work, but basically, there is no way to guarantee that two concurrent request do not get the same number (which is not good), no matter where you put it, while generating the data at the front end or with a db-hook.
If you envision a high-volume environment, better look for a development environment that supports auto-increment natively or at least a WAIT_LOCK on a row. Wix Code is good, but it´s a hammer, while not every problem is a nail.