[self:: SCENARIOS_TRUSTEESHIP_CREATE]] ]; } public function isExist($attribute, $params) { $count = MinerFee::find()->where(['platform' => $this->platform, 'type' => self::TYPE_TRUSTEESHIP])->count(); if($count > 0) { $this->addError('platform', '该平台已存在'); } } public function scenarios() { $scenarios = [ self:: SCENARIOS_WALLET_CREATE => ['platform', 'min', 'max', 'level'], self:: SCENARIOS_WALLET_UPDATE => ['platform', 'min', 'max', 'level'], self:: SCENARIOS_TRUSTEESHIP_CREATE => ['platform', 'type', 'fee'], self:: SCENARIOS_TRUSTEESHIP_UPDATE => ['platform', 'type', 'fee'], ]; return array_merge(parent:: scenarios(), $scenarios); } public function attributeLabels() { return [ 'platform' => '平台', 'min' => '最小值', 'max' => '最大值', 'level' => '分档', 'fee' => '手续费' ]; } }