|
@@ -0,0 +1,49 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace App\Models;
|
|
|
+
|
|
|
+use Illuminate\Database\Eloquent\Model;
|
|
|
+use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
+
|
|
|
+class OrderRefundRecord extends Model
|
|
|
+{
|
|
|
+ use SoftDeletes;
|
|
|
+
|
|
|
+ protected $table = 'order_refund_records';
|
|
|
+
|
|
|
+ protected $fillable = [
|
|
|
+ 'order_id',
|
|
|
+ 'total_refund_amount',
|
|
|
+ 'balance_refund_amount',
|
|
|
+ 'payment_refund_amount',
|
|
|
+ 'penalty_amount',
|
|
|
+ 'coach_fee',
|
|
|
+ 'platform_traffic_fee',
|
|
|
+ 'platform_penalty',
|
|
|
+ 'refund_no',
|
|
|
+ 'transaction_id',
|
|
|
+ 'state',
|
|
|
+ 'remark',
|
|
|
+ 'refund_time'
|
|
|
+ ];
|
|
|
+
|
|
|
+ protected $casts = [
|
|
|
+ 'total_refund_amount' => 'decimal:2',
|
|
|
+ 'balance_refund_amount' => 'decimal:2',
|
|
|
+ 'payment_refund_amount' => 'decimal:2',
|
|
|
+ 'penalty_amount' => 'decimal:2',
|
|
|
+ 'coach_fee' => 'decimal:2',
|
|
|
+ 'platform_traffic_fee' => 'decimal:2',
|
|
|
+ 'platform_penalty' => 'decimal:2',
|
|
|
+ 'refund_time' => 'datetime'
|
|
|
+ ];
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关联订单
|
|
|
+ */
|
|
|
+ public function order(): BelongsTo
|
|
|
+ {
|
|
|
+ return $this->belongsTo(Order::class);
|
|
|
+ }
|
|
|
+}
|