mattermost-mobile/app/database/server/schema/table_schemas/user.ts
Avinash Lingaloo e471efa48f
MM_30476 [v2] Section 'User' of the server schema (#5073)
* MM_30476 : Added all isolated tables from the server schema

* MM_30476 : Updated 'test' script in package.json

* MM_30476 : Added USER section of the server schema

* MM_30476 : Added the models index back

* MM_30476 : Updated User entity as per previous comments

* MM_30476 : Added lazy query to channel membership

* MM_30476 : Adjusted PR as per suggestions

* MM_30476 : Update nick_name in user model

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* MM_30476 : Adjusted extra padding

* MM_30476 : Corrected ChannelMemberShipSchema to ChannelMembershipSchema

* MM_30476 : Updated types/database/index.ts to types/database/index.d.ts

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-01-13 13:17:38 -03:00

32 lines
1.1 KiB
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 {USER} = MM_TABLES.SERVER;
export default tableSchema({
name: USER,
columns: [
{name: 'auth_service', type: 'string'},
{name: 'delete_at', type: 'number'},
{name: 'email', type: 'string'},
{name: 'first_name', type: 'string'},
{name: 'is_bot', type: 'boolean'},
{name: 'is_guest', type: 'boolean'},
{name: 'last_name', type: 'string'},
{name: 'last_picture_update', type: 'number'},
{name: 'locale', type: 'string'},
{name: 'nickname', type: 'string'},
{name: 'notify_props', type: 'string'},
{name: 'position', type: 'string'},
{name: 'props', type: 'string'},
{name: 'roles', type: 'string'},
{name: 'status', type: 'string'},
{name: 'timezone', type: 'string'},
{name: 'user_id', type: 'string'},
{name: 'username', type: 'string'},
],
});