From 6a16727e97c8fb8400072bb82c74a4b5bbbc4f45 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 5 Apr 2016 23:20:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=B7=BB=E5=8A=A0create=5Fti?= =?UTF-8?q?me=20update=5Ftime=20=E8=87=AA=E5=8A=A8=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/think/Model.php b/library/think/Model.php index 36022628..28e72442 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -48,9 +48,13 @@ abstract class Model implements \JsonSerializable, \ArrayAccess // 字段完成规则 protected $auto = []; // 新增的字段完成 - protected $insert = []; + protected $insert = [ + 'create_time' => 'time', + ]; // 更新的字段完成 - protected $update = []; + protected $update = [ + 'update_time' => 'time', + ]; // 当前执行的关联类型 private $relation;