feat: Add user level and experience attributes, and implement reward, task, and quest models with corresponding controllers and migrations

This commit is contained in:
Jonas Pfalzgraf 2024-12-16 09:00:57 +01:00
parent aa50740dcb
commit fd20278948
17 changed files with 963 additions and 112 deletions

View file

@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Quest extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'task_id',
'title',
'category',
'due_date',
'xp_reward',
'is_completed'
];
public function user()
{
return $this->belongsTo(User::class);
}
public function task()
{
return $this->belongsTo(Task::class);
}
}