From c65741ef41e7713a3530debd007f242bb4a5029a Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 15 Aug 2020 02:18:39 +0200 Subject: [PATCH] Add last updated date to member --- src/Member.php | 5 ++++- tests/Unit/PullMemberTest.php | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Member.php b/src/Member.php index 3b560a8..cc81a57 100644 --- a/src/Member.php +++ b/src/Member.php @@ -8,6 +8,8 @@ use Illuminate\Support\LazyCollection; class Member extends Model { + public $timestamps = false; + public $geschlechtMaps = [ 'männlich' => 19, 'weiblich' => 20, @@ -37,7 +39,8 @@ class Member extends Model { 'konfessionId' => 'confession_id', 'geburtsDatum' => 'birthday', 'eintrittsdatum' => 'joined_at', - 'gruppierungId' => 'group_id' + 'gruppierungId' => 'group_id', + 'lastUpdated' => 'updated_at' ]; protected $casts = []; diff --git a/tests/Unit/PullMemberTest.php b/tests/Unit/PullMemberTest.php index 83d6beb..3e3514b 100644 --- a/tests/Unit/PullMemberTest.php +++ b/tests/Unit/PullMemberTest.php @@ -37,6 +37,7 @@ class PullMemberTest extends TestCase 'birthday' => ['birthday', ['1991-06-20', '1984-01-17']], 'joined_at' => ['joined_at', ['2005-05-01', null]], 'group_id' => ['group_id', [103, 103]], + 'updated_at' => ['updated_at', ['2020-06-28 02:15:24', '2015-02-03 15:20:07']] ]; } @@ -56,6 +57,7 @@ class PullMemberTest extends TestCase 'birthday' => ['birthday', ['1991-06-20', '1984-01-17']], 'joined_at' => ['joined_at', ['2005-05-01', null]], 'group_id' => ['group_id', [103, 103]], + 'updated_at' => ['updated_at', ['2020-06-28 02:15:24', '2015-02-03 15:20:07']] ]; }