realm-js/examples/ReactExample/components/realm.js

27 lines
592 B
JavaScript
Raw Normal View History

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';
import Realm from 'realm';
2015-10-07 23:20:05 +00:00
export default new Realm({
2015-10-07 23:20:05 +00:00
schema: [
{
name: 'Todo',
properties: {
done: {type: Realm.Types.BOOL, default: false},
text: Realm.Types.STRING,
},
2015-10-07 23:20:05 +00:00
},
{
name: 'TodoList',
properties: {
name: Realm.Types.STRING,
items: {type: Realm.Types.LIST, objectType: 'Todo', default: []},
},
2015-10-07 23:20:05 +00:00
},
],
});