PurchaseReOrder.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\db\ActiveRecord;
  10. /**
  11. * This is the model class for table "{{%purchase_re_order}}".
  12. *
  13. * @property integer $id
  14. * @property integer $store_id
  15. * @property string $order_no
  16. * @property integer $saas_id
  17. * @property integer $user_id
  18. * @property string $pay_price
  19. * @property string $send_price
  20. * @property integer $pay_type
  21. * @property integer $is_pay
  22. * @property integer $pay_time
  23. * @property string $transaction_id
  24. * @property integer $is_delete
  25. * @property integer $created_at
  26. * @property integer $is_platform
  27. * @property string $err
  28. */
  29. class PurchaseReOrder extends ActiveRecord
  30. {
  31. /**
  32. * 是否删除
  33. */
  34. CONST IS_DELETE = 1;
  35. CONST NOT_DELETE = 0;
  36. public static $valid_delete_arr = [
  37. self::IS_DELETE,
  38. self::NOT_DELETE
  39. ];
  40. /**
  41. * 是否支付
  42. */
  43. CONST IS_PAY = 1;
  44. CONST NOT_PAY = 0;
  45. public static $valid_pay_arr = [
  46. self::IS_PAY,
  47. self::NOT_PAY
  48. ];
  49. /**
  50. * @inheritdoc
  51. */
  52. public static function tableName()
  53. {
  54. return '{{%purchase_re_order}}';
  55. }
  56. /**
  57. * @inheritdoc
  58. */
  59. public function rules()
  60. {
  61. return [
  62. [['store_id', 'user_id', 'saas_id', 'pay_type', 'is_pay', 'pay_time', 'is_delete', 'created_at', 'is_platform'], 'integer'],
  63. [['pay_price', 'send_price'], 'number'],
  64. [['order_no', 'transaction_id', 'err'], 'string', 'max' => 255],
  65. ];
  66. }
  67. /**
  68. * @inheritdoc
  69. */
  70. public function attributeLabels()
  71. {
  72. return [
  73. 'id' => 'ID',
  74. 'store_id' => 'Store ID',
  75. 'order_no' => '订单号',
  76. 'saas_id' => 'saas_id',
  77. 'user_id' => '用户',
  78. 'pay_price' => '支付金额',
  79. 'send_price' => '赠送金额',
  80. 'pay_type' => '支付方式 1--微信支付',
  81. 'is_pay' => '是否支付 0--未支付 1--支付',
  82. 'pay_time' => '支付时间',
  83. 'transaction_id' => '微信单号',
  84. 'is_delete' => 'Is Delete',
  85. 'created_at' => '添加时间',
  86. 'err' => '错误信息',
  87. ];
  88. }
  89. }