64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
import:
|
|
- github.com/cortezaproject/corteza-server/messaging/types
|
|
|
|
types:
|
|
type: types.Unread
|
|
|
|
fields:
|
|
- { field: ChannelID, type: uint64, isPrimaryKey: true }
|
|
- { field: ReplyTo, type: uint64, isPrimaryKey: true }
|
|
- { field: UserID, type: uint64, isPrimaryKey: true }
|
|
- { field: LastMessageID, type: uint64 }
|
|
- { field: Count, type: uint32 }
|
|
|
|
|
|
functions:
|
|
- name: CountMessagingUnreadThreads
|
|
arguments:
|
|
- { name: userID, type: uint64 }
|
|
- { name: channelID, type: uint64 }
|
|
return: [ types.UnreadSet, error ]
|
|
|
|
- name: CountMessagingUnread
|
|
arguments:
|
|
- { name: userID, type: uint64 }
|
|
- { name: channelID, type: uint64 }
|
|
- { name: threadIDs, type: ...uint64 }
|
|
return: [ types.UnreadSet, error ]
|
|
|
|
- name: ResetMessagingUnreadThreads
|
|
arguments:
|
|
- { name: userID, type: uint64 }
|
|
- { name: channelID, type: uint64 }
|
|
return: [ error ]
|
|
|
|
- name: PresetMessagingUnread
|
|
arguments:
|
|
- { name: channelID, type: uint64 }
|
|
- { name: threadIDs, type: uint64 }
|
|
- { name: userID, type: ...uint64 }
|
|
return: [ error ]
|
|
|
|
- name: IncMessagingUnreadCount
|
|
arguments:
|
|
- { name: channelID, type: uint64 }
|
|
- { name: threadIDs, type: uint64 }
|
|
- { name: userID, type: uint64 }
|
|
return: [ error ]
|
|
|
|
- name: DecMessagingUnreadCount
|
|
arguments:
|
|
- { name: channelID, type: uint64 }
|
|
- { name: threadIDs, type: uint64 }
|
|
- { name: userID, type: uint64 }
|
|
return: [ error ]
|
|
|
|
rdbms:
|
|
alias: mur
|
|
table: messaging_unread
|
|
mapFields:
|
|
ReplyTo: { column: rel_reply_to }
|
|
|
|
search:
|
|
enable: false
|