//由ThinkphpHelper自动生成,请根据需要修改 namespace {$moduleName}\Model; use Think\Model\RelationModel; class {$modelName}Model extends RelationModel{ protected $_link = array( '{$className}' => array( 'mapping_type' => self::{$mappingType}, 'class_name' => '{$className}', 'mapping_name' => '{$mappingName}', 'foreign_key' => '{$foreignKey}', 'relation_foreign_key' => '{$relationForeignKey}', 'relation_table' => '{$relationTable}' //此处应显式定义中间表名称，且不能使用C函数读取表前缀 ), //@more ); }