64], [['title'], 'string', 'max' => 128], [['notify_class', 'notify_url'], 'string', 'max' => 512], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'cx_mch_id' => '平台商户ID', 'payment_order_union_id' => '合并支付ID', 'order_no' => '订单号', 'amount' => '订单金额', 'is_pay' => '支付状态:0=未支付,1=已支付', 'pay_type' => '支付方式', 'title' => '支付摘要', 'created_at' => '添加时间', 'updated_at' => '更新时间', 'notify_class' => '支付成功回调处理类', 'notify_url' => '支付成功回调', 'notify_status' => '回调状态:0=待回调,1=回调成功,2=回调失败', 'refund' => '已退款金额', ]; } public function beforeSave($insert) { if(parent::beforeSave($insert)){ if($this->isNewRecord){ $this->created_at = time(); } $this->updated_at = time(); $this->htmlTagFilter(); return true; } else { return false; } } public function htmlTagFilter() { $this->title = Model::htmlTagFilter($this->title); } }