QiShangTongRefund.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace addons\QiShangTong\common\models;
  3. use common\models\order\OrderRefund;
  4. use Yii;
  5. /**
  6. * This is the model class for table "qimall_addons_qi_shang_tong_refund".
  7. *
  8. * @property int $id ID
  9. * @property int $mall_id 商城ID
  10. * @property int $created_at 创建时间
  11. * @property int $updated_at 更新时间
  12. * @property int $status 状态
  13. * @property int $order_id 订单ID
  14. * @property string $order_no 订单编号
  15. * @property int $refund_id 退款ID
  16. * @property string $refund_no 退款单号
  17. * @property string $third_order_no 第三方订单编号
  18. * @property int $third_refund_id 第三方退款ID
  19. * @property array|null $content 最后一次更新数据
  20. * @property array|null $post 请求数据
  21. * @property int $order_detail_id 订单详情ID
  22. * @property int $refund_status 售后状态
  23. * @property int $user_id 售后状态
  24. * @property string|null $last_resp 订单编号
  25. * @property array|null $third_detail 定时同步的数据
  26. * @property int $req_success 订单详情ID
  27. * @property string $last_req 订单编号
  28. */
  29. class QiShangTongRefund extends \common\models\base\BaseActiveRecord
  30. {
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public static function tableName()
  35. {
  36. return 'qimall_addons_qi_shang_tong_refund';
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function rules()
  42. {
  43. return [
  44. [['mall_id', 'created_at', 'updated_at', 'status', 'order_id', 'refund_id', 'third_refund_id', 'order_detail_id', 'refund_status', 'user_id', 'req_success'], 'integer'],
  45. [['content', 'post', 'third_detail'], 'safe'],
  46. [['order_no', 'refund_no'], 'string', 'max' => 30],
  47. [['third_order_no'], 'string', 'max' => 50],
  48. [['last_req'], 'string', 'max' => 255],
  49. [['last_resp'], 'string']
  50. ];
  51. }
  52. /**
  53. * {@inheritdoc}
  54. */
  55. public function attributeLabels()
  56. {
  57. return [
  58. 'id' => 'ID',
  59. 'mall_id' => 'Mall ID',
  60. 'created_at' => 'Created At',
  61. 'updated_at' => 'Updated At',
  62. 'status' => 'Status',
  63. 'order_id' => 'Order ID',
  64. 'order_no' => 'Order No',
  65. 'refund_id' => 'Refund ID',
  66. 'refund_no' => 'Refund No',
  67. 'third_order_no' => 'Third Order No',
  68. 'third_refund_id' => 'Third Refund ID',
  69. 'content' => 'Content',
  70. 'post' => 'Post',
  71. 'order_detail_id' => 'Order Detail ID',
  72. 'refund_status' => 'Refund Status',
  73. 'third_detail' => 'Third Detail',
  74. ];
  75. }
  76. public function getRefund()
  77. {
  78. return $this->hasOne(OrderRefund::class, ['id' => 'refund_id']);
  79. }
  80. }