Compare commits

..

No commits in common. "8247f78cf41704ef4779b06b47876ecaecd5d508" and "6bcee28d8fce42e7e84be8b4919cb6dd71b885d2" have entirely different histories.

6 changed files with 0 additions and 84 deletions

View File

@ -74,10 +74,6 @@ class SoilMonitoringLogFixCommand extends Command
}
}
if ($log->isDirty()) {
$log->is_filled = true;
}
$log->save();
if ($log->wasChanged()) {

View File

@ -74,10 +74,6 @@ class WaterQualityMonitoringLogFixCommand extends Command
}
}
if ($log->isDirty()) {
$log->is_filled = true;
}
$log->save();
if ($log->wasChanged()) {

View File

@ -9,13 +9,8 @@ class SoilMonitoringLog extends Model
{
use HasFactory;
protected $attributes = [
'is_filled' => false,
];
protected $casts = [
'monitored_at' => 'datetime',
'is_filled' => 'bool',
];
protected $fillable = [
@ -28,6 +23,5 @@ class SoilMonitoringLog extends Model
'p',
'k',
'monitored_at',
'is_filled',
];
}

View File

@ -9,13 +9,8 @@ class WaterQualityMonitoringLog extends Model
{
use HasFactory;
protected $attributes = [
'is_filled' => false,
];
protected $casts = [
'monitored_at' => 'datetime',
'is_filled' => 'bool',
];
protected $fillable = [
@ -28,6 +23,5 @@ class WaterQualityMonitoringLog extends Model
'temperature',
'turbidity',
'monitored_at',
'is_filled',
];
}

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('soil_monitoring_logs', function (Blueprint $table) {
$table->boolean('is_filled')->default(false)->comment('是否是填充数据');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('soil_monitoring_logs', function (Blueprint $table) {
$table->dropColumn(['is_filled']);
});
}
};

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('water_quality_monitoring_logs', function (Blueprint $table) {
$table->boolean('is_filled')->default(false)->comment('是否是填充数据');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('water_quality_monitoring_logs', function (Blueprint $table) {
$table->dropColumn(['is_filled']);
});
}
};