fix(curd): 修正关联表 onlyFields 键名拼写错误

- CurdBase 注释解析只识别 onlyFields(正确拼写),不再支持历史错误拼写 onlyFileds
- BuildCurdServiceBase 内部局部变量 onlyShowFileds 改为 onlyShowFields(按位置传参,外部 API 不变)
- 同步文档(ulthon-database-design 已删除,ulthon-scheme-definition 技能已使用正确拼写)
This commit is contained in:
augushong
2026-07-19 09:07:49 +08:00
parent e392db007a
commit e40d497515
2 changed files with 5 additions and 5 deletions

View File

@@ -385,12 +385,12 @@ class BuildCurdServiceBase
* @param $foreignKey
* @param null $primaryKey
* @param null $modelFilename
* @param array $onlyShowFileds
* @param array $onlyShowFields
* @param null $bindSelectField
* @return $this
* @throws TableException
*/
public function setRelation($relationTable, $foreignKey, $primaryKey = null, $modelFilename = null, $onlyShowFileds = [], $bindSelectField = null)
public function setRelation($relationTable, $foreignKey, $primaryKey = null, $modelFilename = null, $onlyShowFields = [], $bindSelectField = null)
{
// 自动检测并处理关联表前缀(与 setTable 保持一致)
$relationTable = $this->stripTablePrefix($relationTable);
@@ -455,7 +455,7 @@ class BuildCurdServiceBase
throw new TableException("关联表{$relationTable}未找到主键字段");
}
$formatColums = $schemeService->getColumnsForCurd($schemeClass, $onlyShowFileds);
$formatColums = $schemeService->getColumnsForCurd($schemeClass, $onlyShowFields);
$delete = isset($allColumns['delete_time']);
foreach ($formatColums as $field => $colum) {