'新增', 2 => '更新', 3 => '删除', 4 => '恢复', ); return array ( # 表名 'name' => 'log', # 显示给用户看的名称 'lang' => '操作日志', # 关闭验证重复提交功能 'submit' => false, 'config_type' => $type, # 建表时进行分区,一般按照时间分区,仅在mysql类型有效 'partition' => array ( 'type' => 'range',//range分区,具体的值请查看mysql分区类型 'col' => 'YEAR(cdate)',//分区的字段值 'value' => array(2000,2010),//分区的值 'exp' => 'LESS THEN',//LESS THEN还是in等表达式 ), 'order' => 66, # 表类型 值为\innodb\myisam\,默认为innodb,仅在mysql类型有效 //'type' => 'innodb', # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'list' => true, ), 'project' => array ( 'type' => 'varchar-80', 'name' => '项目名', 'default' => '', 'desc' => '请输入项目名', 'match' => 'is_string', //'list' => 'Dever::load("manage/project.name", "{project}")', ), 'table' => array ( 'type' => 'varchar-80', 'name' => '项目下的表名', 'default' => '', 'desc' => '项目下的表名', 'match' => 'is_string', //'list' => 'Dever::load("manage/database.getTableName", "{project}", "{table}")', ), 'menu_id' => array ( 'type' => 'varchar-80', 'name' => '菜单', 'default' => '', 'desc' => '菜单', 'match' => 'is_string', 'search' => 'linkage', 'update' => 'linkage', 'option' => Dever::url('menu.getManageMenu', 'manage'), //'list' => 'Dever::load("manage/menu-one#name", "{menu_id}")', 'list' => 'Dever::load("manage/src/lib/log.getMenuInfo", "{menu_id}")', ), 'name' => array ( 'type' => 'varchar-80', 'name' => '操作名', 'default' => '', 'desc' => '操作名', 'match' => 'is_string', 'search' => 'fulltext', 'list' => true, ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '操作类型', 'default' => '1', 'desc' => '操作类型', 'match' => 'is_numeric', 'option' => $type, 'search' => 'select', 'update' => 'radio', 'list' => true, ), 'admin' => array ( 'type' => 'int-11', 'name' => '操作人', 'default' => '', 'desc' => '操作人', 'match' => 'is_string', 'search' => array ( 'api' => 'manage/admin-getSearch', 'col' => 'col', 'result' => 'id', 'search' => 'admin', ), 'list' => 'Dever::load("manage/admin-one#username", {admin})', //'option' => $admin, ), 'info' => array ( 'type' => 'longtext', 'name' => '操作记录', 'default' => '', 'desc' => '操作记录', 'match' => 'is_string', 'search' => 'fulltext', 'list' => 'Dever::load("manage/src/lib/log.getInfo", "{id}")', //'modal' => '查看详情', ), 'tid' => array ( 'type' => 'int-11', 'name' => '来源表id', 'default' => '', 'desc' => '来源表id', 'match' => 'is_string', //'list' => true, ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'option', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '操作时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, 'search' => 'time', 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( 'list_table' => 'html', 'delete' => false, 'edit' => false, 'insert' => false, 'link' => 'parent=log', 'button' => array ( '字段记录' => array('list', 'opt'), '计划任务' => array('list', 'cron'), '接口列表' => array('list', 'api'), ), ), # 索引 'index' => array ( # 索引名 => 索引id //'id' => 'id,state', ), # request 请求接口定义 'request' => array ( # onload 增加hack功能 使用该请求接口必须首先载入的类 如果需要子项也添加类似功能,可以使用start、end 'onload' => 'manage/auth.init',//这个是权限验证,必须后台登录 ), );