<?php

namespace Modules\Activity\Entities;

use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class ActivityType extends Model
{
    use HasUuids;

    protected $table = 'activity_types';

    protected $fillable = [
        'name',
        'code',
    ];

    protected function casts(): array
    {
        return [
            'name' => 'string',
            'code' => 'string',
        ];
    }

    public function activities(): HasMany
    {
        return $this->hasMany(Activity::class);
    }
}
