Moving things around and preping things for IDAA. Archive, Posts, Recovery Meetings
This commit is contained in:
115
src/lib/db_archives.ts
Normal file
115
src/lib/db_archives.ts
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
import Dexie, { type Table } from 'dexie';
|
||||||
|
|
||||||
|
import type { key_val } from './ae_stores';
|
||||||
|
|
||||||
|
// li = list
|
||||||
|
// kv = key value list
|
||||||
|
|
||||||
|
export interface Archive {
|
||||||
|
id: string;
|
||||||
|
// id_random: string;
|
||||||
|
archive_id: string;
|
||||||
|
// archive_id_random: string;
|
||||||
|
|
||||||
|
code?: null|string;
|
||||||
|
|
||||||
|
account_id: string;
|
||||||
|
// account_id_random: string;
|
||||||
|
|
||||||
|
// archive_type: string;
|
||||||
|
|
||||||
|
// type: string;
|
||||||
|
name: string;
|
||||||
|
// summary?: null|string;
|
||||||
|
description?: null|string;
|
||||||
|
|
||||||
|
content_html?: null|string;
|
||||||
|
content_json?: null|string;
|
||||||
|
content_url?: null|string;
|
||||||
|
content_url_text?: null|string;
|
||||||
|
|
||||||
|
original_datetime?: Date;
|
||||||
|
original_timezone?: null|string;
|
||||||
|
original_location?: null|string;
|
||||||
|
|
||||||
|
original_url?: null|string;
|
||||||
|
original_url_text?: null|string;
|
||||||
|
|
||||||
|
// meta_data?: null|string;
|
||||||
|
// access_key?: null|string; /// Rename this to "passcode" if used later
|
||||||
|
|
||||||
|
sort_by?: null|string;
|
||||||
|
sort_by_desc?: null|string;
|
||||||
|
|
||||||
|
start_datetime?: Date;
|
||||||
|
end_datetime?: Date;
|
||||||
|
timezone?: null|string;
|
||||||
|
location_address_json?: null|string;
|
||||||
|
|
||||||
|
cfg_json?: null|key_val;
|
||||||
|
|
||||||
|
enable: null|boolean;
|
||||||
|
hide?: null|boolean;
|
||||||
|
priority?: null|boolean
|
||||||
|
sort?: null|number;
|
||||||
|
group?: null|string;
|
||||||
|
notes?: null|string;
|
||||||
|
created_on: Date;
|
||||||
|
updated_on?: null|Date;
|
||||||
|
|
||||||
|
// Additional fields for convenience (database views)
|
||||||
|
archive_content_count: number;
|
||||||
|
// file_count?: null|number;
|
||||||
|
// file_count_all?: null|number;
|
||||||
|
// archive_file_id_li_json?: null|string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Archive_Content {
|
||||||
|
id: string;
|
||||||
|
// id_random: string;
|
||||||
|
archive_content_id: string;
|
||||||
|
// archive_content_id_random: string;
|
||||||
|
|
||||||
|
archive_id: string;
|
||||||
|
// archive_id_random: string;
|
||||||
|
|
||||||
|
archive_content_type: string;
|
||||||
|
|
||||||
|
name: string;
|
||||||
|
description?: null|string;
|
||||||
|
|
||||||
|
content_html?: null|string;
|
||||||
|
content_json?: null|string;
|
||||||
|
|
||||||
|
url?: null|string;
|
||||||
|
url_text?: null|string;
|
||||||
|
|
||||||
|
hosted_file_id?: string;
|
||||||
|
|
||||||
|
file_path?: null|string;
|
||||||
|
|
||||||
|
filename?: null|string;
|
||||||
|
file_extension?: null|string;
|
||||||
|
|
||||||
|
original_datetime?: Date;
|
||||||
|
original_timezone?: null|string;
|
||||||
|
original_location?: null|string;
|
||||||
|
original_url?: null|string;
|
||||||
|
original_url_text?: null|string;
|
||||||
|
|
||||||
|
// meta_data?: null|string;
|
||||||
|
// access_key?: null|string; /// Rename this to "passcode" if used later
|
||||||
|
|
||||||
|
enable_for_public?: boolean;
|
||||||
|
|
||||||
|
cfg_json?: null|key_val;
|
||||||
|
|
||||||
|
enable: null|boolean;
|
||||||
|
hide?: null|boolean;
|
||||||
|
priority?: null|boolean
|
||||||
|
sort?: null|number;
|
||||||
|
group?: null|string;
|
||||||
|
notes?: null|string;
|
||||||
|
created_on: Date;
|
||||||
|
updated_on?: null|Date;
|
||||||
|
}
|
||||||
@@ -60,13 +60,13 @@ export interface Note {
|
|||||||
passcode_write_expire?: null|Date
|
passcode_write_expire?: null|Date
|
||||||
|
|
||||||
enable: null|boolean;
|
enable: null|boolean;
|
||||||
hide: null|boolean;
|
hide?: null|boolean;
|
||||||
priority: null|boolean
|
priority?: null|boolean
|
||||||
sort: null|number;
|
sort?: null|number;
|
||||||
group: null|string;
|
group?: null|string;
|
||||||
notes: null|string;
|
notes?: null|string;
|
||||||
created_on: Date;
|
created_on: Date;
|
||||||
updated_on: null|Date;
|
updated_on?: null|Date;
|
||||||
|
|
||||||
// Additional fields for convenience (database views)
|
// Additional fields for convenience (database views)
|
||||||
file_count?: null|number; // Only files directly under a note
|
file_count?: null|number; // Only files directly under a note
|
||||||
@@ -92,7 +92,9 @@ export interface Note {
|
|||||||
note_presentation_li?: null|list;
|
note_presentation_li?: null|list;
|
||||||
// A key value list of the files
|
// A key value list of the files
|
||||||
note_file_kv?: null|key_val;
|
note_file_kv?: null|key_val;
|
||||||
note_file_li?: null|list;
|
note_file_li?: null|[];
|
||||||
|
|
||||||
|
// note_collection_id?: null|string; // For a collection of notes?
|
||||||
|
|
||||||
// Future standard fields!!!
|
// Future standard fields!!!
|
||||||
obj_id?: null|string;
|
obj_id?: null|string;
|
||||||
|
|||||||
Reference in New Issue
Block a user