61 lines
1.5 KiB
PHP
61 lines
1.5 KiB
PHP
<?php
|
||
|
||
namespace common\modelsgii;
|
||
|
||
use Yii;
|
||
|
||
/**
|
||
* This is the model class for table "{{%payment_order}}".
|
||
*
|
||
* @property int $id
|
||
* @property string $transaction_id
|
||
* @property string $order_no
|
||
* @property string $pay_order_no 发起支付的order_no
|
||
* @property float $amount
|
||
* @property int $is_pay 支付状态:0=未支付,1=已支付
|
||
* @property int $pay_type 支付方式:1=微信支付
|
||
* @property int $created_at
|
||
* @property int $updated_at
|
||
*/
|
||
class PaymentOrder extends \common\core\BaseActiveRecord
|
||
{
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public static function tableName()
|
||
{
|
||
return '{{%payment_order}}';
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function rules()
|
||
{
|
||
return [
|
||
[['amount'], 'number'],
|
||
[['is_pay', 'pay_type', 'created_at', 'updated_at'], 'integer'],
|
||
[['transaction_id', 'pay_order_no'], 'string', 'max' => 255],
|
||
[['order_no'], 'string', 'max' => 32],
|
||
];
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function attributeLabels()
|
||
{
|
||
return [
|
||
'id' => 'ID',
|
||
'transaction_id' => 'Transaction ID',
|
||
'order_no' => 'Order No',
|
||
'pay_order_no' => '发起支付的order_no',
|
||
'amount' => 'Amount',
|
||
'is_pay' => '支付状态:0=未支付,1=已支付',
|
||
'pay_type' => '支付方式:1=微信支付',
|
||
'created_at' => 'Created At',
|
||
'updated_at' => 'Updated At',
|
||
];
|
||
}
|
||
}
|