| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 | 
							- <?php
 
- $type = array
 
- (
 
- 	1 => '未使用',
 
- 	2 => '已使用',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'card_list',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '单个优惠券列表',
 
- 	'order' => 90,
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			'list'		=> true,
 
- 		),
 
- 		'project_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '项目',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入项目',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		
 
- 		'card_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '优惠券id',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '优惠券id',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'list'		=> 'Dever::load("youzan/card-one#name", {card_id})',
 
- 		),
 
- 		'user'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-120',
 
- 			'name' 		=> '使用者',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '使用者',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'group_id'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-20',
 
- 			'name' 		=> '优惠券组id',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '优惠券组id',
 
- 			'match' 	=> 'option',
 
- 			//'search'	=> 'order',
 
- 			'list'		=> true,
 
- 		),
 
- 		'code_url'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-200',
 
- 			'name' 		=> '优惠券地址',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '优惠券地址',
 
- 			'match' 	=> 'option',
 
- 			'search'	=> 'fulltext',
 
- 			//'search'	=> 'order',
 
- 			'list'		=> true,
 
- 			'modal'		=> '查看详情',
 
- 		),
 
- 		'result'		=> array
 
- 		(
 
- 			'type' 		=> 'text-255',
 
- 			'name' 		=> '有赞返回信息',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '有赞返回信息',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'textarea',
 
- 			'list'		=> true,
 
- 			'modal'		=> '查看详情',
 
- 		),
 
- 		
 
- 		'status'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '领取状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '领取状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'search'	=> 'select',
 
- 			'option'	=> $type,
 
- 			'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' 		=> '',
 
- 			'default' 	=> '',
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	'top' => Dever::config('base', 'youzan')->top,
 
- 	'manage' => array
 
- 	(
 
- 		//'delete' => false,
 
- 		'insert' => false,
 
- 		'edit' => false,
 
- 	),
 
- 	'request' => array
 
- 	(
 
- 		'getAll' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'status' => 'yes',
 
- 				'cate_id' => 'yes',
 
- 				'state' => 1,
 
- 			),
 
- 			'type' => 'all',
 
- 			'limit' => '0,100',
 
- 			'order' => array('id' => 'desc'),
 
- 			'col' => '*',
 
- 		),
 
- 	),
 
- );
 
 
  |