68 lines
1.9 KiB
PHP
68 lines
1.9 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use App\User;
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class UserCleanUp
|
|
*
|
|
* @property int $id
|
|
* @property int $inactive_sponsor_id
|
|
* @property int $child_user_id
|
|
* @property int $new_sponsor_id
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property User $user
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog whereChildUserId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog whereInactiveSponsorId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog whereNewSponsorId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCleanUpLog whereUpdatedAt($value)
|
|
* @property-read User $child_user
|
|
* @property-read User $inactive_sponsor
|
|
* @property-read User $new_sponsor
|
|
* @mixin \Eloquent
|
|
*/
|
|
class UserCleanUpLog extends Model
|
|
{
|
|
protected $table = 'user_clean_up_logs';
|
|
|
|
protected $casts = [
|
|
'inactive_sponsor_id' => 'int',
|
|
'child_user_id' => 'int',
|
|
'new_sponsor_id' => 'int'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'inactive_sponsor_id',
|
|
'child_user_id',
|
|
'new_sponsor_id'
|
|
];
|
|
|
|
public function inactive_sponsor()
|
|
{
|
|
return $this->belongsTo(User::class, 'inactive_sponsor_id');
|
|
}
|
|
|
|
public function child_user()
|
|
{
|
|
return $this->belongsTo(User::class, 'child_user_id');
|
|
}
|
|
|
|
public function new_sponsor()
|
|
{
|
|
return $this->belongsTo(User::class, 'new_sponsor_id');
|
|
}
|
|
}
|