notfff il y a 8 mois
Parent
commit
9fcd4eb7b8
1 fichiers modifiés avec 19 ajouts et 2 suppressions
  1. 19 2
      app/Module/Game/Models/GameRewardLog.php

+ 19 - 2
app/Module/Game/Models/GameRewardLog.php

@@ -8,7 +8,7 @@ use UCore\ModelCore;
 /**
  * 奖励发放日志
  *
- * field start 
+ * field start
  * @property  int  $id  主键
  * @property  int  $user_id  用户ID
  * @property  int  $group_id  奖励组ID
@@ -27,7 +27,23 @@ class GameRewardLog extends ModelCore
      */
     protected $table = 'game_reward_logs';
 
-    // attrlist start 
+    /**
+     * 指示模型是否应该被打上时间戳
+     * 由于这是日志表,只需要创建时间,不需要更新时间
+     *
+     * @var bool
+     */
+    public $timestamps = true;
+
+    /**
+     * 更新时间戳字段名
+     * 设置为null表示不使用updated_at字段
+     *
+     * @var string|null
+     */
+    const UPDATED_AT = null;
+
+    // attrlist start
     protected $fillable = [
         'id',
         'user_id',
@@ -35,6 +51,7 @@ class GameRewardLog extends ModelCore
         'source_type',
         'source_id',
         'reward_items',
+        'created_at',
     ];
     // attrlist end