Initial commit for new repo
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m4s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m4s
This commit is contained in:
62
app/Models/StickerMaster.php
Normal file
62
app/Models/StickerMaster.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?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',
|
||||
'panel_box_code',
|
||||
'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',
|
||||
'laser_part_validation1',
|
||||
'laser_part_validation2',
|
||||
'load_rate',
|
||||
'bundle_quantity',
|
||||
'material_type',
|
||||
];
|
||||
|
||||
public function item()
|
||||
{
|
||||
return $this->belongsTo(Item::class, 'item_id', 'id');
|
||||
// return $this->belongsTo(Item::class);
|
||||
}
|
||||
|
||||
public function plant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Plant::class);
|
||||
}
|
||||
|
||||
public function qualityValidations()
|
||||
{
|
||||
return $this->hasMany(QualityValidation::class, 'sticker_master_id');
|
||||
}
|
||||
|
||||
public function invoiceValidations()
|
||||
{
|
||||
return $this->hasMany(InvoiceValidation::class, 'sticker_master_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user