<?php

namespace App\Traits;

use Illuminate\Database\Eloquent\Relations\BelongsTo;
use LaraBB\User\Models\User;

/**
 * Trait Who
 * @package App\Traits
 */
trait Who
{
    /**
     * @return BelongsTo
     */
    public function createdBy(): BelongsTo
    {
        return $this->belongsTo(User::class, 'created_uuid', 'uuid');
    }

    /**
     * @return BelongsTo
     */
    public function updatedBy(): BelongsTo
    {
        return $this->belongsTo(User::class, 'updated_uuid', 'uuid');
    }
}
