mattermost-mobile/app/database/models/server/role.ts
Elias Nahum 17e832e689
[Gekidou] Refactor storage layer (#5471)
* Refactored storage layer - in progress

* Refactored DatabaseManager & Operators

* Renamed isRecordAppEqualToRaw to isRecordInfoEqualToRaw

* Review feedback

* Update app/database/models/app/info.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/database/models/server/my_team.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2021-06-21 17:06:18 -04:00

22 lines
691 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Model} from '@nozbe/watermelondb';
import {field, json} from '@nozbe/watermelondb/decorators';
import {MM_TABLES} from '@constants/database';
const {ROLE} = MM_TABLES.SERVER;
/** The Role model will describe the set of permissions for each role */
export default class Role extends Model {
/** table (name) : Role */
static table = ROLE;
/** name : The role's name */
@field('name') name!: string;
/** permissions : The different permissions associated to that role */
@json('permissions', (rawJson) => rawJson) permissions!: string[];
}