Proje dosyaları eklendi
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class EarnTaskResult extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* Sonucun sunucu tarafından doğrulanmış görev atamasını döndürür.
|
||||
*
|
||||
* @author Gökhan Engin - İletişim : https://bit.ly/YazılımUzmanı
|
||||
*/
|
||||
public function assignment(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(EarnTaskAssignment::class, 'earn_task_assignment_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Sonucun ait olduğu normal müşteri kullanıcısını 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sonuç alanlarını güvenli PHP türlerine dönüştürür.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*
|
||||
* @author Gökhan Engin - İletişim : https://bit.ly/YazılımUzmanı
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['completed' => 'boolean', 'submitted_at' => 'datetime'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user