OrderInfoModel.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class OrderInfoModel extends Model
  5. {
  6. //
  7. protected $table = 'order_info';
  8. protected $primaryKey = 'id';
  9. //用户类型定义
  10. const USER_TYPE_USER = 1;
  11. //用户类型枚举
  12. private static $_user_types = [
  13. self::USER_TYPE_USER => '会员',
  14. ];
  15. //商品类型定义
  16. const GOODS_TYPE_COIN = 1;
  17. // const GOODS_TYPE_COSUME = 3;
  18. //商品类型枚举
  19. private static $_goods_types = [
  20. self::GOODS_TYPE_COIN => '梦想币',
  21. // self::GOODS_TYPE_COSUME => '续消现金',
  22. ];
  23. //支付类型定义
  24. const PAY_TYPE_ALIPAY = 1;
  25. const PAY_TYPE_WECHATPAY = 2;
  26. //支付类型枚举
  27. private static $_pay_types = [
  28. self::PAY_TYPE_ALIPAY => '支付宝',
  29. self::PAY_TYPE_WECHATPAY => '微信支付',
  30. // self::PAY_TYPE_UNIONPAY => '银联支付',
  31. ];
  32. //订单状态定义
  33. const STATUS_PENDING = 0;
  34. const STATUS_FINISHED = 1;
  35. const STATUS_CANCELED = 2;
  36. //订单状态枚举
  37. private static $_status = [
  38. self::STATUS_PENDING => '待处理',
  39. self::STATUS_FINISHED => '已完成',
  40. self::STATUS_CANCELED => '已取消',
  41. ];
  42. public static function getAllGoodsTypes() {
  43. return self::$_goods_types;
  44. }
  45. public static function getAllStatus() {
  46. return self::$_status;
  47. }
  48. public static function getAllPayTypes() {
  49. return self::$_pay_types;
  50. }
  51. }