Merge branch 'feature/80-Odstránenie-účtu-používateľa-garantom-' into develop

This commit is contained in:
dkecskes
2025-11-04 10:03:35 +01:00
10 changed files with 498 additions and 8 deletions
+16
View File
@@ -22,4 +22,20 @@ class Company extends Model
'contact',
'hiring'
];
/**
* Get the internships for the company.
*/
public function internships()
{
return $this->hasMany(Internship::class, 'company_id');
}
/**
* Get the contact person (user) for the company.
*/
public function contactPerson()
{
return $this->belongsTo(User::class, 'contact');
}
}
+8
View File
@@ -57,4 +57,12 @@ class User extends Authenticatable
{
return $this->hasOne(StudentData::class, 'user_id');
}
/**
* Get the internships for the user.
*/
public function internships()
{
return $this->hasMany(Internship::class, 'user_id');
}
}