feat: add mood tracking (monicahq/chandler#386)
This commit is contained in:
@@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class MoodTrackingParameter extends Model
|
||||
{
|
||||
@@ -36,6 +37,16 @@ class MoodTrackingParameter extends Model
|
||||
return $this->belongsTo(Vault::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mood tracking events associated with the mood tracking parameter.
|
||||
*
|
||||
* @return HasMany
|
||||
*/
|
||||
public function moodTrackingEvents(): HasMany
|
||||
{
|
||||
return $this->hasMany(MoodTrackingEvent::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the label attribute.
|
||||
* A mood tracking parameter has a default label that can be translated.
|
||||
|
||||
Reference in New Issue
Block a user