mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 01:17:30 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			49 lines
		
	
	
		
			937 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			937 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/**
 | 
						|
 * Invoice Ninja (https://invoiceninja.com)
 | 
						|
 *
 | 
						|
 * @link https://github.com/invoiceninja/invoiceninja source repository
 | 
						|
 *
 | 
						|
 * @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
 | 
						|
 *
 | 
						|
 * @license https://opensource.org/licenses/AAL
 | 
						|
 */
 | 
						|
 | 
						|
namespace App\Models;
 | 
						|
 | 
						|
use App\Utils\Traits\MakesHash;
 | 
						|
use Illuminate\Database\Eloquent\Model;
 | 
						|
 | 
						|
class Task extends BaseModel
 | 
						|
{
 | 
						|
    use MakesHash;
 | 
						|
    
 | 
						|
    protected $fillable = [
 | 
						|
		'client_id',
 | 
						|
        'invoice_id',
 | 
						|
        'custom_value1',
 | 
						|
        'custom_value2',
 | 
						|
        'description',
 | 
						|
        'is_running',
 | 
						|
        'time_log',
 | 
						|
	];
 | 
						|
 | 
						|
    protected $appends = ['task_id'];
 | 
						|
 | 
						|
    public function getRouteKeyName()
 | 
						|
    {
 | 
						|
        return 'task_id';
 | 
						|
    }
 | 
						|
 | 
						|
    public function getTaskIdAttribute()
 | 
						|
    {
 | 
						|
        return $this->encodePrimaryKey($this->id);
 | 
						|
    }
 | 
						|
 | 
						|
    public function documents()
 | 
						|
    {
 | 
						|
        return $this->morphMany(Document::class, 'documentable');
 | 
						|
    }
 | 
						|
 | 
						|
}
 |