ranjith-dev #1602
@@ -243,6 +243,30 @@ class CncMonitorDataResource extends Resource
|
||||
->alignCenter()
|
||||
->numeric()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('coolant_motor_on')
|
||||
->label('Coolant Motor On')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('tool_cut_dist_x_mm')
|
||||
->label('Tool Cut Dist X mm')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('tool_cut_dist_z_mm')
|
||||
->label('Tool Cut Dist Z mm')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('tool_cut_dist_mm')
|
||||
->label('Tool Cut Dist mm')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('tool_cut_time_s')
|
||||
->label('Total Cut Time S')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('insert_life_used_pct')
|
||||
->label('Insert Life Used PCT')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->label('Created At')
|
||||
->alignCenter()
|
||||
|
||||
@@ -40,6 +40,12 @@ class CncMonitorData extends Model
|
||||
'total_idle_s',
|
||||
'total_alarm_s',
|
||||
'program_name',
|
||||
'coolant_motor_on',
|
||||
'tool_cut_dist_x_mm',
|
||||
'tool_cut_dist_z_mm',
|
||||
'tool_cut_dist_mm',
|
||||
'tool_cut_time_s',
|
||||
'insert_life_used_pct',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'scanned_at',
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<?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
|
||||
{
|
||||
$sql1 = <<<'SQL'
|
||||
ALTER TABLE cnc_monitor_data
|
||||
ADD COLUMN coolant_motor_on TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql1);
|
||||
|
||||
$sql2 = <<<'SQL'
|
||||
ALTER TABLE cnc_monitor_data
|
||||
ADD COLUMN tool_cut_dist_x_mm TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql2);
|
||||
|
||||
$sql3 = <<<'SQL'
|
||||
ALTER TABLE cnc_monitor_data
|
||||
ADD COLUMN tool_cut_dist_z_mm TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql3);
|
||||
|
||||
$sql4 = <<<'SQL'
|
||||
ALTER TABLE cnc_monitor_data
|
||||
ADD COLUMN tool_cut_dist_mm TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql4);
|
||||
|
||||
$sql5 = <<<'SQL'
|
||||
ALTER TABLE cnc_monitor_data
|
||||
ADD COLUMN tool_cut_time_s TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql5);
|
||||
|
||||
$sql6 = <<<'SQL'
|
||||
ALTER TABLE cnc_monitor_data
|
||||
ADD COLUMN insert_life_used_pct TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
// Schema::table('cnc_monitor_data', function (Blueprint $table) {
|
||||
// //
|
||||
// });
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user