Files
trafficpumper/app/Models/EarnTaskResult.php
T
2026-08-29 15:53:53 +03:00

44 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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'];
}
}