first commit
This commit is contained in:
0
Modules/Training/app/Models/.gitkeep
Normal file
0
Modules/Training/app/Models/.gitkeep
Normal file
36
Modules/Training/app/Models/Trainer.php
Normal file
36
Modules/Training/app/Models/Trainer.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Training\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Training\Database\factories\TrainerFactory;
|
||||
|
||||
class Trainer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_trainers';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['first_name',
|
||||
'middle_name',
|
||||
'last_name',
|
||||
'phone',
|
||||
'email',
|
||||
'address',
|
||||
'shift',
|
||||
'salary',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'status',
|
||||
'remarks',
|
||||
];
|
||||
|
||||
protected static function newFactory(): TrainerFactory
|
||||
{
|
||||
//return TrainerFactory::new();
|
||||
}
|
||||
}
|
53
Modules/Training/app/Models/TrainingList.php
Normal file
53
Modules/Training/app/Models/TrainingList.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Training\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Admin\Models\Department;
|
||||
use Modules\Employee\Models\Employee;
|
||||
use Modules\Training\Database\factories\TrainingListFactory;
|
||||
|
||||
class TrainingList extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'tbl_training_lists';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'training_by',
|
||||
'trainer_id',
|
||||
'assigned_id',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'department_id',
|
||||
'shift',
|
||||
'status',
|
||||
'remarks',
|
||||
];
|
||||
|
||||
protected static function newFactory(): TrainingListFactory
|
||||
{
|
||||
//return TrainingListFactory::new();
|
||||
}
|
||||
|
||||
public function employee()
|
||||
{
|
||||
return $this->belongsTo(Employee::class, 'assigned_id');
|
||||
}
|
||||
|
||||
public function trainer()
|
||||
{
|
||||
return $this->belongsTo(Trainer::class,'trainer_id');
|
||||
}
|
||||
|
||||
public function department()
|
||||
{
|
||||
return $this->belongsTo(Department::class,'department_id');
|
||||
}
|
||||
|
||||
|
||||
}
|
26
Modules/Training/app/Models/TrainingType.php
Normal file
26
Modules/Training/app/Models/TrainingType.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Training\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Training\Database\factories\TrainingTypeFactory;
|
||||
|
||||
class TrainingType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'tbl_training_types';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'training_type',
|
||||
'status',
|
||||
'remarks',
|
||||
];
|
||||
|
||||
protected static function newFactory(): TrainingTypeFactory
|
||||
{
|
||||
//return TrainingTypeFactory::new();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user