what is the best approach to structure data model when using autowire? here is basic use case: i have domain data model on the backend which has case class User with fields id, username, active, auth_token which represents. This class maps to sql database table. On the frontend i only need fields id, username of User entity. I see only two approaches:
- map User class to some FrontUser class with fields i need
- divide database table on two separate which will be mapped to two different objects User and FrontUser