41 lines
760 B
PHP
41 lines
760 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OrientierungZuAbschlaege extends Model
|
|
{
|
|
protected $fillable = [
|
|
'projekte_id',
|
|
'orientierung_id',
|
|
'nicht_in_orientierung',
|
|
'top_nummer',
|
|
'raumart',
|
|
'a',
|
|
'b',
|
|
'c',
|
|
'd',
|
|
'e',
|
|
'f',
|
|
'g',
|
|
'h',
|
|
'i',
|
|
'j',
|
|
];
|
|
|
|
public static function boot()
|
|
{
|
|
parent::boot();
|
|
|
|
self::updated(function ($model) {
|
|
Projekte::where('id', $model['projekte_id'])->update(['evaluation_gutachten' => false]);
|
|
});
|
|
}
|
|
|
|
public function orientierung()
|
|
{
|
|
return $this->hasOne(Orientierung::class, 'id', 'orientierung_id');
|
|
}
|
|
}
|