[WIP][3.9] Add UserQuery entity

- [x] Add UserQuery entity
- [ ] Make migration script
- [x]  Update database structure