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
PHP

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