Move database entity classes to the library