32 lines
843 B
PHP
32 lines
843 B
PHP
<?php
|
|
|
|
namespace App\Models\Payments;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
final class GcPinOrder extends Model
|
|
{
|
|
protected $table = 'gc_pin_order';
|
|
|
|
protected $fillable = [
|
|
'oid','mem_no','order_type','stat_pay','stat_tax',
|
|
'subtotal_amount','fee_amount','pg_fee_amount','discount_amount','pay_money',
|
|
'provider','pay_method','pg_tid','ret_code','ret_msg',
|
|
'pay_data','ret_data','ordered_at','paid_at','cancelled_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'pay_data' => 'array',
|
|
'ret_data' => 'array',
|
|
'ordered_at' => 'datetime',
|
|
'paid_at' => 'datetime',
|
|
'cancelled_at' => 'datetime',
|
|
];
|
|
|
|
public function items(): HasMany
|
|
{
|
|
return $this->hasMany(GcPinOrderItem::class, 'order_id');
|
|
}
|
|
}
|