feat: Add user level and experience attributes, and implement reward, task, and quest models with corresponding controllers and migrations
This commit is contained in:
parent
aa50740dcb
commit
fd20278948
17 changed files with 963 additions and 112 deletions
25
backend/app/Models/Task.php
Normal file
25
backend/app/Models/Task.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Task extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'title',
|
||||
'description',
|
||||
'category',
|
||||
'priority',
|
||||
'due_date'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue