'开启', 2 => '关闭', ); return array ( # 表名 'name' => 'ranking_periods', # 显示给用户看的名称 'lang' => '榜单期数', 'menu' => false, 'check' => 'info_id,ranking_id,periods', # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'update' => 'hidden', //'list' => true, ), 'info_id' => array ( 'type' => 'int-11', 'name' => '合集', 'default' => '', 'desc' => '合集', 'match' => 'is_numeric', 'update' => 'hidden', 'value' => Dever::input('search_option_info_id') ), 'ranking_id' => array ( 'type' => 'int-11', 'name' => '榜单id', 'default' => '', 'desc' => '榜单id', 'match' => 'is_numeric', 'update' => 'hidden', 'value' => Dever::input('search_option_ranking_id') ), 'name' => array ( 'type' => 'varchar-80', 'name' => '本期标题', 'default' => '', 'desc' => '本期标题', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'periods' => array ( 'type' => 'int-11', 'name' => '期数', 'default' => '', 'desc' => '期数', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'status' => array ( 'type' => 'int-11', 'name' => '本期状态-手动设置状态,也可以设置下方的时间来自动控制', 'default' => '1', 'desc' => '本期状态', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $status, 'list' => true, 'edit' => true, ), 'start' => array ( 'type' => 'int-11', 'default' => '', 'name' => '本期开始时间-可以为空,则按照总榜设置的榜单周期自动开始', 'match' => 'option', 'desc' => '本期开始时间', 'update' => 'date', 'list' => 'date("Y-m-d H:i:s", {start})', 'callback' => 'maketime', ), 'end' => array ( 'type' => 'int-11', 'default' => '', 'name' => '本期结束时间-可以为空,则按照总榜设置的榜单周期自动结束', 'match' => 'option', 'desc' => '本期结束时间', 'update' => 'date', 'list' => '{end} ? date("Y-m-d H:i:s", {end}) : "无"', 'callback' => 'maketime', ), '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, 'delete' => false, ), 'request' => array ( 'getAll' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'info_id' => 'yes', 'ranking_id' => 'yes', //'status' => 1, 'state' => 1, ), 'type' => 'all', 'order' => array('status' => 'asc', 'periods' => 'desc', 'cdate' => 'desc'), 'limit' => '0,20', 'col' => '*', ), # 获取当前最新的期数 'getNew' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'info_id' => 'yes', 'ranking_id' => 'yes', 'status' => 1, 'state' => 1, ), 'type' => 'one', 'order' => array('periods' => 'desc', 'cdate' => 'desc'), 'col' => '*', ), ), );