2015-10-27 23:19:30 +00:00
|
|
|
/* Copyright 2015 Realm Inc - All Rights Reserved
|
|
|
|
* Proprietary and Confidential
|
|
|
|
*/
|
|
|
|
|
2015-10-07 23:20:05 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const Realm = require('realm');
|
|
|
|
|
|
|
|
module.exports = new Realm({
|
|
|
|
schema: [
|
|
|
|
{
|
|
|
|
name: 'Todo',
|
|
|
|
properties: [
|
2015-10-26 19:10:40 +00:00
|
|
|
{name: 'done', type: Realm.Types.BOOL, default: false},
|
|
|
|
{name: 'text', type: Realm.Types.STRING, default: ''},
|
2015-10-07 23:20:05 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'TodoList',
|
|
|
|
properties: [
|
|
|
|
{name: 'name', type: Realm.Types.STRING},
|
|
|
|
{name: 'items', type: Realm.Types.LIST, objectType: 'Todo'},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|