'显示', 2 => '不显示', ); $message_type = Dever::db('message/type'); $type = function() use($message_type) { return $message_type->state(); }; $scope = $message_type->config['config_scope']; $project = function() { return Dever::load('message/project-state'); }; return array ( # 表名 'name' => 'outbox', # 显示给用户看的名称 'lang' => '发件箱', 'order' => 19, //'menu' => false, 'end' => array ( 'update' => 'message/lib/manage.send', 'insert' => 'message/lib/manage.send', ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'fulltext', 'order' => 'desc', 'list' => true, ), 'uid' => array ( 'type' => 'int-11', 'name' => '发件人', 'default' => '-1', 'desc' => '请填写发件人', 'match' => 'is_numeric', //'update' => 'text', 'list' => '{uid} > 0 ? {uid} : "系统"', ), 'name' => array ( 'type' => 'varchar-30', 'name' => '发件标题', 'default' => '', 'desc' => '请填写发件标题', 'match' => 'is_string', 'search' => 'fulltext', 'update' => 'text', 'list' => true, ), 'content' => array ( 'type' => 'text-255', 'name' => '发件内容', 'default' => '', 'desc' => '请填写发件内容', 'match' => 'is_string', 'search' => 'fulltext', 'update' => 'textarea', 'list' => true, ), 'link' => array ( 'type' => 'varchar-30', 'name' => '链接-选填,如有链接,则点击消息跳转至该链接', 'default' => '', 'desc' => '链接', 'match' => 'option', 'search' => 'fulltext', 'update' => 'text', ), 'project_id' => array ( 'type' => 'int-11', 'name' => '所属项目', 'default' => '1', 'desc' => '所属项目', 'match' => 'is_numeric', 'option' => $project, 'update' => 'select', //'search' => 'select', 'list' => true, ), 'type' => array ( 'type' => 'int-11', 'name' => '消息类型', 'default' => '1', 'desc' => '消息类型', 'match' => 'is_numeric', 'option' => $type, 'update' => 'select', //'search' => 'select', 'list' => true, ), 'scope' => array ( 'type' => 'tinyint-1', 'name' => '消息范围', 'default' => '2', 'desc' => '消息范围', 'match' => 'is_numeric', 'option' => $scope, 'update' => 'radio', 'search' => 'select', 'list' => true, 'control' => 'scope', ), 'param' => array ( 'type' => 'varchar-800', 'name' => '传入参数-一般为json格式数据', 'default' => '', 'desc' => '传入参数', 'match' => 'is_string', ), 'to_uid' => array ( 'type' => 'text-255', 'name' => '收件人-直接填写uid,多个用换行隔开,后期升级', 'default' => '', 'desc' => '请填写收件人', 'match' => 'is_numeric', 'update' => 'textarea', 'show' => 'scope=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, //'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( ), # request 请求接口定义 'request' => array ( ), );