Skip to content

@sourceloop/survey-service / Exports / SurveyQuestionRepository

Class: SurveyQuestionRepository

Hierarchy

  • DefaultSoftCrudRepository<SurveyQuestion, typeof id>

    SurveyQuestionRepository

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SurveyQuestionRepository(dataSource, surveyRepositoryGetter, questionRepositoryGetter, sectionRepositoryGetter, logger, getCurrentUser)

Parameters

Name Type
dataSource DataSource
surveyRepositoryGetter Getter<SurveyRepository>
questionRepositoryGetter Getter<QuestionRepository>
sectionRepositoryGetter Getter<SectionRepository>
logger ILogger
getCurrentUser Getter<IAuthUserWithPermissions<string, string, string>>

Overrides

DefaultSoftCrudRepository< SurveyQuestion, typeof SurveyQuestion.prototype.id \>.constructor

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:43

Properties

dependentOnQuestion

Readonly dependentOnQuestion: BelongsToAccessor<SurveyQuestion<DataObject<Model>>, undefined | string>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:24


getCurrentUser

Readonly getCurrentUser: Getter<IAuthUserWithPermissions<string, string, string>>

Inherited from

DefaultSoftCrudRepository.getCurrentUser

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:53


logger

logger: ILogger

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:51


question

Readonly question: BelongsToAccessor<Question, undefined | string>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:34


questionRepositoryGetter

Protected questionRepositoryGetter: Getter<QuestionRepository>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:48


section

Readonly section: BelongsToAccessor<Section, undefined | string>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:38


sectionRepositoryGetter

Protected sectionRepositoryGetter: Getter<SectionRepository>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:50


survey

Readonly survey: BelongsToAccessor<Survey<DataObject<Model>>, undefined | string>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:29


surveyRepositoryGetter

Protected surveyRepositoryGetter: Getter<SurveyRepository>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:46

Methods

_updateSurveyModifiedByAndOn

_updateSurveyModifiedByAndOn(surveyId): Promise<void>

Parameters

Name Type
surveyId string

Returns

Promise<void>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:98


reorder

reorder(surveyId, displayOrder): Promise<void>

Parameters

Name Type
surveyId string
displayOrder number

Returns

Promise<void>

Defined in

services/survey-service/src/repositories/survey-question.repository.ts:84