123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <?php
- $config = array
- (
- # 表名
- 'name' => '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;
|