I am a order management system that has models that have many fields that are common amongst the classes.
ProductType1(p1: String, p2: String, p3: String, ....)
ProductType2(p1: String, p2: String, p3: String, ....)
ProductType3(p1: String, p2: String, p3: String, ....)
where p1
, p2
, p3
are common and then there are properties that are unique to each case class.
Is the best practise to use inheritance or just duplicate the properties?