'string', 'currency_id' => 'string', 'is_deleted' => 'boolean', 'updated_at' => 'timestamp', 'created_at' => 'timestamp', 'deleted_at' => 'timestamp', ]; protected $touches = ['company']; protected $with = [ // 'contacts', ]; public function getEntityType() { return Vendor::class; } public function documents() { return $this->morphMany(Document::class, 'documentable'); } public function assigned_user() { return $this->belongsTo(User::class, 'assigned_user_id', 'id'); } public function contacts() { return $this->hasMany(VendorContact::class)->orderBy('is_primary', 'desc'); } public function activities() { return $this->hasMany(Activity::class); } public function company() { return $this->belongsTo(Company::class); } }