refactor: use interface for models and jpa entities