liquid-funding/app/db.js

28 lines
568 B
JavaScript
Raw Normal View History

2019-01-15 14:18:04 +00:00
import { Database } from '@nozbe/watermelondb'
import LokiJSAdapter from '@nozbe/watermelondb/adapters/lokijs'
import schema from './model/schema'
2019-01-15 18:32:55 +00:00
import LpEvent from './model/lpEvents'
2019-01-25 17:18:44 +00:00
import VaultEvent from './model/vaultEvent'
2019-01-18 21:22:20 +00:00
import Profile from './model/profile'
import Pledge from './model/pledge'
2019-01-15 14:18:04 +00:00
2019-01-18 21:34:02 +00:00
const dbName = 'LiquidFunding'
2019-01-15 14:18:04 +00:00
const adapter = new LokiJSAdapter({
2019-01-18 21:34:02 +00:00
dbName,
2019-01-15 14:18:04 +00:00
schema,
})
const database = new Database({
adapter,
modelClasses: [
2019-01-17 19:18:09 +00:00
LpEvent,
2019-01-25 17:18:44 +00:00
VaultEvent,
Profile,
Pledge
2019-01-15 14:18:04 +00:00
],
actionsEnabled: true,
})
2019-01-15 18:32:55 +00:00
export default database