67 lines
1.3 KiB
PHP
67 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Scopes\KontoScope;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Projekte extends Model
|
|
{
|
|
protected $fillable = [
|
|
'konto_id',
|
|
'auftraggeber_id',
|
|
'gutachter_id',
|
|
'offizieller_name',
|
|
'interner_name',
|
|
'ort',
|
|
'beschreibung',
|
|
'erstellung',
|
|
'status',
|
|
];
|
|
|
|
protected static function booted(): void
|
|
{
|
|
static::addGlobalScope(new KontoScope);
|
|
}
|
|
|
|
public function orientierung_zu_abschlaeges()
|
|
{
|
|
return $this->hasMany(OrientierungZuAbschlaege::class);
|
|
}
|
|
|
|
public function auftraggeber()
|
|
{
|
|
return $this->belongsTo(Auftraggeber::class);
|
|
}
|
|
|
|
public function gutachter()
|
|
{
|
|
return $this->belongsTo(Gutachter::class);
|
|
}
|
|
|
|
public function allgemeinflaechens()
|
|
{
|
|
return $this->hasMany(Allgemeinflaechen::class);
|
|
}
|
|
|
|
public function raeumealles()
|
|
{
|
|
return $this->hasMany(Raeumealle::class);
|
|
}
|
|
|
|
public function projekt_methodes()
|
|
{
|
|
return $this->hasMany(ProjektMethode::class);
|
|
}
|
|
|
|
public function projekt_inhaltsverzeichnis()
|
|
{
|
|
return $this->hasMany(ProjektInhaltsverzeichnis::class);
|
|
}
|
|
|
|
public function konto_textblocks()
|
|
{
|
|
return $this->hasMany(KontoTextblock::class);
|
|
}
|
|
}
|