2015-10-27 16:19:30 -07:00
|
|
|
/* Copyright 2015 Realm Inc - All Rights Reserved
|
|
|
|
* Proprietary and Confidential
|
|
|
|
*/
|
|
|
|
|
2015-10-07 16:20:05 -07:00
|
|
|
'use strict';
|
|
|
|
|
2016-02-15 15:03:16 -08:00
|
|
|
import Realm from 'realm';
|
2015-10-07 16:20:05 -07:00
|
|
|
|
2016-02-15 15:03:16 -08:00
|
|
|
export default new Realm({
|
2015-10-07 16:20:05 -07:00
|
|
|
schema: [
|
|
|
|
{
|
|
|
|
name: 'Todo',
|
2015-11-02 23:05:06 -08:00
|
|
|
properties: {
|
|
|
|
done: {type: Realm.Types.BOOL, default: false},
|
|
|
|
text: Realm.Types.STRING,
|
|
|
|
},
|
2015-10-07 16:20:05 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'TodoList',
|
2015-11-02 23:05:06 -08:00
|
|
|
properties: {
|
|
|
|
name: Realm.Types.STRING,
|
|
|
|
items: {type: Realm.Types.LIST, objectType: 'Todo', default: []},
|
|
|
|
},
|
2015-10-07 16:20:05 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|