33 lines
772 B
PHP
33 lines
772 B
PHP
<?php
|
||
|
||
namespace App\Models;
|
||
|
||
use Illuminate\Database\Eloquent\Model;
|
||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||
|
||
class EarnTaskAssignment extends Model
|
||
{
|
||
protected $guarded = [];
|
||
|
||
/**
|
||
* Atamanın gerçek müşteri sahibini döndürür.
|
||
*
|
||
* @author Gökhan Engin - İletişim : https://bit.ly/YazılımUzmanı
|
||
*/
|
||
public function user(): BelongsTo
|
||
{
|
||
return $this->belongsTo(User::class);
|
||
}
|
||
|
||
/**
|
||
* Atama için kabul edilmiş tek idempotent sonucu döndürür.
|
||
*
|
||
* @author Gökhan Engin - İletişim : https://bit.ly/YazılımUzmanı
|
||
*/
|
||
public function result(): HasOne
|
||
{
|
||
return $this->hasOne(EarnTaskResult::class);
|
||
}
|
||
}
|