123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <?php
- $status = array
- (
- 1 => '待支付',
- 2 => '待发货',
- 3 => '待收货',
- 4 => '已完成',
- 5 => '已取消',
- );
- return array
- (
- # 表名
- 'name' => 'order',
- # 显示给用户看的名称
- 'lang' => '礼品卡订单',
- 'status' => $status,
- # 后台菜单排序
- 'order' => 100,
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- ),
-
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '购买人名称',
- 'default' => '0',
- 'desc' => '请选择用户',
- 'match' => 'is_numeric',
- 'update' => 'text',
- //'search' => 'select',
- 'search' => array
- (
- 'api' => 'passport/user-one',
- 'col' => 'username',
- 'result' => 'id',
- ),
- 'list' => 'Dever::load("shop/lib/manage.user", {id})',
- ),
- 'mobile' => array
- (
- 'type' => 'varchar-300',
- 'name' => '下单手机号',
- 'default' => '',
- 'desc' => '手机号',
- 'match' => 'option',
- 'search' => 'fulltext',
- /*
- 'search' => array
- (
- 'api' => 'passport/user-select',//接口地址,最好是获取多条数据的地址
- 'col' => 'mobile',//要查询的字段
- 'result' => 'id',//返回的字段
- 'search' => 'uid',//本表的字段,默认为当前的字段
- ),
- */
- ),
- 'shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '兑换门店',
- 'default' => '',
- 'desc' => '兑换门店',
- 'match' => 'is_numeric',
- ),
- 'address_id' => array
- (
- 'type' => 'int-11',
- 'name' => '送货地址',
- 'default' => '',
- 'desc' => '送货地址',
- 'match' => 'is_numeric',
- //'list' => 'Dever::load("passport/address-find#address", {address_id})';
- ),
- 'order_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '订单号',
- 'default' => '',
- 'desc' => '订单号',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'price' => array
- (
- 'type' => 'varchar-50',
- 'name' => '支付金额',
- 'default' => '0',
- 'desc' => '支付金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list' => true,
- ),
- 'num' => array
- (
- 'type' => 'int-11',
- 'name' => '购买数量',
- 'default' => '',
- 'desc' => '购买数量',
- 'match' => 'is_numeric',
- 'search' => 'select',
- //'list' => true,
- ),
- 'status' => array
- (
- 'type' => 'int-11',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- 'update' => 'select',
- 'list' => true,
- //'mul' => array(1 => '恢复使用', 4 => '已作废'),
- ),
- '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
- (
- 'excel' => true,
- 'delete' => false,
- 'edit' => false,
- 'insert' => false,
- // 'mul' => '{type} == 1 || {type} == 4',
- 'list_button' => array
- (
- //'oper' => array('作废', 'goods/lib/manage.drop?id={id}', '{type} == 1'),
- //'oper2' => array('恢复使用', 'goods/lib/manage.recovery?id={id}', '{type} == 4'),
- ),
- ),
- # 索引
- 'index' => array
- (
- # 索引名 => 索引id
- 1 => array
- (
- 'card' => 'card'
- ),
- 'version' => 1,
- ),
- 'request' => array
- (
-
- ),
- );
|