summaryrefslogtreecommitdiff
path: root/src/Models/User/HasUserModel.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-06 14:15:54 +0200
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commit8e62c4c52c27f9432820915deeb699c3d1f58ce7 (patch)
tree43d22891924aeaa42108c21309da6b09b5390128 /src/Models/User/HasUserModel.php
parentb443b53919f50bd0176e7b67dfd1efc28276a770 (diff)
Added new user models
Diffstat (limited to 'src/Models/User/HasUserModel.php')
-rw-r--r--src/Models/User/HasUserModel.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Models/User/HasUserModel.php b/src/Models/User/HasUserModel.php
new file mode 100644
index 00000000..89dbd642
--- /dev/null
+++ b/src/Models/User/HasUserModel.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Engelsystem\Models\User;
+
+use Engelsystem\Models\BaseModel;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
+
+/**
+ * @property integer $user_id
+ *
+ * @method static \Illuminate\Database\Query\Builder|static whereUserId($value)
+ */
+abstract class HasUserModel extends BaseModel
+{
+ /** @var string The primary key for the model */
+ protected $primaryKey = 'user_id';
+
+ /** The attributes that are mass assignable */
+ protected $fillable = [
+ 'user_id',
+ ];
+
+ /**
+ * @return BelongsTo
+ */
+ public function user()
+ {
+ return $this->belongsTo(User::class);
+ }
+}