取消提现手续费-附加一些功能测试

This commit is contained in:
2024-09-29 16:44:06 +08:00
parent 3cca920102
commit 8ffba61ea7
4 changed files with 174 additions and 10 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace common\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
class ChargeCashPayRecord extends \common\modelsgii\ChargeCashPayRecord
{
public function behaviors()
{
return [
[
'class' => TimestampBehavior::class,
'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at','updated_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
],
],
];
}
//门店
public function getStore()
{
return $this->hasOne(Store::class, ['id'=>'store_id']);
}
}

View File

@@ -0,0 +1,57 @@
<?php
namespace common\modelsgii;
use Yii;
/**
* This is the model class for table "yii_charge_cash_pay_record".
*
* @property int $id // ID
* @property int $store_id // 诊所id
* @property string $charge_cash // 手续费
* @property string $order_no // 订单号
* @property int $type // 类型 0:平台 1:诊所
* @property int $status // 状态 1:已记录 2:已代付 3:已取消
* @property $store // 诊所
* @property int $created_at
* @property int $updated_at
*/
class ChargeCashPayRecord extends \common\core\BaseActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'yii_charge_cash_pay_record';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['store_id', 'charge_cash', 'type', 'status'], 'required'],
[['created_at', 'updated_at'], 'integer'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'order_no' => '订单号',
'store_id' => '诊所ID',
'charge_cash' => '手续费',
'type' => 'type',
'status' => 'status',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
}