dever 6 years ago
parent
commit
121bd0d5b3
1 changed files with 132 additions and 0 deletions
  1. 132 0
      applet/database/msg_send.php

+ 132 - 0
applet/database/msg_send.php

@@ -0,0 +1,132 @@
+<?php
+
+$project = function()
+{
+	$array = array();
+	$info = Dever::load('main/project-state', array('option_type' => 3));
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+return array
+(
+	# 表名
+	'name' => 'msg_send',
+	# 显示给用户看的名称
+	'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',
+			'list'		=> true,
+			'update'	=> 'select',
+			'option'	=> $project,
+		),
+
+		'key'		=> array
+		(
+			'type' 		=> 'varchar-20',
+			'name' 		=> '模板消息key',
+			'default' 	=> '',
+			'desc' 		=> '模板消息key',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'page'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '页面路径',
+			'default' 	=> 'pages/index/index',
+			'desc' 		=> '页面路径',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '模板内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> array
+			(
+				array
+				(
+					'col'		=> 'key',
+					'name' 		=> '标识',
+					'default' 	=> '',
+					'desc' 		=> '请输入标识',
+					'match' 	=> 'is_string',
+					'update'	=> 'text',
+				),
+				array
+				(
+					'col' 		=> 'value',
+					'name' 		=> '内容值',
+					'default' 	=> '',
+					'desc' 		=> '内容值',
+					'match' 	=> 'is_string',
+					'update'	=> 'textarea',
+				),
+			),
+		),
+
+		'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', 'applet')->top,
+
+	'manage' => array
+	(
+		//'delete' => false,
+		//'insert' => false,
+		//'edit' => false,
+		'list_button' => array
+		(
+			'oper' => array('立刻发送', '"applet/msg.submit?id={id}"'),
+		),
+	),
+);