DeviceOrder.php 1000 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. class DeviceOrder extends Model
  5. {
  6. protected $table = "device_order"; //指定表
  7. const CREATED_AT = 'crt_time';
  8. const UPDATED_AT = 'upd_time';
  9. protected $dateFormat = 'U';
  10. const Model_type_one = 1; // 巡检
  11. const Model_type_two = 2; // 点检
  12. const Model_type_three = 3; // 维修
  13. public static $prefix = [
  14. self::Model_type_one => 'XJ',
  15. self::Model_type_two => 'DJ',
  16. self::Model_type_three => 'WX',
  17. ];
  18. public static $prefix_title = [
  19. self::Model_type_one => '巡检单',
  20. self::Model_type_two => '点检单',
  21. self::Model_type_three => '维修单',
  22. ];
  23. const state_zero = 0; // 未处理
  24. const state_one = 1; // 处理中
  25. const state_two = 2; // 已结束
  26. public static $state_title = [
  27. self::state_zero => '未处理',
  28. self::state_one => '处理中',
  29. self::state_two => '已结束',
  30. ];
  31. }