| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- namespace addons\HuifuPay\common\models;
- use Yii;
- use yii\db\ActiveRecord;
- use common\models\common\PaymentTrade;
- /**
- * This is the model class for table "{{%addons_huifupay_pay_order}}".
- *
- * @property int $id
- * @property int $mall_id 商城id
- * @property int $payment_id payment id
- * @property string $hf_order_no 汇付支付流水号
- * @property string $trade_no 支付流水单号
- * @property string $trade_type 支付流水单号
- * @property int|null $updated_at
- * @property int|null $created_at
- * @property array|null $notify
- */
- class HuifuPayOrderModel extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%addons_huifupay_pay_order}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'trade_no','hf_order_no'], 'required'],
- [['mall_id','updated_at', 'created_at'], 'integer'],
- [['hf_order_no', 'trade_no', 'trade_type'], 'string', 'max' => 64],
- [['notify'], 'safe']
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'hf_order_no' => 'order No',
- 'trade_no' => 'Trade No',
- 'updated_at' => 'Updated At',
- 'created_at' => 'Created At'
- ];
- }
- public function getTrade()
- {
- return $this->hasOne(PaymentTrade::class, ['out_trade_no' => 'trade_no']);
- }
- }
|