ReturnExchangeOrder.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Model;
  3. use App\Scopes\DepartmentScope;
  4. use Illuminate\Database\Eloquent\Model;
  5. class ReturnExchangeOrder extends UseScopeBaseModel
  6. {
  7. protected $table = "return_exchange_order"; //指定表
  8. const CREATED_AT = 'crt_time';
  9. const UPDATED_AT = 'upd_time';
  10. protected $dateFormat = 'U';
  11. const Order_type = 0; //合同
  12. const Order_type2 = 1; // 采购单
  13. public static $order_type_name = [
  14. self::Order_type => '合同',
  15. self::Order_type2 => '采购单',
  16. ];
  17. const Model_type_one = 1; // 退货单
  18. const Model_type_two = 2; // 换货单
  19. public static $model_type = [
  20. self::Model_type_one,
  21. self::Model_type_two,
  22. ];
  23. public static $model_type_name = [
  24. self::Model_type_one => '退货单',
  25. self::Model_type_two => '换货单',
  26. ];
  27. const State_zero = 0;//未确认
  28. const State_one = 1;//已确认
  29. public static $state = [
  30. self::State_zero => '未确认',
  31. self::State_one => '已确认',
  32. ];
  33. public static $prefix = [
  34. self::Model_type_one => 'TH',
  35. self::Model_type_two => 'HH',
  36. ];
  37. const range_function = 'returnExchangeOrderRange';
  38. }