mivita/dev/app-bak/Models/ShoppingUserMemberLog.php
2025-10-20 17:42:08 +02:00

69 lines
2 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use App\User;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class ShoppingUserMemberLog
*
* @property int $id
* @property int $pre_member_id
* @property int $shopping_user_id
* @property int $new_member_id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property User $user
* @property ShoppingUser $shopping_user
* @package App\Models
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog query()
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog whereNewMemberId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog wherePreMemberId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog whereShoppingUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUserMemberLog whereUpdatedAt($value)
* @property-read User $new_member
* @property-read User $pre_member
* @mixin \Eloquent
*/
class ShoppingUserMemberLog extends Model
{
protected $table = 'shopping_user_member_logs';
protected $casts = [
'pre_member_id' => 'int',
'shopping_user_id' => 'int',
'new_member_id' => 'int'
];
protected $fillable = [
'pre_member_id',
'shopping_user_id',
'new_member_id'
];
public function pre_member()
{
return $this->belongsTo(User::class, 'pre_member_id');
}
public function new_member()
{
return $this->belongsTo(User::class, 'new_member_id');
}
public function shopping_user()
{
return $this->belongsTo(ShoppingUser::class);
}
}