commit 08-2025
This commit is contained in:
parent
9ae662f63e
commit
480fdc65ed
404 changed files with 65310 additions and 2600431 deletions
74
app/Models/Customer.php
Normal file
74
app/Models/Customer.php
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable; // Wichtig!
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $name
|
||||
* @property string $email
|
||||
* @property int|null $shopping_user_id
|
||||
* @property int|null $member_id
|
||||
* @property int|null $number
|
||||
* @property string|null $language
|
||||
* @property string|null $mode
|
||||
* @property string|null $remember_token
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read User|null $member
|
||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||
* @property-read int|null $notifications_count
|
||||
* @property-read \App\Models\ShoppingUser|null $shoppingUser
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereLanguage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereMemberId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereMode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereRememberToken($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereShoppingUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Customer extends Authenticatable // Erbt von Authenticatable
|
||||
{
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
protected $table = 'customers';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'shopping_user_id',
|
||||
'member_id',
|
||||
'number',
|
||||
'language',
|
||||
'mode',
|
||||
];
|
||||
|
||||
// Wichtig: Laravel Auth benötigt dies, auch wenn kein Passwort verwendet wird
|
||||
protected $hidden = [
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
public function shoppingUser()
|
||||
{
|
||||
return $this->belongsTo(ShoppingUser::class, 'shopping_user_id');
|
||||
}
|
||||
|
||||
public function member()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'member_id');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue