Files
mattermost-mobile/app/database/models/server/config.ts
Daniel Espino García 1aa4188f8e Move config to its own database table (#6744)
* Move config to its own database table

* Address feedback

* Fix test

* Revert minimum version related changes
2022-11-11 21:20:42 +04:00

24 lines
775 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Model} from '@nozbe/watermelondb';
import {field} from '@nozbe/watermelondb/decorators';
import {MM_TABLES} from '@constants/database';
import type ConfigModelInterface from '@typings/database/models/servers/config';
const {CONFIG} = MM_TABLES.SERVER;
/**
* The Config model is another set of key-value pair combination but this one
* will hold the server configuration.
*/
export default class ConfigModel extends Model implements ConfigModelInterface {
/** table (name) : Config */
static table = CONFIG;
/** value : The value for that config/information and whose key will be the id column */
@field('value') value!: string;
}