mirror of
https://github.com/bitwarden/mobile
synced 2025-12-30 07:03:48 +00:00
28 lines
751 B
C#
28 lines
751 B
C#
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>();
|
|
_connection.CreateTable<CollectionData>();
|
|
_connection.CreateTable<CipherData>();
|
|
_connection.CreateTable<CipherCollectionData>();
|
|
_connection.CreateTable<AttachmentData>();
|
|
_connection.CreateTable<SettingsData>();
|
|
}
|
|
}
|
|
}
|