mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 20:56:19 -08:00
75 lines
2.2 KiB
TypeScript
75 lines
2.2 KiB
TypeScript
import { DBConfig } from 'ngx-indexed-db';
|
|
|
|
/**
|
|
* Contains names of the database stores
|
|
*/
|
|
export enum DbStores {
|
|
Playlists = 'playlists',
|
|
}
|
|
|
|
/** Defines db tables and schema */
|
|
export const dbConfig: DBConfig = {
|
|
name: 'iptvnator',
|
|
version: 1,
|
|
objectStoresMeta: [
|
|
{
|
|
store: DbStores.Playlists,
|
|
storeConfig: { keyPath: '_id', autoIncrement: false },
|
|
storeSchema: [
|
|
{
|
|
name: '_id',
|
|
keypath: '_id',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'filename',
|
|
keypath: 'filename',
|
|
options: { unique: false },
|
|
},
|
|
{ name: 'title', keypath: 'title', options: { unique: false } },
|
|
{ name: 'count', keypath: 'count', options: { unique: false } },
|
|
{
|
|
name: 'playlist',
|
|
keypath: 'playlist',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'importDate',
|
|
keypath: 'importDate',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'lastUsage',
|
|
keypath: 'lastUsage',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'favorites',
|
|
keypath: 'favorites',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'recentlyViewed',
|
|
keypath: 'recentlyViewed',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'autoRefresh',
|
|
keypath: 'autoRefresh',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'url',
|
|
keypath: 'url',
|
|
options: { unique: false },
|
|
},
|
|
{
|
|
name: 'filePath',
|
|
keypath: 'filePath',
|
|
options: { unique: false },
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|