Compare commits
10 Commits
renovate/t
...
8e1c4f46e8
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e1c4f46e8 | |||
|
|
35d9419198 | ||
| d699c043d4 | |||
|
|
63d18fd785 | ||
| 1806f32a7b | |||
|
|
84b6c45706 | ||
| eb2ae19641 | |||
|
|
84799678eb | ||
| 2dbcc8b859 | |||
|
|
db6af9863f |
@@ -136,23 +136,23 @@ class InvoiceValidationResource extends Resource
|
|||||||
->reactive()
|
->reactive()
|
||||||
->readOnly(fn (callable $get) => empty($get('invoice_number')))
|
->readOnly(fn (callable $get) => empty($get('invoice_number')))
|
||||||
->disabled(fn (Get $get) => empty($get('invoice_number')))
|
->disabled(fn (Get $get) => empty($get('invoice_number')))
|
||||||
->extraAttributes([
|
|
||||||
'id' => 'serial_number_input',
|
|
||||||
'x-data' => '{ value: "" }',
|
|
||||||
'x-model' => 'value',
|
|
||||||
'wire:keydown.enter.prevent' => 'processSerial(value)', // Using wire:keydown
|
|
||||||
])
|
|
||||||
// ->dehydrated(false) // Do not trigger Livewire syncing
|
|
||||||
// ->extraAttributes([
|
// ->extraAttributes([
|
||||||
// 'id' => 'serial_number_input',
|
// 'id' => 'serial_number_input',
|
||||||
// 'x-on:keydown.enter.prevent' => "
|
// 'x-data' => '{ value: "" }',
|
||||||
// let serial = \$event.target.value;
|
// 'x-model' => 'value',
|
||||||
// if (serial.trim() != '') {
|
// 'wire:keydown.enter.prevent' => 'processSerial(value)', // Using wire:keydown
|
||||||
// \$wire.dispatch('process-scan', serial);
|
|
||||||
// \$event.target.value = '';
|
|
||||||
// }
|
|
||||||
// ",
|
|
||||||
// ])
|
// ])
|
||||||
|
->dehydrated(false) // Do not trigger Livewire syncing
|
||||||
|
->extraAttributes([
|
||||||
|
'id' => 'serial_number_input',
|
||||||
|
'x-on:keydown.enter.prevent' => "
|
||||||
|
let serial = \$event.target.value;
|
||||||
|
if (serial.trim() != '') {
|
||||||
|
\$wire.dispatch('process-scan', serial);
|
||||||
|
\$event.target.value = '';
|
||||||
|
}
|
||||||
|
",
|
||||||
|
])
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get, callable $livewire) {
|
->afterStateUpdated(function ($state, callable $set, callable $get, callable $livewire) {
|
||||||
$set('update_invoice', 0);
|
$set('update_invoice', 0);
|
||||||
// $this->dispatch('focus-serial-number');
|
// $this->dispatch('focus-serial-number');
|
||||||
|
|||||||
@@ -2261,7 +2261,7 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processSerial($serNo)
|
public function processSer($serNo)
|
||||||
{
|
{
|
||||||
$serNo = trim($serNo);
|
$serNo = trim($serNo);
|
||||||
$mSerNo = $serNo;
|
$mSerNo = $serNo;
|
||||||
@@ -3171,9 +3171,11 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
$mPlantName = $mailData['plant_name'];
|
$mPlantName = $mailData['plant_name'];
|
||||||
$emails = $mailData['emails'];
|
$emails = $mailData['emails'];
|
||||||
|
|
||||||
|
$mUserName = Filament::auth()->user()->name;
|
||||||
|
|
||||||
if (! empty($emails)) {
|
if (! empty($emails)) {
|
||||||
Mail::to($emails)->send(
|
Mail::to($emails)->send(
|
||||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'NotFoundInvoice')
|
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode,$mUserName,'NotFoundInvoice')
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||||
@@ -3379,18 +3381,18 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
->send();
|
->send();
|
||||||
$this->dispatch('playNotificationSound');
|
$this->dispatch('playNotificationSound');
|
||||||
|
|
||||||
$mInvoiceType = 'Serial';
|
// $mInvoiceType = 'Serial';
|
||||||
$mailData = $this->getMail();
|
// $mailData = $this->getMail();
|
||||||
$mPlantName = $mailData['plant_name'];
|
// $mPlantName = $mailData['plant_name'];
|
||||||
$emails = $mailData['emails'];
|
// $emails = $mailData['emails'];
|
||||||
|
|
||||||
if (! empty($emails)) {
|
// if (! empty($emails)) {
|
||||||
Mail::to($emails)->send(
|
// Mail::to($emails)->send(
|
||||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'CompletedSerialInvoice')
|
// new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'CompletedSerialInvoice')
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
// \Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||||
}
|
// }
|
||||||
|
|
||||||
$filename = $invoiceNumber.'.xlsx';
|
$filename = $invoiceNumber.'.xlsx';
|
||||||
$directory = 'uploads/temp';
|
$directory = 'uploads/temp';
|
||||||
@@ -3509,19 +3511,19 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
|
|
||||||
$this->dispatch('playNotificationSound');
|
$this->dispatch('playNotificationSound');
|
||||||
|
|
||||||
$mInvoiceType = 'Serial';
|
// $mInvoiceType = 'Serial';
|
||||||
$mailData = $this->getMail();
|
// $mailData = $this->getMail();
|
||||||
$mPlantName = $mailData['plant_name'];
|
// $mPlantName = $mailData['plant_name'];
|
||||||
$emails = $mailData['emails'];
|
// $emails = $mailData['emails'];
|
||||||
|
|
||||||
if (! empty($emails)) {
|
// if (! empty($emails)) {
|
||||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
// // Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||||
Mail::to($emails)->send(
|
// Mail::to($emails)->send(
|
||||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'CSerialInvoice')
|
// new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'CSerialInvoice')
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
// \Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||||
}
|
// }
|
||||||
|
|
||||||
$filename = $invoiceNumber.'.xlsx';
|
$filename = $invoiceNumber.'.xlsx';
|
||||||
$directory = 'uploads/temp';
|
$directory = 'uploads/temp';
|
||||||
@@ -3582,19 +3584,21 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
|
|
||||||
$this->dispatch('playWarnSound');
|
$this->dispatch('playWarnSound');
|
||||||
|
|
||||||
$mInvoiceType = 'Serial';
|
// $mInvoiceType = 'Serial';
|
||||||
$mailData = $this->getMail();
|
// $mailData = $this->getMail();
|
||||||
$mPlantName = $mailData['plant_name'];
|
// $mPlantName = $mailData['plant_name'];
|
||||||
$emails = $mailData['emails'];
|
// $emails = $mailData['emails'];
|
||||||
|
|
||||||
if (! empty($emails)) {
|
// $mUserName = Filament::auth()->user()->name;
|
||||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
|
||||||
Mail::to($emails)->send(
|
// if (! empty($emails)) {
|
||||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'DuplicateCapacitorQR')
|
// // Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||||
);
|
// Mail::to($emails)->send(
|
||||||
} else {
|
// new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, $mUserName, 'DuplicateCapacitorQR')
|
||||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
// );
|
||||||
}
|
// } else {
|
||||||
|
// \Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||||
|
// }
|
||||||
|
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
'plant_id' => $plantId,
|
'plant_id' => $plantId,
|
||||||
@@ -3719,19 +3723,19 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
|
|
||||||
$this->dispatch('playNotificationSound');
|
$this->dispatch('playNotificationSound');
|
||||||
|
|
||||||
$mInvoiceType = 'Serial';
|
// $mInvoiceType = 'Serial';
|
||||||
$mailData = $this->getMail();
|
// $mailData = $this->getMail();
|
||||||
$mPlantName = $mailData['plant_name'];
|
// $mPlantName = $mailData['plant_name'];
|
||||||
$emails = $mailData['emails'];
|
// $emails = $mailData['emails'];
|
||||||
|
|
||||||
if (! empty($emails)) {
|
// if (! empty($emails)) {
|
||||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
// // Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||||
Mail::to($emails)->send(
|
// Mail::to($emails)->send(
|
||||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'ComSerInv')
|
// new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'ComSerInv')
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
// \Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||||
}
|
// }
|
||||||
|
|
||||||
$filename = $invoiceNumber.'.xlsx';
|
$filename = $invoiceNumber.'.xlsx';
|
||||||
$directory = 'uploads/temp';
|
$directory = 'uploads/temp';
|
||||||
@@ -3765,11 +3769,11 @@ class CreateInvoiceValidation extends CreateRecord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[On('process-scan')]
|
#[On('process-scan')]
|
||||||
// public function processSerial($serial)
|
public function processSerial($serial)
|
||||||
// {
|
{
|
||||||
// $this->processSer($serial); // Your duplicate check + mail logic
|
$this->processSer($serial);
|
||||||
// }
|
}
|
||||||
|
|
||||||
public function getHeading(): string
|
public function getHeading(): string
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,20 +46,20 @@ class InvalidQualityMail extends Mailable
|
|||||||
// dynamic subject based on mail type
|
// dynamic subject based on mail type
|
||||||
switch ($this->mailType) {
|
switch ($this->mailType) {
|
||||||
case 'InvalidPartNumber2':
|
case 'InvalidPartNumber2':
|
||||||
$this->subjectLine = "Invalid Part Number 2 Scanned ({$this->mplantName})";
|
$this->subjectLine = "Quality Part Validation ({$this->mplantName})";
|
||||||
break;
|
break;
|
||||||
case 'InvalidPartNumber3':
|
case 'InvalidPartNumber3':
|
||||||
$this->subjectLine = "Invalid Part Number 3 Scanned ({$this->mplantName})";
|
$this->subjectLine = "Quality Part Validation ({$this->mplantName})";
|
||||||
break;
|
break;
|
||||||
case 'InvalidPartNumber4':
|
case 'InvalidPartNumber4':
|
||||||
$this->subjectLine = "Invalid Part Number 4 Scanned ({$this->mplantName})";
|
$this->subjectLine = "Quality Part Validation ({$this->mplantName})";
|
||||||
break;
|
break;
|
||||||
case 'InvalidPartNumber5':
|
case 'InvalidPartNumber5':
|
||||||
$this->subjectLine = "Invalid Part Number 5 Scanned ({$this->mplantName})";
|
$this->subjectLine = "Quality Part Validation ({$this->mplantName})";
|
||||||
break;
|
break;
|
||||||
case 'InvalidPartNumber':
|
case 'InvalidPartNumber':
|
||||||
default:
|
default:
|
||||||
$this->subjectLine = "Invalid Part Number 1 Scanned ({$this->mplantName})";
|
$this->subjectLine = "Quality Part Validation ({$this->mplantName})";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,12 +82,14 @@ class InvalidSerialMail extends Mailable
|
|||||||
public $greeting;
|
public $greeting;
|
||||||
public $subjectLine;
|
public $subjectLine;
|
||||||
|
|
||||||
|
public $mUserName;
|
||||||
|
|
||||||
public $itemCode;
|
public $itemCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new message instance.
|
* Create a new message instance.
|
||||||
*/
|
*/
|
||||||
public function __construct($serial, $invoiceNumber, $mplantName, $mInvoiceType, $itemCode, $mailType = 'InvalidFormat')
|
public function __construct($serial, $invoiceNumber, $mplantName, $mInvoiceType, $itemCode, $mUserName, $mailType = 'InvalidFormat')
|
||||||
{
|
{
|
||||||
$this->serial = $serial;
|
$this->serial = $serial;
|
||||||
$this->invoiceNumber = $invoiceNumber;
|
$this->invoiceNumber = $invoiceNumber;
|
||||||
@@ -95,6 +97,7 @@ class InvalidSerialMail extends Mailable
|
|||||||
$this->mInvoiceType = $mInvoiceType;
|
$this->mInvoiceType = $mInvoiceType;
|
||||||
$this->mailType = $mailType;
|
$this->mailType = $mailType;
|
||||||
$this->itemCode = $itemCode;
|
$this->itemCode = $itemCode;
|
||||||
|
$this->mUserName = $mUserName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,15 +113,18 @@ class InvalidSerialMail extends Mailable
|
|||||||
case 'DuplicateCapacitorQR':
|
case 'DuplicateCapacitorQR':
|
||||||
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
||||||
break;
|
break;
|
||||||
case 'CompletedSerialInvoice':
|
case 'InvalidPanelBox':
|
||||||
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
|
||||||
break;
|
|
||||||
case 'CSerialInvoice':
|
|
||||||
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
|
||||||
break;
|
|
||||||
case 'ComSerInv':
|
|
||||||
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
||||||
break;
|
break;
|
||||||
|
// case 'CompletedSerialInvoice':
|
||||||
|
// $this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
||||||
|
// break;
|
||||||
|
// case 'CSerialInvoice':
|
||||||
|
// $this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
||||||
|
// break;
|
||||||
|
// case 'ComSerInv':
|
||||||
|
// $this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
||||||
|
// break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
@@ -141,48 +147,20 @@ class InvalidSerialMail extends Mailable
|
|||||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||||
|
<b>Employee Code:</b> {$this->mUserName}<br>
|
||||||
";
|
";
|
||||||
break;
|
break;
|
||||||
case 'DuplicateCapacitorQR':
|
// case 'DuplicateCapacitorQR':
|
||||||
$this->greeting = "
|
// $this->greeting = "
|
||||||
Dear Sir/Madam,<br><br>
|
// Dear Sir/Madam,<br><br>
|
||||||
The scanned <b>Capacitor</b> serial number has already completed the scanning process.<br><br>
|
// The scanned <b>Capacitor</b> serial number has already completed the scanning process.<br><br>
|
||||||
<b>Plant:</b> {$this->mplantName}<br>
|
// <b>Plant:</b> {$this->mplantName}<br>
|
||||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
// <b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
// <b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
// <b>Scanned QR Code:</b> {$this->serial}<br>
|
||||||
";
|
// <b>Employee Code:</b> {$this->mUserName}<br>
|
||||||
break;
|
// ";
|
||||||
case 'CompletedSerialInvoice':
|
// break;
|
||||||
$this->greeting = "
|
|
||||||
Dear Sir/Madam,<br><br>
|
|
||||||
Serial invoice <b>'{$this->invoiceNumber}'</b> completed the scanning process.<br>
|
|
||||||
<b>Plant:</b> {$this->mplantName}<br>
|
|
||||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
|
||||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
|
||||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
|
||||||
";
|
|
||||||
break;
|
|
||||||
case 'CSerialInvoice':
|
|
||||||
$this->greeting = "
|
|
||||||
Dear Sir/Madam,<br><br>
|
|
||||||
Serial invoice <b>'{$this->invoiceNumber}'</b> completed the scanning process.<br>
|
|
||||||
<b>Plant:</b> {$this->mplantName}<br>
|
|
||||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
|
||||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
|
||||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
|
||||||
";
|
|
||||||
break;
|
|
||||||
case 'ComSerInv':
|
|
||||||
$this->greeting = "
|
|
||||||
Dear Sir/Madam,<br><br>
|
|
||||||
Serial invoice <b>'{$this->invoiceNumber}'</b> completed the scanning process.<br>
|
|
||||||
<b>Plant:</b> {$this->mplantName}<br>
|
|
||||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
|
||||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
|
||||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
|
||||||
";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Content(
|
return new Content(
|
||||||
|
|||||||
47
app/Models/CharacteristicValue.php
Normal file
47
app/Models/CharacteristicValue.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
|
class CharacteristicValue extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'plant_id',
|
||||||
|
'line_id',
|
||||||
|
'item_id',
|
||||||
|
'machine_id',
|
||||||
|
'process_order',
|
||||||
|
'coil_number',
|
||||||
|
'status',
|
||||||
|
'created_at',
|
||||||
|
'updated_at',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function plant(): BelongsTo
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Plant::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function line(): BelongsTo
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Line::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function item(): BelongsTo
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Item::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function machine(): BelongsTo
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Machine::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$sql = <<<'SQL'
|
||||||
|
CREATE TABLE characteristic_values (
|
||||||
|
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
|
||||||
|
plant_id BIGINT NOT NULL,
|
||||||
|
line_id BIGINT NOT NULL,
|
||||||
|
item_id BIGINT NOT NULL,
|
||||||
|
machine_id BIGINT NOT NULL,
|
||||||
|
|
||||||
|
process_order TEXT DEFAULT NULL,
|
||||||
|
coil_number TEXT DEFAULT NULL,
|
||||||
|
status TEXT DEFAULT NULL,
|
||||||
|
|
||||||
|
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||||
|
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||||
|
created_by TEXT DEFAULT NULL,
|
||||||
|
updated_by TEXT DEFAULT NULL,
|
||||||
|
deleted_at TIMESTAMP,
|
||||||
|
|
||||||
|
FOREIGN KEY (plant_id) REFERENCES plants (id),
|
||||||
|
FOREIGN KEY (line_id) REFERENCES lines (id),
|
||||||
|
FOREIGN KEY (item_id) REFERENCES items (id),
|
||||||
|
FOREIGN KEY (machine_id) REFERENCES machines (id)
|
||||||
|
);
|
||||||
|
SQL;
|
||||||
|
DB::statement($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('characteristic_values');
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user