You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
payment/app/Model/Order.php

31 lines
749 B
PHTML

2 years ago
<?php
declare(strict_types=1);
namespace App\Model;
class Order extends Model
{
1 year ago
public const STATUS_PREPARE = 'PREPARE';
1 year ago
public const STATUS_APPLY_SUCCESS = 'APPLY_SUCCESS';
public const STATUS_APPLY_FAILED = 'APPLY_FAILED';
1 year ago
public const STATUS_INIT = 'INIT';
public const STATUS_PROCESS = 'PROCESS';
public const STATUS_SUCCESS = 'SUCCESS';
public const STATUS_FAILED = 'FAILED';
2 years ago
protected $table = 'orders';
1 year ago
1 year ago
protected $casts = [
'org_split_info_list' => 'array',
];
1 year ago
public function getExpiresIn() {
return strtotime($this->expired_at) - time();
}
1 year ago
public function orderSplitInfos()
{
return $this->hasMany(OrderSplitInfo::class, 'order_no', 'order_no');
}
2 years ago
}