Files
mattermost-mobile/app/database/models/server/role.ts
Elias Nahum 8cd127a223 [Gekidou] Typings & PostMetadata structure (#5542)
* Typings & PostMetadata structure

* comment out unused code

* Remove duplicate interface

* Fix getPreferenceAsBool defaultValue
2021-07-15 11:49:02 -04:00

24 lines
735 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';
import {safeParseJSON} from '@utils/helpers';
const {ROLE} = MM_TABLES.SERVER;
/** The Role model will describe the set of permissions for each role */
export default class RoleModel 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', safeParseJSON) permissions!: string[];
}