Can we have permissions in custom database for auth0

We have permissions in our application database. We want to make use of these permissions in the database and use them as scopes to jwt token when the user login to application via auth0

Do we have any sample code or document on how to do this ?
Please reply here as it is bit urgent for our project