mattermost-mobile/app/database/schema/server/table_schemas/post.ts
Elias Nahum 324dbbd054
[Gekidou] fix database schema and models (#5553)
* fix database schema and models

* fix types
2021-07-20 23:24:42 +04:00

28 lines
997 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {tableSchema} from '@nozbe/watermelondb';
import {MM_TABLES} from '@constants/database';
const {POST} = MM_TABLES.SERVER;
export default tableSchema({
name: POST,
columns: [
{name: 'channel_id', type: 'string', isIndexed: true},
{name: 'create_at', type: 'number'},
{name: 'delete_at', type: 'number'},
{name: 'update_at', type: 'number'},
{name: 'edit_at', type: 'number'},
{name: 'is_pinned', type: 'boolean'},
{name: 'message', type: 'string'},
{name: 'original_id', type: 'string'},
{name: 'pending_post_id', type: 'string', isIndexed: true},
{name: 'previous_post_id', type: 'string'},
{name: 'props', type: 'string'},
{name: 'root_id', type: 'string'},
{name: 'type', type: 'string'},
{name: 'user_id', type: 'string', isIndexed: true},
],
});