'order', # 显示给用户看的名称 'lang' => '商品订单', 'order' => 300, 'menu' => false, # 数据结构 不同的字段放这里 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', //'list' => true, ), 'parent_uid' => array ( 'type' => 'int-11', 'name' => '邀请人', 'default' => '0', 'desc' => '请选择用户', 'match' => 'is_numeric', 'update' => 'text', //'search' => 'select', 'search' => array ( 'api' => 'passport/user-all', 'col' => 'username', 'result' => 'id', ), 'list' => '{parent_uid} > 0 ? Dever::load("passport/user-one#username", {parent_uid}) : "无邀请人"', ), 'uid' => array ( 'type' => 'int-11', 'name' => '购买人', 'default' => '0', 'desc' => '请选择用户', 'match' => 'is_numeric', 'update' => 'text', //'search' => 'select', 'search' => array ( 'api' => 'passport/user-all', 'col' => 'username', 'result' => 'id', ), 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"', ), 'type' => array ( 'type' => 'varchar-32', 'name' => '所属数据源', 'default' => '', 'desc' => '所属数据源', 'match' => 'is_string', 'list' => true, ), 'type_id' => array ( 'type' => 'int-11', 'name' => '数据源id', 'default' => '', 'desc' => '数据源id', 'match' => 'is_numeric', 'list' => true, ), 'info_id' => array ( 'type' => 'int-11', 'name' => '商品ID', 'default' => '', 'desc' => '商品ID', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'sku_id' => array ( 'type' => 'int-11', 'name' => '商品SKUID', 'default' => '', 'desc' => '商品SKUID', 'match' => 'is_numeric', 'update' => 'text', 'list' => true, ), 'order_id' => array ( 'type' => 'varchar-100', 'name' => '订单id', 'default' => '', 'desc' => '订单id', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'name' => array ( 'type' => 'varchar-100', 'name' => '商品名称', 'default' => '', 'desc' => '商品名称', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'cash' => array ( 'type' => 'varchar-100', 'name' => '价格', 'default' => '', 'desc' => '价格', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'num' => array ( 'type' => 'int-11', 'name' => '数量', 'default' => '', 'desc' => '数量', 'match' => 'is_string', 'update' => 'text', 'list' => true, ), 'source' => array ( 'type' => 'varchar-100', 'name' => '来源', 'default' => '', 'desc' => '来源', 'match' => 'is_string', 'update' => 'text', //'list' => true, ), 'status' => array ( 'type' => 'tinyint-1', 'name' => '订单状态', 'default' => '1', 'desc' => '订单状态', 'match' => 'is_numeric', ), '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, 'edit' => false, 'delete' => false, ), # request 请求接口定义 'request' => array ( # 分页 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'uid' => 'yes', 'type' => 'yes', 'type_id' => 'yes', 'status' => 'yes', 'state' => 1, ), 'type' => 'all', 'order' => array('id' => 'desc'), 'page' => array(10, 'list'), 'col' => '*', ), ), ); return $config;