|
@@ -0,0 +1,177 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+# 定义几个常用的选项
|
|
|
+$status = Dever::config('base')->status;
|
|
|
+$sex = array
|
|
|
+(
|
|
|
+ 1 => '男',
|
|
|
+ 2 => '女',
|
|
|
+ 3 => '未知',
|
|
|
+);
|
|
|
+return array
|
|
|
+(
|
|
|
+ # 表名
|
|
|
+ 'name' => 'role',
|
|
|
+ # 显示给用户看的名称
|
|
|
+ 'lang' => '角色设置',
|
|
|
+ 'order' => 100,
|
|
|
+ 'menu' => false,
|
|
|
+ # 数据结构
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ //'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'info_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '合集',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '合集',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'hidden',
|
|
|
+ 'value' => Dever::input('search_option_info_id')
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '角色名称',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '角色名称',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'price' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-50',
|
|
|
+ 'name' => '角色价格-为0则免费',
|
|
|
+ 'default' => '0',
|
|
|
+ 'desc' => '角色价格',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'avatar' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-150',
|
|
|
+ 'name' => '头像',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '请选择头像',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'image',
|
|
|
+ 'key' => '1',
|
|
|
+ 'place' => '150',
|
|
|
+ 'list_name' => '详细信息',
|
|
|
+ 'list' => '"{avatar}" ? "<img src=\'{avatar}\' width=\'150\'>": ""',
|
|
|
+ //'list' => 'Dever::load("passport/lib/manage.show", {id})',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'sex' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '性别',
|
|
|
+ 'default' => '3',
|
|
|
+ 'desc' => '性别',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $sex,
|
|
|
+ 'update' => 'radio',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'title' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-800',
|
|
|
+ 'name' => '头衔-头衔,如果为空则使用用户头衔',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '请输入头衔',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ //'search' => 'fulltext',
|
|
|
+ //'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'info' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-800',
|
|
|
+ 'name' => '签名-签名,如果为空则使用用户签名',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '签名',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ //'search' => 'fulltext',
|
|
|
+ //'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'status' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '上线状态',
|
|
|
+ 'default' => '2',
|
|
|
+ 'desc' => '上线状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ //'update' => 'select',
|
|
|
+ 'option' => $status,
|
|
|
+ 'search' => 'select',
|
|
|
+ 'list' => true,
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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
|
|
|
+ (
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'getAll' => array
|
|
|
+ (
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'info_id' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('num' => 'asc', 'cdate' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ 'call' => 'collection/lib/buy.getInfo',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|