mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 07:17:35 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			71 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Models;
 | 
						|
 | 
						|
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
						|
use Laracasts\Presenter\PresentableTrait;
 | 
						|
 | 
						|
/**
 | 
						|
 * Class Project.
 | 
						|
 */
 | 
						|
class Project extends BaseModel
 | 
						|
{
 | 
						|
    // Expense Categories
 | 
						|
    use SoftDeletes;
 | 
						|
    use PresentableTrait;
 | 
						|
 | 
						|
    /**
 | 
						|
     * @var array
 | 
						|
     */
 | 
						|
    protected $dates = ['deleted_at'];
 | 
						|
 | 
						|
    /**
 | 
						|
     * @var array
 | 
						|
     */
 | 
						|
    protected $fillable = [
 | 
						|
        'name',
 | 
						|
        'task_rate',
 | 
						|
        'private_notes',
 | 
						|
        'due_date',
 | 
						|
        'budgeted_hours',
 | 
						|
        'custom_value1',
 | 
						|
        'custom_value2',
 | 
						|
    ];
 | 
						|
    
 | 
						|
    protected $casts = [
 | 
						|
        'updated_at' => 'timestamp',
 | 
						|
        'created_at' => 'timestamp',
 | 
						|
    ];
 | 
						|
 | 
						|
    public function getEntityType()
 | 
						|
    {
 | 
						|
        return Project::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();
 | 
						|
    }
 | 
						|
 | 
						|
    // /**
 | 
						|
    //  * @return \Illuminate\Database\Eloquent\Relations\HasMany
 | 
						|
    //  */
 | 
						|
    // public function tasks()
 | 
						|
    // {
 | 
						|
    //     return $this->hasMany('App\Models\Task');
 | 
						|
    // }
 | 
						|
}
 |