<?php
$info_id = Dever::input('set')['info_id'] ?? 0;
if (!$info_id) {
    $info_id = Dever::input('field')['info_id'] ?? 0;
}
$config = array
(
    'list' => array
    (
        'where' => array('info_id' => $info_id),
        'field'      => array
        (
            'name',
            'sort' => array
            (
                'type' => 'input',
                'tips' => '双击修改，正序排序',
            ),
            'status' => array
            (
                'type' => 'switch',
                'show'  => '{status}',
                'active_value' => 1,
                'inactive_value' => 2,
            ),
            'cdate',
        ),
        'button' => array
        (
            '新增' => array('fastadd', array('info_id' => $info_id)),
        ),
        'data_button' => array
        (
            '编辑' => array('fastedit', array('info_id' => $info_id)),
        ),
        'search'    => array
        (
            'name' => 'like',
            'status',
        ),
    ),
    'update' => array
    (
        'field'    => array
        (
            'info_id',
            'name' => array
            (
                'rules' => true,
            ),
        ),
    ),
);

return $config;