Update
parent
49df94fd0b
commit
31f0c0a88b
|
|
@ -15,6 +15,7 @@ class InsecticidalLampReport extends Model
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'device_id',
|
'device_id',
|
||||||
|
'agricultural_base_id',
|
||||||
'battery_vol',
|
'battery_vol',
|
||||||
'killed_num',
|
'killed_num',
|
||||||
'air_temperature',
|
'air_temperature',
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ class BiAngDeviceLogService
|
||||||
'device_id' => $device->id,
|
'device_id' => $device->id,
|
||||||
'reported_at' => $syncTime->startOfHour(),
|
'reported_at' => $syncTime->startOfHour(),
|
||||||
], [
|
], [
|
||||||
|
'agricultural_base_id' => $device->agricultural_base_id,
|
||||||
'battery_vol' => $data['vol'],
|
'battery_vol' => $data['vol'],
|
||||||
'killed_num' => $data['dct'],
|
'killed_num' => $data['dct'],
|
||||||
'air_temperature' => $data['temp'],
|
'air_temperature' => $data['temp'],
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ return new class extends Migration
|
||||||
Schema::create('insecticidal_lamp_reports', function (Blueprint $table) {
|
Schema::create('insecticidal_lamp_reports', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->unsignedBigInteger('device_id');
|
$table->unsignedBigInteger('device_id');
|
||||||
|
$table->unsignedBigInteger('agricultural_base_id')->comment('农业基地ID');
|
||||||
$table->double('battery_vol')->nullable()->comment('蓄电池电压');
|
$table->double('battery_vol')->nullable()->comment('蓄电池电压');
|
||||||
$table->unsignedInteger('killed_num')->default(0)->comment('杀虫树');
|
$table->unsignedInteger('killed_num')->default(0)->comment('杀虫树');
|
||||||
$table->double('air_temperature')->nullable()->comment('大气气温');
|
$table->double('air_temperature')->nullable()->comment('大气气温');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue