| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- namespace addons\HuifuPay\common\models;
- use common\models\order\Order;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_huifupay_bill_share".
- *
- * @property int $id
- * @property int $mall_id
- * @property string $merchant_no 分账方账号
- * @property int $trade_id 支付流水ID
- * @property int $status 100:成功,101:失败,102:已创建
- * @property int|null $updated_at
- * @property int|null $created_at
- * @property array|null $response
- * @property string $order_no 订单号
- * @property float $share_amount 商家分账金额
- * @property float $fee 平台手续费
- * @property float $finally_fee 平台手续费
- * @property float $finally_share_amount 平台手续费
- * @property float $fee_rate 平台手续费
- * @property float $refund_amount 平台手续费
- * @property float $order_amount 平台手续费
- * @property float $pay_fee 平台手续费
- * @property int $store_id 门店ID
- * @property int $settle_status 门店ID
- * @property int $settle_at 门店ID
- * @property int $settle_type 门店ID
- * @property string $trx_no 汇聚分账支付订单号
- * @property string $trade_no 汇聚分账支付订单号
- */
- class HuifuBillShare extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_huifupay_bill_share';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'trade_id', 'status', 'updated_at', 'created_at', 'store_id', 'settle_status', 'settle_at', 'settle_type'], 'integer'],
- [['share_amount', 'fee', 'fee_rate', 'refund_amount', 'order_amount', 'finally_fee', 'finally_share_amount', 'pay_fee'], 'number'],
- [['merchant_no', 'trx_no', 'trade_no'], 'string', 'max' => 32],
- [['order_no'], 'string', 'max' => 50],
- [['response'], 'safe'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'merchant_no' => 'Merchant No',
- 'trade_id' => 'Trade ID',
- 'status' => 'Status',
- 'updated_at' => 'Updated At',
- 'created_at' => 'Created At',
- 'order_no' => 'Order No',
- 'share_amount' => 'Share Amount',
- 'fee' => 'Fee',
- 'store_id' => 'Store ID',
- 'trx_no' => 'Trx No',
- ];
- }
- public function getOrder()
- {
- return $this->hasOne(Order::class, ['order_no' => 'order_no']);
- }
- }
|