mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:51:07 +03:30
29 lines
544 B
PHP
29 lines
544 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Transfer extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
public $fillable = [ 'user_id' , 'to_date' , 'from_date' , 'status' , 'user_transfer_id' ];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo( 'App\User' );
|
|
}
|
|
|
|
public function userTransfer()
|
|
{
|
|
return $this->belongsTo( 'App\User', 'user_transfer_id' );
|
|
}
|
|
|
|
public function transferable()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
}
|