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