Masters and Transaction changes
This commit is contained in:
50
app/Models/ProductionLineStop.php
Normal file
50
app/Models/ProductionLineStop.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ProductionLineStop extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
"plant_id",
|
||||
"block_id",
|
||||
"shift_id",
|
||||
"line_id",
|
||||
"code_id",
|
||||
"reason",
|
||||
"from_datetime",
|
||||
"to_datetime",
|
||||
"stop_hour",
|
||||
"stop_min",
|
||||
];
|
||||
|
||||
public function plant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function block(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Block::class);
|
||||
}
|
||||
|
||||
public function shift(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Shift::class);
|
||||
}
|
||||
|
||||
public function line(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Line::class);
|
||||
}
|
||||
|
||||
public function linestop(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(LineStop::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user