added the database and type model and js