forked from Ivasoft/mattermost-mobile
* Database init * Naming fix * naming misc * Fix test * Added Thread Tab columns, Team Threads Count table and other changes * Test case fix * Test cases fix ...... AGAIN * TS fix * Removed loaded_in_all_threads_tab, loaded_in_unreads_tab * Removed TeamThreadsCount table, mention & message root counts & added loadedInGlobalThreads flag * Type changes, added delete thread with post * Removed unused type * Reverted relationshio of post with thread * Calling thread destroyPermanently from post * Removed unused table name variables * added THREAD constant table in post model and fixed a few comments * Misc typo fix and code clean up * Added test case and related to participant in user model * test cases fix Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
39 lines
1.9 KiB
TypeScript
39 lines
1.9 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import ServerDataOperatorBase from '@database/operator/server_data_operator/handlers';
|
|
import CategoryHandler, {CategoryHandlerMix} from '@database/operator/server_data_operator/handlers/category';
|
|
import ChannelHandler, {ChannelHandlerMix} from '@database/operator/server_data_operator/handlers/channel';
|
|
import PostHandler, {PostHandlerMix} from '@database/operator/server_data_operator/handlers/post';
|
|
import PostsInChannelHandler, {PostsInChannelHandlerMix} from '@database/operator/server_data_operator/handlers/posts_in_channel';
|
|
import PostsInThreadHandler, {PostsInThreadHandlerMix} from '@database/operator/server_data_operator/handlers/posts_in_thread';
|
|
import ReactionHander, {ReactionHandlerMix} from '@database/operator/server_data_operator/handlers/reaction';
|
|
import TeamHandler, {TeamHandlerMix} from '@database/operator/server_data_operator/handlers/team';
|
|
import ThreadHandler, {ThreadHandlerMix} from '@database/operator/server_data_operator/handlers/thread';
|
|
import UserHandler, {UserHandlerMix} from '@database/operator/server_data_operator/handlers/user';
|
|
import mix from '@utils/mix';
|
|
|
|
import type {Database} from '@nozbe/watermelondb';
|
|
|
|
interface ServerDataOperator extends ServerDataOperatorBase, PostHandlerMix, PostsInChannelHandlerMix,
|
|
PostsInThreadHandlerMix, ReactionHandlerMix, UserHandlerMix, ChannelHandlerMix, CategoryHandlerMix, TeamHandlerMix, ThreadHandlerMix {}
|
|
|
|
class ServerDataOperator extends mix(ServerDataOperatorBase).with(
|
|
CategoryHandler,
|
|
ChannelHandler,
|
|
PostHandler,
|
|
PostsInChannelHandler,
|
|
PostsInThreadHandler,
|
|
ReactionHander,
|
|
TeamHandler,
|
|
ThreadHandler,
|
|
UserHandler,
|
|
) {
|
|
// eslint-disable-next-line no-useless-constructor
|
|
constructor(database: Database) {
|
|
super(database);
|
|
}
|
|
}
|
|
|
|
export default ServerDataOperator;
|