Added model file for work group masters
This commit is contained in:
32
app/Models/WorkGroupMaster.php
Normal file
32
app/Models/WorkGroupMaster.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
|
class WorkGroupMaster extends Model
|
||||||
|
{
|
||||||
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'plant_id',
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'operation_number',
|
||||||
|
'created_at',
|
||||||
|
'updated_at',
|
||||||
|
'created_by',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function plant(): BelongsTo
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Plant::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// public function rejectReasons()
|
||||||
|
// {
|
||||||
|
// return $this->hasMany(RejectReason::class, 'work_group_master_id', 'id');
|
||||||
|
// }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user