public static function addOne($userId, $roleId) { $model = new UserAssignModel(); $model->user_id = $userId; $model->role_id = $roleId; $model->time_create = Utils::getNow(); return $model->save(); }