32], [['operation_type'], 'string', 'max' => 50], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'user_id' => 'User ID', 'clear_num' => 'Clear Num', 'reward_currency' => 'Reward Currency', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'operation_type' => 'Operation Type', ]; } public static function setData($params) { try { $model = new self(); $model->loadDefaultValues(); if (!$model->load($params, '') || !$model->save()) throw new Exception($model->getErrorMessage()); return $model->toArray(); } catch (\Exception $e) { self::setStaticError($e->getMessage()); return false; } } }