Import Fun Completed and Sticker Master
This commit is contained in:
@@ -12,8 +12,6 @@ class Item extends Model
|
||||
|
||||
protected $fillable = [
|
||||
"plant_id",
|
||||
"block_id",
|
||||
"line_id",
|
||||
'code',
|
||||
'description',
|
||||
'hourly_quantity',
|
||||
@@ -23,14 +21,4 @@ class Item extends Model
|
||||
{
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function block(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Block::class);
|
||||
}
|
||||
|
||||
public function line(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Line::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,30 +13,12 @@ class Line extends Model
|
||||
|
||||
protected $fillable = [
|
||||
"plant_id",
|
||||
"block_id",
|
||||
"shift_id",
|
||||
"name",
|
||||
"type",
|
||||
];
|
||||
|
||||
|
||||
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_stops(): HasMany
|
||||
{
|
||||
return $this->hasMany(LineStop::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,26 +11,7 @@ class LineStop extends Model
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
"plant_id",
|
||||
"block_id",
|
||||
"shift_id",
|
||||
"code",
|
||||
"reason",
|
||||
];
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,9 @@ class Plant extends Model
|
||||
{
|
||||
return $this->hasMany(Line::class);
|
||||
}
|
||||
|
||||
public function getLineNames()
|
||||
{
|
||||
return $this->hasMany(Line::class, 'plant_id', 'id'); // Ensure 'plant_id' is the foreign key in 'lines' table
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,9 @@ class ProductionLineStop extends Model
|
||||
|
||||
protected $fillable = [
|
||||
"plant_id",
|
||||
"block_id",
|
||||
"shift_id",
|
||||
"line_id",
|
||||
"lineStop_id",
|
||||
"linestop_id",
|
||||
"from_datetime",
|
||||
"to_datetime",
|
||||
"stop_hour",
|
||||
@@ -27,11 +26,6 @@ class ProductionLineStop extends Model
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function block(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Block::class);
|
||||
}
|
||||
|
||||
public function shift(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Shift::class);
|
||||
|
||||
@@ -12,7 +12,6 @@ class ProductionQuantity extends Model
|
||||
|
||||
protected $fillable = [
|
||||
"plant_id",
|
||||
"block_id",
|
||||
"shift_id",
|
||||
"line_id",
|
||||
"item_id",
|
||||
@@ -24,11 +23,6 @@ class ProductionQuantity extends Model
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function block(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Block::class);
|
||||
}
|
||||
|
||||
public function shift(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Shift::class);
|
||||
|
||||
51
app/Models/QualityValidation.php
Normal file
51
app/Models/QualityValidation.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class QualityValidation extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'item_id',
|
||||
'plant_id',
|
||||
'stickermaster_id ',
|
||||
'serial_number_motor',
|
||||
'serial_number_pump',
|
||||
'serial_number_pumpset',
|
||||
'pack_slip_motor',
|
||||
'pack_slip_pump',
|
||||
'pack_slip_pumpset',
|
||||
'name_plate_motor',
|
||||
'name_plate_pump',
|
||||
'name_plate_pumpset',
|
||||
'tube_sticker_motor',
|
||||
'tube_sticker_pump',
|
||||
'tube_sticker_pumpset',
|
||||
'warranty_card',
|
||||
'part_validation1',
|
||||
'part_validation2',
|
||||
'part_validation3',
|
||||
'part_validation4',
|
||||
'part_validation5',
|
||||
];
|
||||
|
||||
public function item(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Item::class);
|
||||
}
|
||||
|
||||
public function plant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function stickermaster(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(StickerMaster::class);
|
||||
}
|
||||
}
|
||||
46
app/Models/StickerMaster.php
Normal file
46
app/Models/StickerMaster.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class StickerMaster extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'item_id',
|
||||
'plant_id',
|
||||
'serial_number_motor',
|
||||
'serial_number_pump',
|
||||
'serial_number_pumpset',
|
||||
'pack_slip_motor',
|
||||
'pack_slip_pump',
|
||||
'pack_slip_pumpset',
|
||||
'name_plate_motor',
|
||||
'name_plate_pump',
|
||||
'name_plate_pumpset',
|
||||
'tube_sticker_motor',
|
||||
'tube_sticker_pump',
|
||||
'tube_sticker_pumpset',
|
||||
'warranty_card',
|
||||
'part_validation1',
|
||||
'part_validation2',
|
||||
'part_validation3',
|
||||
'part_validation4',
|
||||
'part_validation5',
|
||||
];
|
||||
|
||||
public function item(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Item::class);
|
||||
}
|
||||
|
||||
public function plant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user