| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 | 
							- <?php
 
- /**
 
-  * user
 
-  */
 
- $type = array
 
- (
 
- 	1 => '小程序',
 
- 	2 => '订阅号',
 
- 	3 => '服务号',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'user',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '用户管理',
 
- 	'order' => 100,
 
- 	'desc' => '请将component/auth.cron放到cron中,定时获取access token',
 
- 	# 数据结构
 
- 	'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',
 
- 		),
 
- 		'oauth_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'oauth',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> 'oauth',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-120',
 
- 			'name' 		=> '昵称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '昵称',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'fulltext',
 
- 			//'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'principal_name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-120',
 
- 			'name' 		=> '主体信息',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '主体信息',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'fulltext',
 
- 			//'update'	=> 'text',
 
- 			'list'		=> true,
 
- 		),
 
- 		'pic'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-250',
 
- 			'name' 		=> '头像',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '头像',
 
- 			'match' 	=> 'is_string',
 
- 			//'search'	=> 'fulltext',
 
- 			//'update'	=> 'text',
 
- 			'list_name'	=> 'logo及二维码列表',
 
- 			//'list'		=> '"<img src=\"{pic}\" width=\"100\"> <img src=\"{qrcode}\" width=\"100\">"',
 
- 			'list'		=> 'Dever::load("component/user.logo", {id})',
 
- 			'modal'		=> '点此查看',
 
- 		),
 
- 		'username'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-120',
 
- 			'name' 		=> '用户名',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '用户名',
 
- 			'match' 	=> 'is_string',
 
- 			//'search'	=> 'fulltext',
 
- 			//'update'	=> 'text',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'qrcode'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-250',
 
- 			'name' 		=> '二维码',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '二维码',
 
- 			'match' 	=> 'is_string',
 
- 			//'search'	=> 'fulltext',
 
- 			//'update'	=> 'text',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-11',
 
- 			'name' 		=> '类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '类型',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'update'	=> 'select',
 
- 			'option'	=> $type,
 
- 			//'list'		=> true,
 
- 		),
 
- 		'desc'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-120',
 
- 			'name' 		=> '小程序id',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '小程序id',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'fulltext',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 			'edit'		=> true,
 
- 		),
 
- 		'tag'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-500',
 
- 			'name' 		=> '标签',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '标签',
 
- 			'match' 	=> 'is_string',
 
- 			'search'	=> 'fulltext',
 
- 			'update'	=> 'text',
 
- 			'list'		=> true,
 
- 			'edit'		=> true,
 
- 		),
 
- 		
 
- 		'mdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '更新时间',
 
- 			'match' 	=> array('is_numeric', time()),
 
- 			'desc' 		=> '',
 
- 			'list'		=> 'date("Y-m-d H:i:s", {mdate})',
 
- 		),
 
- 		
 
- 		'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,
 
- 		),
 
- 	),
 
- 	'top' => Dever::config('base')->top,
 
- 	'manage' => array
 
- 	(
 
- 		'delete' => false,
 
- 		'insert' => false,
 
- 		'edit' => false,
 
- 	),
 
- );
 
 
  |