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'
|
2019-01-21 22:32:42 +00:00
|
|
|
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,
|
2019-01-21 22:32:42 +00:00
|
|
|
Profile,
|
|
|
|
Pledge
|
2019-01-15 14:18:04 +00:00
|
|
|
],
|
|
|
|
actionsEnabled: true,
|
|
|
|
})
|
2019-01-15 18:32:55 +00:00
|
|
|
|
|
|
|
export default database
|