refactor: create models, factories, and seeders for Company, Internship, InternshipStatus, and StudentData

This commit is contained in:
2025-10-21 12:25:54 +02:00
parent b4f98718e6
commit e3c7bd3a5a
18 changed files with 579 additions and 3 deletions

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use App\Models\Company;
use Illuminate\Http\Request;
class CompanyController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(Company $company)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Company $company)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Company $company)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Company $company)
{
//
}
}

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use App\Models\Internship;
use Illuminate\Http\Request;
class InternshipController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(Internship $internship)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Internship $internship)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Internship $internship)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Internship $internship)
{
//
}
}

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use App\Models\InternshipStatus;
use Illuminate\Http\Request;
class InternshipStatusController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(InternshipStatus $internshipStatus)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(InternshipStatus $internshipStatus)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, InternshipStatus $internshipStatus)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(InternshipStatus $internshipStatus)
{
//
}
}

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use App\Models\StudentData;
use Illuminate\Http\Request;
class StudentDataController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(StudentData $studentData)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(StudentData $studentData)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, StudentData $studentData)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(StudentData $studentData)
{
//
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Company extends Model
{
/** @use HasFactory<\Database\Factories\CompanyFactory> */
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'address',
'ico',
'contact',
'hiring'
];
}

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Internship extends Model
{
/** @use HasFactory<\Database\Factories\InternshipFactory> */
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'user_id',
'company_id',
'start',
'end',
'year_of_study',
'semester',
'position_description',
'agreement',
];
}

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class InternshipStatus extends Model
{
/** @use HasFactory<\Database\Factories\InternshipStatusFactory> */
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'internship_id',
'status',
'changed',
'note',
'modified_by'
];
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class StudentData extends Model
{
/** @use HasFactory<\Database\Factories\StudentDataFactory> */
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'user_id',
'address',
'personal_email',
'study_field',
];
}