summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Models/EventConfig.php11
-rw-r--r--src/Models/LogEntry.php11
-rw-r--r--src/Models/User/Contact.php6
-rw-r--r--src/Models/User/HasUserModel.php3
-rw-r--r--src/Models/User/PasswordReset.php4
-rw-r--r--src/Models/User/PersonalData.php20
-rw-r--r--src/Models/User/State.php12
-rw-r--r--src/Models/User/User.php2
8 files changed, 47 insertions, 22 deletions
diff --git a/src/Models/EventConfig.php b/src/Models/EventConfig.php
index e2f832cb..576a8f0e 100644
--- a/src/Models/EventConfig.php
+++ b/src/Models/EventConfig.php
@@ -4,6 +4,17 @@ namespace Engelsystem\Models;
use Carbon\Carbon;
+/**
+ * @property string $name
+ * @property string $value
+ * @property \Carbon\Carbon $created_at
+ * @property \Carbon\Carbon $updated_at
+ *
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\EventConfig[] whereName($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\EventConfig[] whereValue($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\EventConfig[] whereCreatedAt($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\EventConfig[] whereUpdatedAt($value)
+ */
class EventConfig extends BaseModel
{
/** @var string The primary key for the model */
diff --git a/src/Models/LogEntry.php b/src/Models/LogEntry.php
index ca9702de..0018841a 100644
--- a/src/Models/LogEntry.php
+++ b/src/Models/LogEntry.php
@@ -5,6 +5,17 @@ namespace Engelsystem\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
+/**
+ * @property int $id
+ * @property string $level
+ * @property string $message
+ * @property \Carbon\Carbon|null $created_at
+ *
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\LogEntry[] whereId($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\LogEntry[] whereLevel($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\LogEntry[] whereMessage($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\LogEntry[] whereCreatedAt($value)
+ */
class LogEntry extends BaseModel
{
/** @var bool enable timestamps for created_at */
diff --git a/src/Models/User/Contact.php b/src/Models/User/Contact.php
index 23bc528c..9b4bdb2b 100644
--- a/src/Models/User/Contact.php
+++ b/src/Models/User/Contact.php
@@ -3,9 +3,9 @@
namespace Engelsystem\Models\User;
/**
- * @property string $dect
- * @property string $email
- * @property string $mobile
+ * @property string|null $dect
+ * @property string|null $email
+ * @property string|null $mobile
*
* @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\Contact[] whereDect($value)
* @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\Contact[] whereEmail($value)
diff --git a/src/Models/User/HasUserModel.php b/src/Models/User/HasUserModel.php
index d627e50d..6d1323de 100644
--- a/src/Models/User/HasUserModel.php
+++ b/src/Models/User/HasUserModel.php
@@ -22,6 +22,9 @@ abstract class HasUserModel extends BaseModel
'user_id',
];
+ /** The relationships that should be touched on save */
+ protected $touches = ['user'];
+
/**
* @return BelongsTo
*/
diff --git a/src/Models/User/PasswordReset.php b/src/Models/User/PasswordReset.php
index cd722aba..5cf66953 100644
--- a/src/Models/User/PasswordReset.php
+++ b/src/Models/User/PasswordReset.php
@@ -3,8 +3,8 @@
namespace Engelsystem\Models\User;
/**
- * @property string $token
- * @property \Carbon\Carbon $created_at
+ * @property string $token
+ * @property \Carbon\Carbon|null $created_at
*
* @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PasswordReset[] whereToken($value)
* @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PasswordReset[] whereCreatedAt($value)
diff --git a/src/Models/User/PersonalData.php b/src/Models/User/PersonalData.php
index 5871bcfb..d5b74128 100644
--- a/src/Models/User/PersonalData.php
+++ b/src/Models/User/PersonalData.php
@@ -3,17 +3,17 @@
namespace Engelsystem\Models\User;
/**
- * @property string $first_name
- * @property string $last_name
- * @property string $shirt_size
- * @property \Carbon\Carbon $planned_arrival_date
- * @property \Carbon\Carbon $planned_departure_date
+ * @property string|null $first_name
+ * @property string|null $last_name
+ * @property string|null $shirt_size
+ * @property \Carbon\Carbon|null $planned_arrival_date
+ * @property \Carbon\Carbon|null $planned_departure_date
*
- * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData whereFirstName($value)
- * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData whereLastName($value)
- * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData whereShirtSize($value)
- * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData wherePlannedArrivalDate($value)
- * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData wherePlannedDepartureDate($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData[] whereFirstName($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData[] whereLastName($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData[] whereShirtSize($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData[] wherePlannedArrivalDate($value)
+ * @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\PersonalData[] wherePlannedDepartureDate($value)
*/
class PersonalData extends HasUserModel
{
diff --git a/src/Models/User/State.php b/src/Models/User/State.php
index e12aa5e1..fbb8ad20 100644
--- a/src/Models/User/State.php
+++ b/src/Models/User/State.php
@@ -3,12 +3,12 @@
namespace Engelsystem\Models\User;
/**
- * @property bool $arrived
- * @property \Carbon\Carbon $arrival_date
- * @property bool $active
- * @property bool $force_active
- * @property bool $got_shirt
- * @property int $got_voucher
+ * @property bool $arrived
+ * @property \Carbon\Carbon|null $arrival_date
+ * @property bool $active
+ * @property bool $force_active
+ * @property bool $got_shirt
+ * @property int $got_voucher
*
* @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\State[] whereArrived($value)
* @method static \Illuminate\Database\Query\Builder|\Engelsystem\Models\User\State[] whereArrivalDate($value)
diff --git a/src/Models/User/User.php b/src/Models/User/User.php
index bc4ad015..4be3246c 100644
--- a/src/Models/User/User.php
+++ b/src/Models/User/User.php
@@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne;
* @property string $email
* @property string $password
* @property string $api_key
- * @property \Carbon\Carbon $last_login_at
+ * @property \Carbon\Carbon|null $last_login_at
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
*