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

26 lines
631 B
PHTML

2 years ago
<?php
declare(strict_types=1);
namespace App\Model;
class Order extends Model
{
public const STATUS_PREPARE = 1;
public const STATUS_WAIT_PAY = 2;
1 year ago
public const STATUS_APPLY_FAIL = 3;
2 years ago
public const STATUS_PAYED = 6;
public const STATUS_FAILED = 9;
protected $table = 'orders';
1 year ago
public function getStatusText() {
$statusMap = [
self::STATUS_APPLY_FAIL => '申请失败',
self::STATUS_WAIT_PAY => '待支付',
self::STATUS_PAYED => '支付成功',
self::STATUS_FAILED => '支付失败',
];
return $statusMap[$this->status];
}
2 years ago
}