adrema/app/Activity.php

26 lines
461 B
PHP
Raw Normal View History

2020-04-12 00:26:44 +02:00
<?php
namespace App;
2021-08-22 19:31:20 +02:00
use App\Nami\HasNamiField;
2020-04-12 00:26:44 +02:00
use Illuminate\Database\Eloquent\Model;
2021-07-15 20:56:53 +02:00
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
2020-04-12 00:26:44 +02:00
class Activity extends Model
{
2021-08-22 19:31:20 +02:00
use HasNamiField;
2020-04-12 00:26:44 +02:00
public $fillable = ['name', 'nami_id'];
public $timestamps = false;
public $casts = [
'nami_id' => 'integer'
];
2021-07-15 20:56:53 +02:00
public function subactivities(): BelongsToMany {
2021-06-23 01:05:17 +02:00
return $this->belongsToMany(Subactivity::class);
2020-04-12 00:26:44 +02:00
}
2021-06-24 23:48:08 +02:00
2020-04-12 00:26:44 +02:00
}