1
0
Fork 0
internet-everythings-agricu.../app/Models/MeteorologicalDailyReport.php

46 lines
1.0 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class MeteorologicalDailyReport extends Model
{
use HasFactory;
const WIND_DIRECTION_NORTH = 0;
const WIND_DIRECTION_NORTHEAST = 1;
const WIND_DIRECTION_EAST = 2;
const WIND_DIRECTION_SOUTHEAST = 3;
const WIND_DIRECTION_SOUTH = 4;
const WIND_DIRECTION_SOUTHWEST = 5;
const WIND_DIRECTION_WEST = 6;
const WIND_DIRECTION_NORTHWEST = 7;
protected $casts = [
'reported_at' => 'date'
];
protected $fillable = [
'device_id',
'today_rainfall',
'yesterday_rainfall',
'accumulate_rainfall',
'moment_rainfall',
'pm10',
'pm25',
'box_illumination',
'box_pressure',
'box_co2',
'box_temperature',
'box_humidity',
'box_noise',
'wind_degree',
'wind_direction',
'wind_power',
'wind_speed',
'reported_at',
];
}