| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "{{%mch_cash}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $mch_id
- * @property string $money
- * @property string $order_no
- * @property integer $status
- * @property integer $type
- * @property string $type_data
- * @property integer $virtual_type
- * @property string $created_at
- * @property string $updated_at
- */
- class MchCash extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%mch_cash}}';
- }
- public function behaviors()
- {
- return [
- [
- // 自动更新创建和更新时间
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'mch_id', 'money', 'order_no'], 'required'],
- [['store_id', 'mch_id', 'status', 'created_at', 'updated_at', 'type', 'virtual_type'], 'integer'],
- [['money'], 'number'],
- [['order_no', 'type_data'], 'string', 'max' => 255],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'mch_id' => 'Mch ID',
- 'money' => 'Money',
- 'order_no' => 'Order No',
- 'status' => '提现状态:0=待处理,1=已转账,2=已拒绝',
- 'type' => '提现类型 0--微信自动打款 1--微信线下打款 2--支付宝线下打款 3--银行卡线下打款 4--充值到余额',
- 'type_data' => '不同提现类型,提交的数据',
- 'virtual_type' => '实际上打款方式',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
- public function getMch()
- {
- return $this->hasMany(Mch::className(), ['id' => 'mch_id']);
- }
- }
|