sort entity attributes of ChatMessageEntity and ConversationEntity alphabetically
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Родитель
76e6bb0f82
Коммит
edc0554fd2
|
@ -31,6 +31,8 @@ import com.nextcloud.talk.chat.data.model.ChatMessage
|
|||
]
|
||||
)
|
||||
data class ChatMessageEntity(
|
||||
// MOST IMPORTANT ATTRIBUTES
|
||||
|
||||
@PrimaryKey
|
||||
// accountId@roomtoken@messageId
|
||||
@ColumnInfo(name = "internalId") var internalId: String,
|
||||
|
@ -40,25 +42,28 @@ data class ChatMessageEntity(
|
|||
// accountId@roomtoken
|
||||
@ColumnInfo(name = "internalConversationId") var internalConversationId: String,
|
||||
|
||||
@ColumnInfo(name = "actorType") var actorType: String,
|
||||
@ColumnInfo(name = "actorId") var actorId: String,
|
||||
@ColumnInfo(name = "actorDisplayName") var actorDisplayName: String,
|
||||
@ColumnInfo(name = "timestamp") var timestamp: Long = 0,
|
||||
@ColumnInfo(name = "systemMessage") var systemMessageType: ChatMessage.SystemMessageType,
|
||||
@ColumnInfo(name = "messageType") var messageType: String,
|
||||
@ColumnInfo(name = "isReplyable") var replyable: Boolean = false,
|
||||
// missing/not needed: referenceId
|
||||
@ColumnInfo(name = "message") var message: String,
|
||||
@ColumnInfo(name = "messageParameters") var messageParameters: HashMap<String?, HashMap<String?, String?>>? = null,
|
||||
|
||||
// OTHER ATTRIBUTES IN ALPHABETICAL ORDER
|
||||
|
||||
@ColumnInfo(name = "actorId") var actorId: String,
|
||||
@ColumnInfo(name = "actorType") var actorType: String,
|
||||
@ColumnInfo(name = "deleted") var deleted: Boolean = false,
|
||||
@ColumnInfo(name = "expirationTimestamp") var expirationTimestamp: Int = 0,
|
||||
@ColumnInfo(name = "isReplyable") var replyable: Boolean = false,
|
||||
@ColumnInfo(name = "lastEditActorDisplayName") var lastEditActorDisplayName: String? = null,
|
||||
@ColumnInfo(name = "lastEditActorId") var lastEditActorId: String? = null,
|
||||
@ColumnInfo(name = "lastEditActorType") var lastEditActorType: String? = null,
|
||||
@ColumnInfo(name = "lastEditTimestamp") var lastEditTimestamp: Long? = 0,
|
||||
@ColumnInfo(name = "markdown") var renderMarkdown: Boolean? = false,
|
||||
@ColumnInfo(name = "messageParameters") var messageParameters: HashMap<String?, HashMap<String?, String?>>? = null,
|
||||
@ColumnInfo(name = "messageType") var messageType: String,
|
||||
@ColumnInfo(name = "parent") var parentMessageId: Long? = null,
|
||||
@ColumnInfo(name = "reactions") var reactions: LinkedHashMap<String, Int>? = null,
|
||||
@ColumnInfo(name = "reactionsSelf") var reactionsSelf: ArrayList<String>? = null,
|
||||
@ColumnInfo(name = "markdown") var renderMarkdown: Boolean? = false,
|
||||
@ColumnInfo(name = "lastEditActorType") var lastEditActorType: String? = null,
|
||||
@ColumnInfo(name = "lastEditActorId") var lastEditActorId: String? = null,
|
||||
@ColumnInfo(name = "lastEditActorDisplayName") var lastEditActorDisplayName: String? = null,
|
||||
@ColumnInfo(name = "lastEditTimestamp") var lastEditTimestamp: Long? = 0,
|
||||
@ColumnInfo(name = "deleted") var deleted: Boolean = false,
|
||||
@ColumnInfo(name = "systemMessage") var systemMessageType: ChatMessage.SystemMessageType,
|
||||
@ColumnInfo(name = "timestamp") var timestamp: Long = 0,
|
||||
// missing/not needed: referenceId
|
||||
// missing/not needed: silent
|
||||
)
|
||||
|
|
|
@ -31,6 +31,8 @@ import com.nextcloud.talk.models.json.participants.Participant
|
|||
]
|
||||
)
|
||||
data class ConversationEntity(
|
||||
// MOST IMPORTANT ATTRIBUTES
|
||||
|
||||
@PrimaryKey
|
||||
@ColumnInfo(name = "internalId")
|
||||
var internalId: String,
|
||||
|
@ -45,62 +47,64 @@ data class ConversationEntity(
|
|||
// If multiple talk app accounts have the same conversation, it is stored as another dataset, which is
|
||||
// exactly what we want for this case.
|
||||
@ColumnInfo(name = "token") var token: String,
|
||||
@ColumnInfo(name = "type") var type: ConversationEnums.ConversationType,
|
||||
@ColumnInfo(name = "name") var name: String,
|
||||
|
||||
@ColumnInfo(name = "displayName") var displayName: String,
|
||||
|
||||
// OTHER ATTRIBUTES IN ALPHABETICAL ORDER
|
||||
@ColumnInfo(name = "actorId") var actorId: String,
|
||||
@ColumnInfo(name = "actorType") var actorType: String,
|
||||
@ColumnInfo(name = "avatarVersion") var avatarVersion: String,
|
||||
@ColumnInfo(name = "callFlag") var callFlag: Int = 0,
|
||||
@ColumnInfo(name = "callRecording") var callRecording: Int = 0,
|
||||
@ColumnInfo(name = "callStartTime") var callStartTime: Long = 0,
|
||||
@ColumnInfo(name = "canDeleteConversation") var canDeleteConversation: Boolean,
|
||||
@ColumnInfo(name = "canLeaveConversation") var canLeaveConversation: Boolean,
|
||||
@ColumnInfo(name = "canStartCall") var canStartCall: Boolean = false,
|
||||
@ColumnInfo(name = "description") var description: String,
|
||||
@ColumnInfo(name = "hasCall") var hasCall: Boolean = false,
|
||||
@ColumnInfo(name = "hasPassword") var hasPassword: Boolean = false,
|
||||
@ColumnInfo(name = "isCustomAvatar") var hasCustomAvatar: Boolean,
|
||||
@ColumnInfo(name = "isFavorite") var favorite: Boolean = false,
|
||||
@ColumnInfo(name = "lastActivity") var lastActivity: Long = 0,
|
||||
@ColumnInfo(name = "lastCommonReadMessage") var lastCommonReadMessage: Int = 0,
|
||||
@ColumnInfo(name = "lastMessage") var lastMessage: String? = null,
|
||||
@ColumnInfo(name = "lastPing") var lastPing: Long = 0,
|
||||
@ColumnInfo(name = "lastReadMessage") var lastReadMessage: Int = 0,
|
||||
@ColumnInfo(name = "lobbyState") var lobbyState: ConversationEnums.LobbyState,
|
||||
@ColumnInfo(name = "lobbyTimer") var lobbyTimer: Long = 0,
|
||||
@ColumnInfo(name = "messageExpiration") var messageExpiration: Int = 0,
|
||||
@ColumnInfo(name = "name") var name: String,
|
||||
@ColumnInfo(name = "notificationCalls") var notificationCalls: Int = 0,
|
||||
@ColumnInfo(name = "notificationLevel") var notificationLevel: ConversationEnums.NotificationLevel,
|
||||
@ColumnInfo(name = "objectType") var objectType: ConversationEnums.ObjectType,
|
||||
@ColumnInfo(name = "participantType") var participantType: Participant.ParticipantType,
|
||||
@ColumnInfo(name = "permissions") var permissions: Int = 0,
|
||||
@ColumnInfo(name = "readOnly") var conversationReadOnlyState: ConversationEnums.ConversationReadOnlyState,
|
||||
@ColumnInfo(name = "recordingConsent") var recordingConsentRequired: Int = 0,
|
||||
@ColumnInfo(name = "remoteServer") var remoteServer: String? = null,
|
||||
@ColumnInfo(name = "remoteToken") var remoteToken: String? = null,
|
||||
@ColumnInfo(name = "sessionId") var sessionId: String,
|
||||
@ColumnInfo(name = "status") var status: String? = null,
|
||||
@ColumnInfo(name = "statusClearAt") var statusClearAt: Long? = 0,
|
||||
@ColumnInfo(name = "statusIcon") var statusIcon: String? = null,
|
||||
@ColumnInfo(name = "statusMessage") var statusMessage: String? = null,
|
||||
@ColumnInfo(name = "type") var type: ConversationEnums.ConversationType,
|
||||
@ColumnInfo(name = "unreadMention") var unreadMention: Boolean = false,
|
||||
@ColumnInfo(name = "unreadMentionDirect") var unreadMentionDirect: Boolean,
|
||||
@ColumnInfo(name = "unreadMessages") var unreadMessages: Int = 0,
|
||||
// missing/not needed: attendeeId
|
||||
// missing/not needed: attendeePin
|
||||
@ColumnInfo(name = "actorType") var actorType: String,
|
||||
@ColumnInfo(name = "actorId") var actorId: String,
|
||||
@ColumnInfo(name = "permissions") var permissions: Int = 0,
|
||||
// missing/not needed: attendeePermissions
|
||||
// missing/not needed: callPermissions
|
||||
// missing/not needed: defaultPermissions
|
||||
// missing/not needed: participantInCall
|
||||
// missing/not needed: participantFlags
|
||||
@ColumnInfo(name = "readOnly") var conversationReadOnlyState: ConversationEnums.ConversationReadOnlyState,
|
||||
// missing/not needed: listable
|
||||
@ColumnInfo(name = "messageExpiration") var messageExpiration: Int = 0,
|
||||
// missing/not needed: count
|
||||
// missing/not needed: numGuests
|
||||
@ColumnInfo(name = "lastPing") var lastPing: Long = 0,
|
||||
@ColumnInfo(name = "sessionId") var sessionId: String,
|
||||
@ColumnInfo(name = "hasPassword") var hasPassword: Boolean = false,
|
||||
@ColumnInfo(name = "hasCall") var hasCall: Boolean = false,
|
||||
@ColumnInfo(name = "callFlag") var callFlag: Int = 0,
|
||||
@ColumnInfo(name = "canStartCall") var canStartCall: Boolean = false,
|
||||
@ColumnInfo(name = "canDeleteConversation") var canDeleteConversation: Boolean,
|
||||
@ColumnInfo(name = "canLeaveConversation") var canLeaveConversation: Boolean,
|
||||
@ColumnInfo(name = "lastActivity") var lastActivity: Long = 0,
|
||||
@ColumnInfo(name = "isFavorite") var favorite: Boolean = false,
|
||||
@ColumnInfo(name = "notificationLevel") var notificationLevel: ConversationEnums.NotificationLevel,
|
||||
@ColumnInfo(name = "lobbyState") var lobbyState: ConversationEnums.LobbyState,
|
||||
@ColumnInfo(name = "lobbyTimer") var lobbyTimer: Long = 0,
|
||||
// missing/not needed: sipEnabled
|
||||
// missing/not needed: canEnableSIP
|
||||
@ColumnInfo(name = "unreadMessages") var unreadMessages: Int = 0,
|
||||
@ColumnInfo(name = "unreadMention") var unreadMention: Boolean = false,
|
||||
@ColumnInfo(name = "unreadMentionDirect") var unreadMentionDirect: Boolean,
|
||||
@ColumnInfo(name = "lastReadMessage") var lastReadMessage: Int = 0,
|
||||
@ColumnInfo(name = "lastCommonReadMessage") var lastCommonReadMessage: Int = 0,
|
||||
@ColumnInfo(name = "lastMessage") var lastMessage: String? = null,
|
||||
@ColumnInfo(name = "objectType") var objectType: ConversationEnums.ObjectType,
|
||||
// missing/not needed: objectId
|
||||
// missing/not needed: breakoutRoomMode
|
||||
// missing/not needed: breakoutRoomStatus
|
||||
@ColumnInfo(name = "status") var status: String? = null,
|
||||
@ColumnInfo(name = "statusIcon") var statusIcon: String? = null,
|
||||
@ColumnInfo(name = "statusMessage") var statusMessage: String? = null,
|
||||
@ColumnInfo(name = "statusClearAt") var statusClearAt: Long? = 0,
|
||||
@ColumnInfo(name = "avatarVersion") var avatarVersion: String,
|
||||
@ColumnInfo(name = "isCustomAvatar") var hasCustomAvatar: Boolean,
|
||||
@ColumnInfo(name = "callStartTime") var callStartTime: Long = 0,
|
||||
@ColumnInfo(name = "callRecording") var callRecording: Int = 0,
|
||||
@ColumnInfo(name = "recordingConsent") var recordingConsentRequired: Int = 0,
|
||||
|
||||
@ColumnInfo(name = "notificationCalls") var notificationCalls: Int = 0,
|
||||
@ColumnInfo(name = "remoteServer") var remoteServer: String? = null,
|
||||
@ColumnInfo(name = "remoteToken") var remoteToken: String? = null
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче