<?php

namespace Application\Common;

use Application\Service\DB\Dictionary\FormField;

class Enum
{
    /**
     * 这里应该删了
     * 都转移到 @var FormField 类中了
     */
    public const FORM_FIELD_TYPE_TEXT = '1';
    public const FORM_FIELD_TYPE_DATE_UK = '2';
    public const FORM_FIELD_TYPE_DATE = '3';
    public const FORM_FIELD_TYPE_DATETIME = '5';
    public const FORM_FIELD_TYPE_INTEGER = '6';
    public const FORM_FIELD_TYPE_FLOAT_1 = '7';
    public const FORM_FIELD_TYPE_FLOAT_2 = '8';
    public const FORM_FIELD_TYPE_FLOAT_3 = '9';
    public const FORM_FIELD_TYPE_RADIO = '10';
    public const FORM_FIELD_TYPE_CHECKBOX = '11';
    public const FORM_FIELD_TYPE_DROPDOWN = '12';
    public const FORM_FIELD_TYPE_UPLOAD_FILE = '13';
    public const FORM_FIELD_TYPE_UPLOAD_IMAGE = '14';
    public const FORM_FIELD_TYPE_EDITOR = '15';

    public const FORM_FIELD_TYPE = [
        ['value' => FormField::FORM_FIELD_TYPE_TEXT, 'label' => '文本'],
        ['value' => FormField::FORM_FIELD_TYPE_TEXTAREA, 'label' => '文本域'],
        ['value' => FormField::FORM_FIELD_TYPE_DATE_UK, 'label' => '日期(UK)'],
        ['value' => FormField::FORM_FIELD_TYPE_DATE, 'label' => '日期(年月日)'],
        ['value' => FormField::FORM_FIELD_TYPE_DATE_SECOND, 'label' => '日期(年月日时分)'],
        ['value' => FormField::FORM_FIELD_TYPE_DATETIME, 'label' => '日期(年月日时分秒)'],
        ['value' => FormField::FORM_FIELD_TYPE_DATETIME_UK, 'label' => '日期(年月日时分UK)'], // DateTimeUK
        ['value' => FormField::FORM_FIELD_TYPE_DATETIME_SECOND_UK, 'label' => '日期(年月日时分秒UK)'], // DateTimeSecondUK
        ['value' => FormField::FORM_FIELD_TYPE_TIME_UK, 'label' => '日期(时分UK)'], // TimeUK
        ['value' => FormField::FORM_FIELD_TYPE_TIME_SECOND_UK, 'label' => '日期(时分秒Uk)'], // TimeSecondUK
        ['value' => FormField::FORM_FIELD_TYPE_INTEGER, 'label' => '整数'],
        ['value' => FormField::FORM_FIELD_TYPE_FLOAT_1, 'label' => '小数(保留一位)'],
        ['value' => FormField::FORM_FIELD_TYPE_FLOAT_2, 'label' => '小数(保留二位)'],
        ['value' => FormField::FORM_FIELD_TYPE_FLOAT_3, 'label' => '小数(保留三位)'],
        ['value' => FormField::FORM_FIELD_TYPE_RADIO, 'label' => '单选'],
        ['value' => FormField::FORM_FIELD_TYPE_CHECKBOX, 'label' => '多选'],
        ['value' => FormField::FORM_FIELD_TYPE_DROPDOWN, 'label' => '下拉'],
        ['value' => FormField::FORM_FIELD_TYPE_UPLOAD_FILE, 'label' => '上传文件'],
        ['value' => FormField::FORM_FIELD_TYPE_UPLOAD_IMAGE, 'label' => '上传图片'],
        ['value' => FormField::FORM_FIELD_TYPE_EDITOR, 'label' => '编辑器'],
        ['value' => FormField::FORM_FIELD_TYPE_LABEL, 'label' => '文本(不可编辑)'],
        ['value' => FormField::FORM_FIELD_TYPE_SPAN, 'label' => '纯文本'],
        ['value' => FormField::FORM_FIELD_TYPE_UPLOAD_SHARE_IMAGE, 'label' => '上传共享图片'],
        ['value' => FormField::FORM_FIELD_TYPE_ITEM_FORM_SOURCE, 'label' => '项目表单数据'],
        ['value' => FormField::FORM_FIELD_TYPE_REGION_OPTION, 'label' => '级联选择'],
    ];

    // 中心角色信息
    public const SIGNATORY_ROLE_DATA = [
        ['value' => '1', 'label' => '研究医生','code'=>'yjys'],
        ['value' => '2', 'label' => '研究助理','code'=>'yjzl'],
        ['value' => '3', 'label' => 'PM','code'=>'pm'],
        ['value' => '4', 'label' => 'CRA','code'=>'cra'],
        ['value' => '5', 'label' => 'CRC','code'=>'crc'],
        ['value' => '6', 'label' => 'DM','code'=>'dm']
    ];

    public const LOG_EVENT_SDV      = 'SDV';
    public const LOG_EVENT_UNSDV    = 'Un-SDV';
    public const LOG_EVENT_REVIEW   = 'Review';
    public const LOG_EVENT_UNREVIEW = 'Un-Review';
    public const LOG_EVENT_LOCK     = 'Lock';
    public const LOG_EVENT_UNLOCK   = 'Un-Lock';
    public const LOG_EVENT_SIGN     = 'Sign';
    public const LOG_EVENT_UNSIGN   = 'Un-Sign';
    public const LOG_EVENT = [
        self::LOG_EVENT_SDV      => 'SDV',
        self::LOG_EVENT_UNSDV    => '取消SDV',
        self::LOG_EVENT_REVIEW   => 'Review',
        self::LOG_EVENT_UNREVIEW => '取消Review',
        self::LOG_EVENT_LOCK     => 'Lock',
        self::LOG_EVENT_UNLOCK   => '解锁',
        self::LOG_EVENT_SIGN     => '签名',
        self::LOG_EVENT_UNSIGN   => '取消签名',
        'More-SDV'=>'批量SDV',
        'More-Lock'=>'批量锁定',
        'More-Review'=>'批量Review',
        'MoreUn-SDV'=>'批量取消SDV',
        'MoreUn-Review'=>'批量取消Review',
        'MoreUn-Lock'=>'批量解锁',
        'MoreUn-Sign'=>'批量取消签名'
    ];
}
