TL;DR
Can I use one data model for @Controller and several @Services?
Imagine I have spring @Controller, which expects request model via @RequestBody - eg PersonModel model. I want to register the person.
I am calling service from endpoint by service.register(personModel).
PersonService in the register method do some stuff, eg:
emailService.sendEmail(personModel)
statisticService.register(personModel), etc
Question:
As you see, the model is used in many services in many different layers. It's very convenient but is it ok? Or maybe I should "clone" model and create each model per layer, eg PersonModelEmail , PersonModelStatistic?
Some references to books or articles would be more than welcome.