Extending pivot table

Hello Yii community types,

I’m needing to add more parameters to a many-to-many relationship and it seems to me that the best place to do this would be in the pivot table (to avoid duplication of data, plus the semantic angle). Unfortunately, I’m not at all sure how to achieve this in Yii despite spending a good chunk of last night searching.

In the past, I’ve used the CAdvancedArBehavior extension but that’s by no means a prerequisite. I’ve attached a very simplified diagram of what I hope to achieve as it will hopefully make things far more clear than I could in words.

Thanks for reading!