Initialize repo and add session changes (2025-09-08)

This commit is contained in:
Auto Commit
2025-09-08 14:03:43 +02:00
commit 44ab0a534b
327 changed files with 40952 additions and 0 deletions

27
app/Models/Emotion.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Emotion extends Model
{
protected $table = 'emotions';
protected $guarded = [];
protected $casts = [
'name' => 'array',
'description' => 'array',
];
public function eventTypes(): BelongsToMany
{
return $this->belongsToMany(EventType::class, 'emotion_event_type', 'emotion_id', 'event_type_id');
}
public function tasks(): HasMany
{
return $this->hasMany(Task::class);
}
}