'ID', 'mall_id' => 'Mall ID', 'user_id' => 'User ID', 'score_value' => 'Score Value', 'freeze_score_value' => 'Freeze Score Value', 'total_score_value' => 'Total Score Value', 'active_score_value' => 'Active Score Value', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public static function setData($params) { try { $model = self::findOne(['user_id' => $params['user_id'], 'mall_id' => $params['mall_id']]); if (!$model) { $model = new self(); $model->loadDefaultValues(); } if (!$model->load($params, '') || !$model->save()) { throw new \Exception($model->getErrorMessage()); } return $model; } catch (\Exception $e) { self::$static_error = $e->getMessage(); return false; } } }