'单一用户', 2 => '所有用户', ); $type = array ( 1 => '不发送', 2 => '发送', ); $push = function() { return Dever::db('message/push')->state(); }; return array ( # 表名 'name' => 'type', # 显示给用户看的名称 'lang' => '消息类型', 'order' => 20, 'config_scope' => $scope, 'menu' => false, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'fulltext', 'order' => 'desc', 'list' => true, ), 'name' => array ( 'type' => 'varchar-30', 'name' => '类型名称', 'default' => '', 'desc' => '请填写类型名称', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'scope' => array ( 'type' => 'tinyint-1', 'name' => '消息范围', 'default' => '1', 'desc' => '消息范围', 'match' => 'is_numeric', 'option' => $scope, 'update' => 'radio', 'search' => 'select', 'list' => true, ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '同步推送', 'default' => '1', 'desc' => '同步推送', 'match' => 'is_numeric', 'option' => $type, 'update' => 'radio', //'search' => 'select', 'list' => true, 'control' => 'type', ), 'push' => array ( 'type' => 'int-11', 'name' => '推送方式', 'default' => '1', 'desc' => '推送方式', 'match' => 'is_numeric', 'option' => $push, 'update' => 'select', 'show' => 'type=2', ), '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, //'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( ), 'default' => array ( 'col' => 'id,name,type,scope,state,cdate', 'value' => array ( '1, "系统消息",1, 1, 1,' . DEVER_TIME, ), ), # request 请求接口定义 'request' => array ( ), );