123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <?php
- # 定义几个常用的选项
- $status = array
- (
- 1 => '在线',
- 2 => '下线',
- );
- $type = array
- (
- 1 => '购买',
- 2 => '兑换',
- );
- return array
- (
- # 表名
- 'name' => 'product_price',
- # 显示给用户看的名称
- 'lang' => '产品规格管理',
- 'order' => 100,
- 'menu' => false,
- 'end' => array
- (
- 'update' => 'code/lib/manage.create',
- 'insert' => 'code/lib/manage.create',
- ),
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'list' => true,
- ),
- 'product_id' => array
- (
- 'type' => 'int-11',
- 'name' => '产品',
- 'default' => '',
- 'desc' => '产品',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'value' => Dever::input('search_option_product_id')
- ),
- 'name' => array
- (
- 'type' => 'varchar-80',
- 'name' => '规格名称',
- 'default' => '',
- 'desc' => '规格名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'price' => array
- (
- 'type' => 'varchar-50',
- 'name' => '显示价格',
- 'default' => '',
- 'desc' => '显示价格',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'zhe_price' => array
- (
- 'type' => 'varchar-50',
- 'name' => '优惠价格',
- 'default' => '',
- 'desc' => '优惠价格',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'type' => array
- (
- 'type' => 'varchar-150',
- 'name' => '获取方式',
- 'default' => '1',
- 'desc' => '获取方式',
- 'match' => 'is_numeric',
- 'option' => $type,
- 'search' => 'select',
- 'update' => 'checkbox',
- 'list' => true,
- 'control' => 'type',
- ),
- 'cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '支付价格-单位元,直接填写数字即可',
- 'default' => '',
- 'desc' => '支付价格',
- 'match' => 'is_string',
- 'update' => 'text',
- 'show' => 'type=1',
- ),
- 'code' => array
- (
- 'type' => 'varchar-50',
- 'name' => '兑换码数量-直接填写数字即可,系统将自动生成对应数量的兑换码',
- 'default' => '',
- 'desc' => '兑换码数量',
- 'match' => 'is_string',
- 'update' => 'text',
- 'show' => 'type=2',
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序(数值越大越靠前)',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- 'update' => 'text',
- 'search' => 'order',
- 'list_name' => '排序',
- 'list' => true,
- 'order' => 'desc',
- '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
- (
- 'list_button' => array
- (
- 'list' => array('兑换码列表', '"info&project=code&search_option_product_id={product_id}&search_option_product_price_id={id}&oper_parent=product_price&oper_project=service"'),
- ),
- ),
- 'request' => array
- (
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'project_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
- 'col' => '*',
- ),
- # 最低价格的
- 'getDataByMin' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'project_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'order' => array('zhe_price' => 'asc','reorder' => 'desc', 'cdate' => 'desc'),
- 'col' => '*',
- ),
- ),
- );
|