To my knowledge, it is good practice to use interfaces with data class.
In practice what doesn't work well with data classes is inheritance, but composition is completely okay (so polymorphism works well).
CLOVIS
07/16/2021, 1:22 PM
One of the issues with using interfaces and data classes is that your data class constructor will have to override all attributes of the interface, but I think that's fine.