Moving things around and preping things for IDAA. Archive, Posts, Recovery Meetings

This commit is contained in:
Scott Idem
2024-09-24 20:05:52 -04:00
parent 6dc89083ec
commit 41706fbcd7
2 changed files with 124 additions and 7 deletions

115
src/lib/db_archives.ts Normal file
View 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;
}

View File

@@ -60,13 +60,13 @@ export interface Note {
passcode_write_expire?: null|Date
enable: null|boolean;
hide: null|boolean;
priority: null|boolean
sort: null|number;
group: null|string;
notes: null|string;
hide?: null|boolean;
priority?: null|boolean
sort?: null|number;
group?: null|string;
notes?: null|string;
created_on: Date;
updated_on: null|Date;
updated_on?: null|Date;
// Additional fields for convenience (database views)
file_count?: null|number; // Only files directly under a note
@@ -92,7 +92,9 @@ export interface Note {
note_presentation_li?: null|list;
// A key value list of the files
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!!!
obj_id?: null|string;