PurchaseOrder.php 919 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Model;
  3. use App\Scopes\DepartmentScope;
  4. use Illuminate\Database\Eloquent\Model;
  5. class PurchaseOrder extends UseScopeBaseModel
  6. {
  7. protected $table = "purchase_order"; //指定表
  8. const CREATED_AT = 'crt_time';
  9. const UPDATED_AT = 'upd_time';
  10. protected $dateFormat = 'U';
  11. const STATE_ZERO = 0;//未确认
  12. const STATE_ONE = 1;//已确认
  13. const prefix = 'CG';
  14. public static $name = [
  15. self::STATE_ZERO => '未确认',
  16. self::STATE_ONE => '已确认',
  17. ];
  18. const Order_type_one = 1;//普通采购
  19. const Order_type_two = 2;//代发采购
  20. const Order_type_three = 3;//采购施工(安装费)
  21. public static $order_type = [
  22. self::Order_type_one => '普通采购',
  23. self::Order_type_two => '代发采购',
  24. self::Order_type_three => '采购施工(安装费)'
  25. ];
  26. const range_function = 'purchaseRange';
  27. }