This commit is contained in:
salam committed 2025-09-24 16:55:55 +02:00
1 parent 11cb9b03f5
commit 5f95289079
25 files changed
+430 -129

No files matched your search

+9
View File
@@ -3,15 +3,24 @@
namespace App\Models;
use App\Models\Scopes\KontoScope;
use Database\Factories\GutachterFactory;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Gutachter extends Model
{
use HasFactory;
use SoftDeletes;
protected static function booted(): void
{
static::addGlobalScope(new KontoScope);
}
protected static function newFactory(): Factory
{
return GutachterFactory::new();
}
}
+25 -17
View File
@@ -2,36 +2,44 @@
namespace App\Models;
use Database\Factories\KontoFactory;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
class Konto extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'konto_title',
'konto_gender',
'konto_first_name',
'konto_last_name',
'konto_company',
'konto_email',
'konto_address',
'konto_location',
'konto_plz',
'konto_country',
'konto_phone',
'konto_uid_number',
'konto_agb_akzeptiert',
'konto_option_id',
'konto_gutachten_zahl',
'konto_gutachten_zeit',
'konto_gutachten_abgeschlossen',
'title',
'gender',
'first_name',
'last_name',
'company',
'email',
'address',
'country',
'phone',
'uid_number',
'agb_akzeptiert',
'plan_id',
'guthaben',
'gueltig_bis',
'abgeschlossen',
];
protected static function newFactory(): Factory
{
return KontoFactory::new();
}
public function konto_option(): HasOne
{
return $this->hasOne(KontoOption::class, 'id', 'konto_option_id');
+9 -1
View File
@@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model;
class Projekte extends Model
{
//
public function auftraggeber()
{
return $this->belongsTo(Auftraggeber::class);
}
public function gutachter()
{
return $this->belongsTo(Gutachter::class);
}
}