44 lines
903 B
PHP
44 lines
903 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\WindDirection;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MeteorologicalMonitoringLog extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $attributes = [
|
|
'is_filled' => false,
|
|
];
|
|
|
|
protected $casts = [
|
|
'wind_direction' => WindDirection::class,
|
|
'monitored_at' => 'datetime',
|
|
'is_filled' => 'bool',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'device_id',
|
|
'agricultural_base_id',
|
|
'wind_speed',
|
|
'wind_power',
|
|
'wind_direction',
|
|
'wind_degree',
|
|
'air_humidity',
|
|
'air_temperature',
|
|
'air_pressure',
|
|
'co2',
|
|
'noise',
|
|
'illumination',
|
|
'accumulated_rainfall',
|
|
'current_rainfall',
|
|
'moment_rainfall',
|
|
'pm25',
|
|
'pm10',
|
|
'monitored_at',
|
|
];
|
|
}
|