PurchaseOrder.php 830 B

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