Test code for Zai model.

This commit is contained in:
hujunqing
2025-12-02 16:32:12 +08:00
committed by sunhao
parent 1a283697a7
commit 71ed960e8a
+50
View File
@@ -1104,6 +1104,56 @@ class zaiModel extends model
public static function getFieldAliasMap(string $objectType): array
{
static $aliasMap = array(
'issue' => array(
'assetCreatedBy' => array('assetCreatedBy', 'createdBy', 'openedBy'),
'assetCreatedDate' => array('assetCreatedDate', 'createdDate', 'openedDate'),
'issueType' => array('issueType', 'type'),
'execution' => array('execution', 'executionName'),
'project' => array('project', 'projectName'),
'resolution' => array('resolution', 'resolutionType'),
'deadline' => array('deadline', 'deadLine'),
),
'risk' => array(
'assetCreatedBy' => array('assetCreatedBy', 'createdBy', 'openedBy'),
'assetCreatedDate' => array('assetCreatedDate', 'createdDate', 'openedDate'),
'project' => array('project', 'projectName'),
'execution' => array('execution', 'executionName'),
),
'opportunity' => array(
'assetCreatedBy' => array('assetCreatedBy', 'createdBy', 'openedBy'),
'assetCreatedDate' => array('assetCreatedDate', 'createdDate', 'openedDate'),
'project' => array('project', 'projectName'),
'opportunityType' => array('opportunityType', 'type'),
),
'plan' => array(
'begin' => array('begin', 'start', 'beginDate'),
'end' => array('end', 'finish', 'endDate'),
'owner' => array('owner', 'assignedTo'),
'stories' => array('stories', 'storyCount', 'story'),
'bugs' => array('bugs', 'bugCount', 'bug'),
'project' => array('project', 'projectName'),
'product' => array('product', 'productName'),
),
'release' => array(
'system' => array('system', 'systemName'),
'project' => array('project', 'projectName'),
'build' => array('build', 'buildName'),
'releasedDate' => array('releasedDate', 'releaseDate'),
),
'ticket' => array(
'openedBy' => array('openedBy', 'createdBy'),
'openedDate' => array('openedDate', 'createdDate'),
'subStatus' => array('subStatus'),
'closedReason' => array('closedReason'),
'project' => array('project', 'projectName'),
'product' => array('product', 'productName'),
),
'case' => array(
'execution' => array('execution', 'executionName'),
'module' => array('module', 'moduleName'),
'story' => array('story', 'storyID'),
'lastEditedBy' => array('lastEditedBy', 'editedBy'),
),
);
return $aliasMap[$objectType] ?? array();