<?php

namespace Application\Service\Extension\FormPreview;


use Application\Common\DictionaryVarNameEnum;
use Application\Service\DB\Dictionary\FormField;

class CMForm extends BaseForm
{
    public function getPreviewConfig(int $formId, bool $debugMode = false, bool $usingCache = true)
    {
        die('123');
    }

    protected function beforeBuild(array $row): array
    {
        if($row['var_name'] == DictionaryVarNameEnum::COLLECT_MEDICAL_TAKE_CMINDC && $this->previewScenario == PreviewApp::SCENARIO_CM_LIST_VIEW){
            $row['type'] = FormField::FORM_FIELD_TYPE_DROPDOWN;
            $row['name'] = 'CM判断结果';
        }

        return $row;
    }
}