48 lines
984 B
PHP
48 lines
984 B
PHP
<?php
|
|
|
|
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 = [
|
|
'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');
|
|
}
|
|
}
|