PurchaseOrder.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Model;
  3. class PurchaseOrder extends UseScopeBaseModel
  4. {
  5. protected $table = "purchase_order"; //指定表
  6. const CREATED_AT = 'crt_time';
  7. const UPDATED_AT = 'upd_time';
  8. protected $dateFormat = 'U';
  9. const STATE_ZERO = 0;//未确认
  10. const STATE_ONE = 1;//未入库
  11. const STATE_TWO = 2;//已入库
  12. const prefix = 'CG';
  13. public static $name = [
  14. self::STATE_ZERO => '未确认',
  15. self::STATE_ONE => '未入库',
  16. self::STATE_TWO => '已入库',
  17. ];
  18. const Order_type_one = 1;//总社采购
  19. const Order_type_two = 2;//分社外采
  20. const Order_type_three = 3;//分社要货 不要合同
  21. const Order_type_four = 4;//分社订货 要合同
  22. const Order_type_five = 5;
  23. public static $order_type = [
  24. self::Order_type_one => '总社采购',
  25. self::Order_type_two => '分社外采',
  26. self::Order_type_three => '分社要货',
  27. self::Order_type_four => '分社订货',
  28. ];
  29. const range_function = 'purchaseRange';
  30. }