49 lines
938 B
PHP
49 lines
938 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\ScenarioFactory;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Scenario extends Model
|
|
{
|
|
/** @use HasFactory<ScenarioFactory> */
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
];
|
|
|
|
|
|
|
|
public function buckets(): HasMany
|
|
{
|
|
return $this->hasMany(Bucket::class);
|
|
}
|
|
|
|
/**
|
|
* Get the streams for this scenario.
|
|
*/
|
|
public function streams(): HasMany
|
|
{
|
|
return $this->hasMany(Stream::class);
|
|
}
|
|
|
|
/**
|
|
* Get the inflows for this scenario.
|
|
*/
|
|
public function inflows(): HasMany
|
|
{
|
|
return $this->hasMany(Inflow::class);
|
|
}
|
|
|
|
/**
|
|
* Get the outflows for this scenario.
|
|
*/
|
|
public function outflows(): HasMany
|
|
{
|
|
return $this->hasMany(Outflow::class);
|
|
}
|
|
}
|