dever 4 years ago
parent
commit
eb10a4108c
1 changed files with 16 additions and 0 deletions
  1. 16 0
      database/admin.php

+ 16 - 0
database/admin.php

@@ -108,6 +108,22 @@ return array
 			'type' => 'delete',
 		)
 	),
+	/*
+	# 查询出数据时,填充默认数据
+	'fill' => array
+	(
+		# 从哪个表填充
+		'cover/hot_service' => array
+		(
+			# 条件,另外一个表的字段 => 本表的字段
+			'where' => array('id' => 'service_id', 'seller_id' => '-1'),
+			# 要填充的数据,另外一个表的字段 => 本表的字段,如果不填写就是所有的
+			//'update' => array('name', 'title', 'desc', 'desc', 'back_color', 'pic', 'min_pic1', 'min_pic2', 'top', 'top_name', 'top_cover', 'hot_pic', 'case_pic', 'gradient', 'share_name', 'share_desc', 'share_pic', 'content', 'reorder'),
+			# 不需要填充的字段 与update互斥
+			'no' => array('id', 'seller_id', 'service_id', 'chose', 'state', 'cdate')
+		)
+	),
+	*/
 
 
 	# 同步更新另外一个或多个表的一条关联数据