21 lines
415 B
JavaScript
21 lines
415 B
JavaScript
import { Model } from '@nozbe/watermelondb';
|
|
import { field, json } from '@nozbe/watermelondb/decorators';
|
|
|
|
import { sanitizer } from '../utils';
|
|
|
|
export default class User extends Model {
|
|
static table = 'users';
|
|
|
|
@field('_id') _id;
|
|
|
|
@field('name') name;
|
|
|
|
@field('username') username;
|
|
|
|
@field('avatar_etag') avatarETag;
|
|
|
|
@field('login_email_password') loginEmailPassword;
|
|
|
|
@json('roles', sanitizer) roles;
|
|
}
|