$documents * @property-read \Illuminate\Database\Eloquent\Collection $tasks * @mixin \Eloquent */ class Project extends BaseModel { use SoftDeletes; use PresentableTrait; use Filterable; protected $fillable = [ 'name', 'client_id', 'task_rate', 'private_notes', 'public_notes', 'due_date', 'budgeted_hours', 'custom_value1', 'custom_value2', 'custom_value3', 'custom_value4', 'assigned_user_id', 'color', 'number', ]; protected $with = [ 'documents', ]; public function getEntityType() { return self::class; } protected $touches = []; public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Company::class); } public function client(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Client::class)->withTrashed(); } public function vendor(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Vendor::class)->withTrashed(); } public function project(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(self::class)->withTrashed(); } public function documents() { return $this->morphMany(Document::class, 'documentable'); } public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withTrashed(); } public function assigned_user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed(); } public function tasks(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Task::class); } public function expenses(): HasMany { return $this->hasMany(Expense::class); } public function invoices(): HasMany { return $this->hasMany(Invoice::class)->withTrashed(); } public function quotes(): HasMany { return $this->hasMany(Quote::class); } public function translate_entity() { return ctrans('texts.project'); } }