now there are data tables as follows
first-level classification
cate_id
cate_name
pid |
Commodity list
goods_id
goods_name
cate_id
property sheet
attr_id
attr_name
intermediate table between goods and attributes
id
goods_id
attr_id
Classification and attribute middle table
id
cate_id
attr_id
how to design a class, the subclass can obtain the attributes of the parent class through inheritance, for example, the commodity can inherit the attributes associated with the classification and have its own attributes