| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 | <?php$status = array(    1 => '开启',    2 => '关闭',);return array(    # 表名    'name' => 'active',    # 显示给用户看的名称    'lang' => '活动设置',    'menu' => false,    'end' => array    (        'insert' => 'journal/lib/manage.setActiveCache',        'update' => 'journal/lib/manage.setActiveCache',    ),    # 数据结构    'struct' => array    (            'id'        => array        (            'type'      => 'int-11',            'name'      => 'ID',            'default'   => '',            'desc'      => '',            'match'     => 'is_numeric',            'search'    => 'order',            'update'    => 'hidden',            'value'     => Dever::input('where_id')            //'list'        => true,        ),        'info_id'      => array        (            'type'      => 'int-11',            'name'      => '小刊',            'default'   => '',            'desc'      => '小刊',            'match'     => 'is_numeric',            'update'    => 'hidden',            'value'     => Dever::input('search_option_info_id')        ),        'status'     => array        (            'type'      => 'int-11',            'name'      => '活动状态',            'default'   => '1',            'desc'      => '活动状态',            'match'     => 'is_numeric',            'update'    => 'radio',            'option'    => $status,        ),        'name'      => array        (            'type'      => 'varchar-80',            'name'      => '活动标题',            'default'   => '',            'desc'      => '活动标题',            'match'     => 'is_string',            'update'    => 'text',            'search'    => 'fulltext',            'list'      => true,        ),        'start'       => array        (            'type'      => 'int-11',            'default'   => '',            'name'      => '活动开始时间',            'match'     => 'is_string',            'desc'      => '活动开始时间',            'update'    => 'date',            'list'      => 'date("Y-m-d H:i:s", {start})',            'callback'  => 'maketime',        ),        'end'       => array        (            'type'      => 'int-11',            'default'   => '',            'name'      => '活动结束时间',            'match'     => 'is_string',            'desc'      => '活动结束时间',            'update'    => 'date',            'list'      => 'date("Y-m-d H:i:s", {end})',            'callback'  => 'maketime',        ),        'desc'      => array        (            'type'      => 'text-255',            'name'      => '活动描述',            'default'   => '',            'desc'      => '活动描述',            'match'     => 'option',            'update'    => 'editor',            'key'       => 1,            //'search'  => 'fulltext',            //'list'        => true,        ),        'invite_num'     => array        (            'type'      => 'int-11',            'name'      => '邀请多少个好友开启免费阅读',            'default'   => '10',            'desc'      => '邀请多少个好友开启免费阅读',            'match'     => 'is_numeric',            'update'    => 'text',        ),        'invite_score'     => array        (            'type'      => 'int-11',            'name'      => '每邀请一个好友获得积分-仅支持邀请新用户,设置之后,积分规则里的设置将失效',            'default'   => '2',            'desc'      => '每邀请一个好友获得积分',            'match'     => 'is_numeric',            'update'    => 'text',        ),        'invite_title'     => array        (            'type'      => 'varchar-80',            'name'      => '邀请好友标题',            'default'   => '邀请好友获得积分',            'desc'      => '邀请好友标题',            'match'     => 'is_string',            'update'    => 'text',        ),        'invite_desc'      => array        (            'type'      => 'varchar-800',            'name'      => '邀请好友标题介绍',            'default'   => '邀请10人开启免费阅读',            'desc'      => '邀请好友标题介绍',            'match'     => 'is_string',            'update'    => 'textarea',        ),        'content'       => array        (            'type'      => 'text-255',            'name'      => '活动规则说明',            'default'   => '',            'desc'      => '活动规则说明',            'match'     => 'is_string',            'update'    => 'editor',            'key'       => 1,        ),                '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})',        ),    ),    # 更新表结构    'alter' => array    (        2 => array        (            array('update', 'desc', 'desc', 'text-255  描述'),            //array('add', 'config', 'config', 'int-11 1 配置'),        ),        'version' => 2,    ),    'manage' => array    (    ),    'request' => array    (        # 获取提交订单超过12个小时        'getDataByTime' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'end' => array('yes', '<='),                'ends' => array('yes-end', '>'),                'state' => 1,                'status' => 1,            ),            'type' => 'all',            'order' => array('id' => 'desc'),            'col' => '*',        ),    ),);
 |