Models and db framework for items