import { Injectable } from '@angular/core';
import Dexie from 'dexie';
import { LaunchState } from '../model';

const DatabaseVersion = 1;

@Injectable({
  providedIn: 'root'
})
export class DatabaseService extends Dexie {
  public launches!: Dexie.Table<LaunchState, number>;

  public constructor() {
    super('overflow-scanner');
    this.version(1).stores({
      launches: '++'
    });
  }
}
