rename ProjektRaeumealle ro ProjektObjekte und ProjektObjekteImDetail
This commit is contained in:
1 parent
7746b426b3
commit
967d6e5157
30 files changed
+342
-292
No files matched your search
@@ -3,8 +3,10 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
class ProjektOrientierungZuAbschlaege extends Model
|
||||
class ProjektObjekte extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'projekte_id',
|
||||
@@ -52,8 +54,13 @@ class ProjektOrientierungZuAbschlaege extends Model
|
||||
];
|
||||
}
|
||||
|
||||
public function orientierung()
|
||||
public function orientierung(): HasOne
|
||||
{
|
||||
return $this->hasOne(Orientierung::class, 'id', 'orientierung_id');
|
||||
}
|
||||
|
||||
public function ProjektObjekteImDetail(): HasMany
|
||||
{
|
||||
return $this->hasMany(ProjektObjekteImDetail::class, 'projekt_objekte_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,11 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ProjektRaeumealle extends Model
|
||||
class ProjektObjekteImDetail extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'projekte_id',
|
||||
'projekt_orientierung_zu_abschlaege_id',
|
||||
'projekt_objekte_id',
|
||||
'methode_id',
|
||||
'top_nummer',
|
||||
'geschoss',
|
||||
@@ -32,8 +32,8 @@ class ProjektRaeumealle extends Model
|
||||
});
|
||||
}
|
||||
|
||||
public function orientierung_zu_abschlaege()
|
||||
public function top_nummer()
|
||||
{
|
||||
return $this->belongsTo(ProjektOrientierungZuAbschlaege::class, 'projekt_orientierung_zu_abschlaege_id', 'id');
|
||||
return $this->belongsTo(ProjektObjekte::class, 'projekt_objekte_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class Projekte extends Model
|
||||
|
||||
public function projekt_orientierung_zu_abschlaeges()
|
||||
{
|
||||
return $this->hasMany(ProjektOrientierungZuAbschlaege::class);
|
||||
return $this->hasMany(ProjektObjekte::class);
|
||||
}
|
||||
|
||||
public function auftraggeber()
|
||||
@@ -71,7 +71,7 @@ class Projekte extends Model
|
||||
|
||||
public function projekt_raeumealles()
|
||||
{
|
||||
return $this->hasMany(ProjektRaeumealle::class);
|
||||
return $this->hasMany(ProjektObjekteImDetail::class);
|
||||
}
|
||||
|
||||
public function projekt_methodes()
|
||||
|
||||
Reference in new issue
Block a user