create model and migrations for main tables