generated query model and queries controller