* Make message_count become has_unreads * Fix lint * Re-add the message count * rename has_unreads to is_unread and address feedback * fix query with is_unread Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
22 lines
709 B
TypeScript
22 lines
709 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 {MY_CHANNEL} = MM_TABLES.SERVER;
|
|
|
|
export default tableSchema({
|
|
name: MY_CHANNEL,
|
|
columns: [
|
|
{name: 'last_post_at', type: 'number'},
|
|
{name: 'last_viewed_at', type: 'number'},
|
|
{name: 'manually_unread', type: 'boolean'},
|
|
{name: 'mentions_count', type: 'number'},
|
|
{name: 'message_count', type: 'number'},
|
|
{name: 'is_unread', type: 'boolean'},
|
|
{name: 'roles', type: 'string'},
|
|
{name: 'viewed_at', type: 'number'},
|
|
],
|
|
});
|