hasOne(\app\common\model\custom\Custom::class, 'id', 'custom_id')->bind(['custom_name'=>'name']); } public function custom() { return $this->belongsTo(\app\common\model\custom\Custom::class, 'custom_id'); } }