@sourceloop/chat-service / Exports / MessageRepository
Class: MessageRepository¶
Hierarchy¶
-
DefaultUserModifyCrudRepository
<Message
, typeofid
,MessageRelations
>↳
MessageRepository
Table of contents¶
Constructors¶
Properties¶
- attachmentFileRepositoryGetter
- attachmentFiles
- getCurrentUser
- messageRecipientRepositoryGetter
- messageRecipients
- messageRepositoryGetter
- messages
- parentMessage
Methods¶
Constructors¶
constructor¶
• new MessageRepository(dataSource
, getCurrentUser
, messageRecipientRepositoryGetter
, messageRepositoryGetter
, attachmentFileRepositoryGetter
)
Parameters¶
Name | Type |
---|---|
dataSource |
DataSource |
getCurrentUser |
Getter <undefined | IAuthUserWithPermissions <string , string , string >> |
messageRecipientRepositoryGetter |
Getter <MessageRecipientRepository > |
messageRepositoryGetter |
Getter <MessageRepository > |
attachmentFileRepositoryGetter |
Getter <AttachmentFileRepository > |
Overrides¶
DefaultUserModifyCrudRepository< Message, typeof Message.prototype.id, MessageRelations \>.constructor
Defined in¶
services/chat-service/src/repositories/message.repository.ts:50
Properties¶
attachmentFileRepositoryGetter¶
• Protected
attachmentFileRepositoryGetter: Getter
<AttachmentFileRepository
>
Defined in¶
services/chat-service/src/repositories/message.repository.ts:61
attachmentFiles¶
• Readonly
attachmentFiles: HasManyRepositoryFactory
<AttachmentFile
, undefined
| string
>
Defined in¶
services/chat-service/src/repositories/message.repository.ts:45
getCurrentUser¶
• Protected
Readonly
getCurrentUser: Getter
<undefined
| IAuthUserWithPermissions
<string
, string
, string
>>
Inherited from¶
DefaultUserModifyCrudRepository.getCurrentUser
Defined in¶
services/chat-service/src/repositories/message.repository.ts:53
messageRecipientRepositoryGetter¶
• Protected
messageRecipientRepositoryGetter: Getter
<MessageRecipientRepository
>
Defined in¶
services/chat-service/src/repositories/message.repository.ts:57
messageRecipients¶
• Readonly
messageRecipients: HasManyRepositoryFactory
<MessageRecipient
, undefined
| string
>
Defined in¶
services/chat-service/src/repositories/message.repository.ts:31
messageRepositoryGetter¶
• Protected
messageRepositoryGetter: Getter
<MessageRepository
>
Defined in¶
services/chat-service/src/repositories/message.repository.ts:59
messages¶
• Readonly
messages: HasManyRepositoryFactory
<Message
, undefined
| string
>
Defined in¶
services/chat-service/src/repositories/message.repository.ts:41
parentMessage¶
• Readonly
parentMessage: BelongsToAccessor
<Message
, undefined
| string
>
Defined in¶
services/chat-service/src/repositories/message.repository.ts:36
Methods¶
create¶
▸ create(entity
, options?
): Promise
<Message
>
Parameters¶
Name | Type |
---|---|
entity |
DataObject <Message > |
options? |
Options |
Returns¶
Promise
<Message
>
Inherited from¶
DefaultUserModifyCrudRepository.create
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:11
createAll¶
▸ createAll(entities
, options?
): Promise
<Message
[]>
Parameters¶
Name | Type |
---|---|
entities |
DataObject <Message >[] |
options? |
Options |
Returns¶
Promise
<Message
[]>
Inherited from¶
DefaultUserModifyCrudRepository.createAll
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:12
replaceById¶
▸ replaceById(id
, data
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
id |
undefined | string |
data |
DataObject <Message > |
options? |
Options |
Returns¶
Promise
<void
>
Inherited from¶
DefaultUserModifyCrudRepository.replaceById
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:17
save¶
▸ save(entity
, options?
): Promise
<Message
>
Parameters¶
Name | Type |
---|---|
entity |
Message |
options? |
Options |
Returns¶
Promise
<Message
>
Inherited from¶
DefaultUserModifyCrudRepository.save
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:13
update¶
▸ update(entity
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
entity |
Message |
options? |
Options |
Returns¶
Promise
<void
>
Inherited from¶
DefaultUserModifyCrudRepository.update
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:14
updateAll¶
▸ updateAll(data
, where?
, options?
): Promise
<Count
>
Parameters¶
Name | Type |
---|---|
data |
DataObject <Message > |
where? |
Where <Message > |
options? |
Options |
Returns¶
Promise
<Count
>
Inherited from¶
DefaultUserModifyCrudRepository.updateAll
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:15
updateById¶
▸ updateById(id
, data
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
id |
undefined | string |
data |
DataObject <Message > |
options? |
Options |
Returns¶
Promise
<void
>
Inherited from¶
DefaultUserModifyCrudRepository.updateById
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:16