3 namespace BookStack\Users\Models;
5 use Illuminate\Database\Eloquent\Relations\BelongsTo;
8 * @property int $created_by
9 * @property int $updated_by
10 * @property ?User $createdBy
11 * @property ?User $updatedBy
13 trait HasCreatorAndUpdater
16 * Relation for the user that created this entity.
18 public function createdBy(): BelongsTo
20 return $this->belongsTo(User::class, 'created_by');
24 * Relation for the user that updated this entity.
26 public function updatedBy(): BelongsTo
28 return $this->belongsTo(User::class, 'updated_by');