refer to the figure above, existing
//
permission:{
id:DataTypes.INTEGER,
type:DataTypes.STRING
}
///
Operate:{
id:DataTypes.INTEGER,
name:DataTypes.STRING
url:DataTypes.STRING
}
how to write associate? for permission Can you dynamically associate different tables according to type?
and permission:Operate is one-to-one, but sometimes polymorphic. I think it would be better to build a correlation table. How do I build the table at 1:1?