<?php

$config = array
(
    # 表名
    'name' => 'email',
    # 显示给用户看的名称
    'lang' => '邮件列表',
    'order' => -10,

    # 数据结构 不同的字段放这里
    'struct' => array
    (
        'id'        => array
        (
            'type'      => 'int-11',
            'name'      => 'ID',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            //'list'        => true,
        ),

        'name'      => array
        (
            'type'      => 'varchar-100',
            'name'      => '用户名称',
            'default'   => '',
            'desc'      => '用户名称',
            'match'     => 'is_string',
            'update'    => 'text',
            'list'      => true,
        ),

        'email'     => array
        (
            'type'      => 'varchar-150',
            'name'      => '邮箱',
            'default'   => '',
            'desc'      => '请输入邮箱',
            'match'     => 'option||' . Dever::rule('email'),
            'update'    => 'text',
            'list'      => true,
        ),

        'state'     => array
        (
            'type'      => 'tinyint-1',
            'name'      => '数据状态',
            'default'   => '1',
            'desc'      => '请选择状态',
            'match'     => 'is_numeric',
        ),

        'cdate'     => array
        (
            'type'      => 'int-11',
            'name'      => '发布时间',
            'match'     => array('is_numeric', time()),
            'desc'      => '',
            # 只有insert时才生效
            'insert'    => true,
            //'search'  => 'date',
            //'list'        => 'date("Y-m-d H:i:s", {cdate})',
        ),
    ),

    'manage' => array
    (
        // 'insert' => false,
        // 'edit' => false,
        // 'delete' => false,
        // 'num' => false,
        // 'excel' => $excel,
        // 'button' => $button,
        
    ),

    # request 请求接口定义
    'request' => array
    (
        // 'getExcelAll' => array
        // (
        //     # 匹配的正则或函数 选填项
        //     'option' => array
        //     (
        //         'start' => array('yes-month', '>='),
        //         'end' => array('yes-month', '<='),
        //         'state' => 1,
        //     ),
        //     'type' => 'all',
        //     'col' => '*',
        // ),
    ),
);

return $config;