blob: b1a1b9368c4e42813fe76e83c936ef334a3f69a0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import type { AniListAuthorisation } from '$lib/Data/AniList/identity';
import Dexie, { type Table } from 'dexie';
export interface User {
id: number;
user: AniListAuthorisation;
lastNotificationID: number | null;
}
export class UserDatabase extends Dexie {
users: Table<User>;
constructor() {
super('users');
this.version(1).stores({
users: 'id, user, lastNotificationID'
});
this.users = this.table('users');
}
}
export const database = new UserDatabase();
|