2016-05-02 09:52:09 +03:00
|
|
|
|
using System;
|
|
|
|
|
using Bit.App.Abstractions;
|
|
|
|
|
using Bit.App.Models.Data;
|
|
|
|
|
using SQLite;
|
|
|
|
|
|
|
|
|
|
namespace Bit.App.Services
|
|
|
|
|
{
|
|
|
|
|
public class DatabaseService : IDatabaseService
|
|
|
|
|
{
|
|
|
|
|
protected readonly SQLiteConnection _connection;
|
|
|
|
|
|
|
|
|
|
public DatabaseService(ISqlService sqlService)
|
|
|
|
|
{
|
|
|
|
|
_connection = sqlService.GetConnection();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CreateTables()
|
|
|
|
|
{
|
|
|
|
|
_connection.CreateTable<FolderData>();
|
2017-01-03 08:17:15 +03:00
|
|
|
|
_connection.CreateTable<LoginData>();
|
2017-07-12 23:23:24 +03:00
|
|
|
|
_connection.CreateTable<AttachmentData>();
|
2017-02-09 04:39:37 +03:00
|
|
|
|
_connection.CreateTable<SettingsData>();
|
2016-05-02 09:52:09 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|