| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 | <?php$option = array(	1 => '发送成功',	2 => '发送失败',);$type = array(	'text' => '文本',	'voice' => '语音',	'video' => '视频',	'image' => '图片',);return array(	# 表名	'name' => 'account_msg',	# 显示给用户看的名称	'lang' => '客服点对点消息',	'menu' => false,	# 数据结构	'struct' => array	(		'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> 'ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			'search'	=> 'order',			//'list'		=> true,		),		'site'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '站点',			'default' 	=> '',			'desc' 		=> '请输入站点',			'match' 	=> 'is_numeric',		),				'openid'		=> array		(			'type' 		=> 'varchar-100',			'name' 		=> '接收人',			'default' 	=> '',			'desc' 		=> '接收人',			'search'	=> 'fulltext',			'list'		=> 'Dever::load("weixin/user.name", "{openid}")',			'match' 	=> 'option',		),		'account'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '客服',			'default' 	=> '',			'desc' 		=> '客服',			'search'	=> 'fulltext',			//'list'		=> true,			'match' 	=> 'option',		),				'type'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '发送类型',			'default' 	=> '',			'desc' 		=> '发送类型',			'search'	=> 'select',			'list'		=> true,			'option'	=> $type,			'match' 	=> 'option',		),				'usermsg_id'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '消息id',			'default' 	=> '',			'desc' 		=> '消息id',			'search'	=> 'fulltext',			//'list'		=> true,			'match' 	=> 'option',		),				'info'		=> array		(			'type' 		=> 'text-255',			'name' 		=> '消息内容',			'default' 	=> '',			'desc' 		=> '消息内容',			'search'	=> 'fulltext',			'list'		=> true,			'match' 	=> 'option',		),				'state'		=> array		(			'type' 		=> 'tinyint-1',			'name' 		=> '状态',			'default' 	=> '1',			'desc' 		=> '请选择状态',			'match' 	=> array('is_numeric', 1),			'option' 	=> $option,			'update'	=> 'radio',			//'list'		=> true,		),		'cdate'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '录入时间',			'match' 	=> array('is_numeric', time()),			'desc' 		=> '',			# 只有insert时才生效			'insert'	=> true,		),	),		'manage' => array	(		'desc' => '注:这里的记录为用户发送给本公众号的消息',	),	'auth' => 'site',		# request 请求接口定义	'request' => array	(		'getOne' => array		(			# 匹配的正则或函数 必填项			'where' => array			(				'openid' => 'yes',				'site' => 'yes',			),			'type' => 'one',			'order' => array('cdate', 'desc'),		),		'getAll' => array		(			# 匹配的正则或函数 必填项			'where' => array			(				'openid' => 'yes',				'site' => 'yes',			),			'type' => 'all',			'order' => array('cdate', 'desc'),			'col' => '*|usermsg_id|id|',		),	),);
 |