Files
mattermost-mobile/app/database/operator/utils/mock.ts
Anurag Shivarathri 9dbdae22fd [Gekidou MM-39707] CRT DB (#5948)
* 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>
2022-03-03 22:47:29 +05:30

205 lines
6.7 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
export const mockedPosts = {
order: [
'8swgtrrdiff89jnsiwiip3y1eoe',
'8fcnk3p1jt8mmkaprgajoxz115a',
'3y3w3a6gkbg73bnj3xund9o5ic',
'4btbnmticjgw7ewd3qopmpiwqw',
],
posts: {
'8swgtrrdiff89jnsiwiip3y1eoe': {
id: '8swgtrrdiff89jnsiwiip3y1eoe',
create_at: 1596032651748,
update_at: 1596032651748,
edit_at: 0,
delete_at: 0,
is_pinned: false,
user_id: 'q3mzxua9zjfczqakxdkowc6u6yy',
channel_id: 'xxoq1p6bqg7dkxb3kj1mcjoungw',
root_id: 'ps81iqbesfby8jayz7owg4yypoo',
parent_id: 'ps81iqbddesfby8jayz7owg4yypoo',
original_id: '',
message: "I'll second these kudos! Thanks m!",
type: '',
props: {},
hashtags: '',
pending_post_id: '',
reply_count: 4,
last_reply_at: 0,
metadata: {},
},
'8fcnk3p1jt8mmkaprgajoxz115a': {
id: '8fcnk3p1jt8mmkaprgajoxz115a',
create_at: 1601557961124,
update_at: 1601557961124,
edit_at: 0,
delete_at: 0,
is_pinned: false,
user_id: 'hy5sq51sebfh58ktrce5ijtcwyy',
channel_id: 'xxoq1p6bqg7dkxb3kj1mcjoungw',
root_id: '',
parent_id: '',
original_id: '',
message: 'a added to the channel by j.',
type: 'system_add_to_channel',
props: {
addedUserId: 'z89qsntet7bimd3xddfu7u9ncdaxc',
addedUsername: 'a',
userId: 'hy5sdfdfq51sebfh58ktrce5ijtcwy',
username: 'j',
},
hashtags: '',
pending_post_id: '',
reply_count: 0,
last_reply_at: 0,
metadata: {},
},
'3y3w3a6gkbg73bnj3xund9o5ic': {
id: '3y3w3a6gkbg73bnj3xund9o5ic',
create_at: 1596213796212,
update_at: 1596213796212,
edit_at: 0,
delete_at: 0,
is_pinned: false,
user_id: '44ud4m9tqwby3mphzzdwm7h31sr',
channel_id: 'xxoq1p6bqg7dkxb3kj1mcjoungw',
root_id: 'ps81iqbewesfby8jayz7owg4yypo',
parent_id: 'ps81iqbwesfby8jayz7owg4yypo',
original_id: '',
message: 'Great work M!',
type: '',
props: {},
hashtags: '',
pending_post_id: '',
reply_count: 4,
last_reply_at: 0,
metadata: {},
},
'4btbnmticjgw7ewd3qopmpiwqw': {
id: '4btbnmticjgw7ewd3qopmpiwqw',
create_at: 1603221654312,
update_at: 1603221654312,
edit_at: 0,
delete_at: 0,
is_pinned: false,
user_id: 'opihgdf9nby385mnxj7a5jpfsy3e',
channel_id: 'xxoq1p6bqg7dkxb3kj1mcjoungw',
root_id: '',
parent_id: '',
original_id: '',
message: 'eannel.',
type: 'system_join_channel',
props: {
username: 'dok',
},
hashtags: '',
pending_post_id: '',
reply_count: 0,
last_reply_at: 0,
metadata: {},
},
'4r9jmr7eqt8dxq3f9woypzurry': {
id: '4r9jmr7eqt8dxq3f9woypzurry',
create_at: 1608252986811,
update_at: 1608323574215,
edit_at: 0,
delete_at: 0,
is_pinned: false,
user_id: '1zkzkhh357b4bdfejephjz5u8daw',
channel_id: 'xxoq1p6bqg7dkxb3kj1mcjoungw',
root_id: 'a7ebyw883sdftrm884p1qcgt8yw4a',
parent_id: 'a7ebyw8q83trm884p1qcgt8yw4a',
original_id: '',
message: 'Oh off fixed',
type: '',
props: {},
hashtags: '',
pending_post_id: '',
has_reactions: true,
reply_count: 7,
last_reply_at: 0,
metadata: {
reactions: [
{
user_id: 'weeoa9janfdmbgp3wrgcbofxpo',
post_id: '4r9jmr7eqt8dxq3f9woypzurry',
emoji_name: 'thumbsup',
create_at: 1608253011321,
update_at: 1608253011321,
delete_at: 0,
},
{
user_id: 'dbjk4taox3fn5mxnua7fc5zo6c',
post_id: '4r9jmr7eqt8dxq3f9woypzurry',
emoji_name: 'thumbsup',
create_at: 1608253070704,
update_at: 1608253070704,
delete_at: 0,
},
],
},
},
'7mwm4hb7g3bx8e1yumpi5zgwtw': {
id: '7mwm4hb7g3bx8e1yumpi5zgwtw',
create_at: 1608289643899,
update_at: 1608289727232,
edit_at: 1608289727232,
delete_at: 0,
is_pinned: false,
user_id: '1zkzkhhk357b4bejephjz5u8daw',
channel_id: 'xxoq1p6bqg7dkxb3kj1mcjoungw',
root_id: 'a7ebyw8f83trm884p1qcgt8yw4a',
parent_id: 'a7ebyw883trm884p1qcgt8yw4a',
original_id: '',
message: 'There are many ',
type: '',
props: {},
hashtags: '',
pending_post_id: '',
reply_count: 7,
last_reply_at: 0,
metadata: {
emojis: [
{
id: 'by3ddj8act7g1icikwehpksi1ycd',
create_at: 1580913641769,
update_at: 1580913641769,
delete_at: 0,
creator_id: '4cdprpki7ri81mbx8efixdcsb8jo',
name: 'boom2',
},
],
},
},
},
};
export const mockedReactions = [
{
user_id: 'beqkgo4wzbn98kjzjgc1p5n91o',
post_id: '8ww8kb1dbpf59fu4d5xhu5nf5w',
emoji_name: 'tada',
create_at: 1601558322701,
update_at: 1601558322701,
delete_at: 0,
},
{
user_id: 'z89qsntet7bimd3xu7u9ncdaxc',
post_id: '8ww8kb1dbpf59fu4d5xhu5nf5w',
emoji_name: 'thanks',
create_at: 1601558379209,
update_at: 1601558379209,
delete_at: 0,
},
{
user_id: 'z89qsntet7bimd3xu7u9ncdaxc',
post_id: '8ww8kb1dbpf59fu4d5xhu5nf5w',
emoji_name: 'thumbsup',
create_at: 1601558413496,
update_at: 1601558413496,
delete_at: 0,
},
];