DeviceType.php 893 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. class DeviceType extends Model
  5. {
  6. protected $table = "device_type"; //指定表
  7. const CREATED_AT = 'crt_time';
  8. const UPDATED_AT = 'upd_time';
  9. protected $dateFormat = 'U';
  10. const type_one = 1;
  11. const type_two = 2;
  12. const type_three = 3;
  13. const type_four = 4;
  14. const temperature_normal = '温度';
  15. const temperature_abnormal = '温度异常';
  16. const humidity_normal = '湿度';
  17. const humidity_abnormal = '湿度异常';
  18. public static $abnormal = [self::temperature_abnormal,self::humidity_abnormal];
  19. public static $normal = [self::temperature_normal,self::humidity_normal];
  20. //节点一
  21. public static $node_one = [2]; //开关类
  22. //节点二
  23. public static $node_two = [1]; //传感器类
  24. //节点三
  25. public static $node_three = [3]; // 预警类
  26. }