function (ActiveQuery $query) { return $query->andWhere(['merchant_id' => Yii::$app->services->merchant->getNotNullId()]); }], [['merchant_id', 'level', 'integral', 'growth', 'status', 'created_at', 'updated_at'], 'integer'], [['money'], 'number', 'min' => 0], [['integral', 'growth'], 'integer', 'min' => 0], [['discount'], 'number', 'min' => 0, 'max' => 10], [['name', 'icon', 'cover', 'detail'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => '主键', 'merchant_id' => '商户id', 'level' => '等级', 'name' => '等级名称', 'icon' => '等级图标', 'cover' => '等级背景图', 'detail' => '等级介绍', 'money' => '消费额度满足则升级', 'integral' => '消费积分满足则升级', 'growth' => '成长值满足则升级', 'discount' => '折扣', 'status' => '状态', 'created_at' => '创建时间', 'updated_at' => '修改时间', ]; } }