* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0 */ namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Audit extends Model { use HasFactory; /** * The Attributes That Are Mass Assignable. * * @var string[] */ protected $fillable = [ 'user_id', 'model_name', 'model_entry_id', 'action', 'record', ]; /** * Belongs To A User. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', 'id' => '1', ]); } }