mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 20:07:31 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			77 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			77 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Models;
 | 
						|
 | 
						|
use App\Models\Filterable;
 | 
						|
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
						|
use Laracasts\Presenter\PresentableTrait;
 | 
						|
 | 
						|
/**
 | 
						|
 * Class Project.
 | 
						|
 */
 | 
						|
class Project extends BaseModel
 | 
						|
{
 | 
						|
    // Expense Categories
 | 
						|
    use SoftDeletes;
 | 
						|
    use PresentableTrait;
 | 
						|
    use Filterable;
 | 
						|
    
 | 
						|
    /**
 | 
						|
     * @var array
 | 
						|
     */
 | 
						|
    protected $dates = ['deleted_at'];
 | 
						|
 | 
						|
    /**
 | 
						|
     * @var array
 | 
						|
     */
 | 
						|
    protected $fillable = [
 | 
						|
        'name',
 | 
						|
        'client_id',
 | 
						|
        'task_rate',
 | 
						|
        'private_notes',
 | 
						|
        'public_notes',
 | 
						|
        'due_date',
 | 
						|
        'budgeted_hours',
 | 
						|
        'custom_value1',
 | 
						|
        'custom_value2',
 | 
						|
        'custom_value3',
 | 
						|
        'custom_value4',
 | 
						|
    ];
 | 
						|
 | 
						|
    public function getEntityType()
 | 
						|
    {
 | 
						|
        return self::class;
 | 
						|
    }
 | 
						|
 | 
						|
    protected $touches = [];
 | 
						|
 | 
						|
    /**
 | 
						|
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
 | 
						|
     */
 | 
						|
    public function company()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(Company::class);
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * @return mixed
 | 
						|
     */
 | 
						|
    public function client()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(Client::class)->withTrashed();
 | 
						|
    }
 | 
						|
 | 
						|
    public function documents()
 | 
						|
    {
 | 
						|
        return $this->morphMany(Document::class, 'documentable');
 | 
						|
    }
 | 
						|
 | 
						|
    // /**
 | 
						|
    //  * @return \Illuminate\Database\Eloquent\Relations\HasMany
 | 
						|
    //  */
 | 
						|
    // public function tasks()
 | 
						|
    // {
 | 
						|
    //     return $this->hasMany('App\Models\Task');
 | 
						|
    // }
 | 
						|
}
 |