// @generated automatically by Diesel CLI. diesel::table! { calendar_events (id) { id -> Integer, event_uid -> Nullable, summary -> Text, description -> Nullable, location -> Nullable, start_time -> BigInt, end_time -> BigInt, all_day -> Bool, organizer -> Nullable, attendees -> Nullable, embedding -> Nullable, created_at -> BigInt, source_file -> Nullable, } } diesel::table! { clip_failures (library_id, rel_path) { library_id -> Integer, rel_path -> Text, content_hash -> Text, error -> Text, failed_at -> BigInt, } } diesel::table! { daily_conversation_summaries (id) { id -> Integer, date -> Text, contact -> Text, summary -> Text, message_count -> Integer, embedding -> Binary, created_at -> BigInt, model_version -> Text, } } diesel::table! { enhance_jobs (id) { id -> Text, original_hash -> Text, library_id -> Integer, rel_path -> Text, template -> Text, prompt -> Nullable, reference_hash -> Nullable, reference_path -> Nullable, comfy_prompt_id -> Text, status -> Text, error -> Nullable, queue_position -> Nullable, pending -> Text, saved -> Text, discarded -> Integer, created_at -> BigInt, updated_at -> BigInt, } } diesel::table! { entities (id) { id -> Integer, name -> Text, entity_type -> Text, description -> Text, embedding -> Nullable, confidence -> Float, status -> Text, created_at -> BigInt, updated_at -> BigInt, } } diesel::table! { entity_facts (id) { id -> Integer, subject_entity_id -> Integer, predicate -> Text, object_entity_id -> Nullable, object_value -> Nullable, source_photo -> Nullable, source_insight_id -> Nullable, confidence -> Float, status -> Text, created_at -> BigInt, persona_id -> Text, user_id -> Integer, valid_from -> Nullable, valid_until -> Nullable, superseded_by -> Nullable, created_by_model -> Nullable, created_by_backend -> Nullable, last_modified_by_model -> Nullable, last_modified_by_backend -> Nullable, last_modified_at -> Nullable, } } diesel::table! { entity_photo_links (id) { id -> Integer, entity_id -> Integer, library_id -> Integer, rel_path -> Text, role -> Text, } } diesel::table! { face_detections (id) { id -> Integer, library_id -> Integer, content_hash -> Text, rel_path -> Text, bbox_x -> Nullable, bbox_y -> Nullable, bbox_w -> Nullable, bbox_h -> Nullable, embedding -> Nullable, confidence -> Nullable, source -> Text, person_id -> Nullable, status -> Text, model_version -> Text, created_at -> BigInt, } } diesel::table! { favorites (id) { id -> Integer, userid -> Integer, rel_path -> Text, } } diesel::table! { image_exif (id) { id -> Integer, library_id -> Integer, rel_path -> Text, camera_make -> Nullable, camera_model -> Nullable, lens_model -> Nullable, width -> Nullable, height -> Nullable, orientation -> Nullable, gps_latitude -> Nullable, gps_longitude -> Nullable, gps_altitude -> Nullable, focal_length -> Nullable, aperture -> Nullable, shutter_speed -> Nullable, iso -> Nullable, date_taken -> Nullable, created_time -> BigInt, last_modified -> BigInt, content_hash -> Nullable, size_bytes -> Nullable, phash_64 -> Nullable, dhash_64 -> Nullable, duplicate_of_hash -> Nullable, duplicate_decided_at -> Nullable, date_taken_source -> Nullable, original_date_taken -> Nullable, original_date_taken_source -> Nullable, clip_embedding -> Nullable, clip_model_version -> Nullable, date_utc -> Nullable, camera_offset_minutes -> Nullable, date_taken_tz_source -> Nullable, original_date_utc -> Nullable, original_camera_offset_minutes -> Nullable, original_date_taken_tz_source -> Nullable, } } diesel::table! { libraries (id) { id -> Integer, name -> Text, root_path -> Text, created_at -> BigInt, enabled -> Bool, excluded_dirs -> Nullable, } } diesel::table! { location_history (id) { id -> Integer, timestamp -> BigInt, latitude -> Float, longitude -> Float, accuracy -> Nullable, activity -> Nullable, activity_confidence -> Nullable, place_name -> Nullable, place_category -> Nullable, embedding -> Nullable, created_at -> BigInt, source_file -> Nullable, } } diesel::table! { persona_chat_conversations (conversation_id) { conversation_id -> Text, user_id -> Integer, persona_id -> Text, title -> Text, messages_json -> Text, turn_count -> Integer, created_at -> BigInt, updated_at -> BigInt, anchor_contact_id -> Nullable, anchor_contact_name -> Nullable, anchor_message_id -> Nullable, anchor_ts -> Nullable, anchor_context -> Nullable, anchor_mode -> Nullable, } } diesel::table! { personas (id) { id -> Integer, user_id -> Integer, persona_id -> Text, name -> Text, system_prompt -> Text, is_built_in -> Bool, include_all_memories -> Bool, created_at -> BigInt, updated_at -> BigInt, reviewed_only_facts -> Bool, allow_agent_corrections -> Bool, } } diesel::table! { persons (id) { id -> Integer, name -> Text, cover_face_id -> Nullable, entity_id -> Nullable, created_from_tag -> Bool, notes -> Nullable, created_at -> BigInt, updated_at -> BigInt, is_ignored -> Bool, } } diesel::table! { photo_insights (id) { id -> Integer, library_id -> Integer, rel_path -> Text, title -> Text, summary -> Text, generated_at -> BigInt, model_version -> Text, is_current -> Bool, training_messages -> Nullable, approved -> Nullable, backend -> Text, fewshot_source_ids -> Nullable, content_hash -> Nullable, num_ctx -> Nullable, temperature -> Nullable, top_p -> Nullable, top_k -> Nullable, min_p -> Nullable, system_prompt -> Nullable, persona_id -> Nullable, prompt_eval_count -> Nullable, eval_count -> Nullable, } } diesel::table! { search_history (id) { id -> Integer, timestamp -> BigInt, query -> Text, search_engine -> Nullable, embedding -> Binary, created_at -> BigInt, source_file -> Nullable, } } diesel::table! { tagged_photo (id) { id -> Integer, rel_path -> Text, tag_id -> Integer, created_time -> BigInt, content_hash -> Nullable, } } diesel::table! { tags (id) { id -> Integer, name -> Text, created_time -> BigInt, } } diesel::table! { users (id) { id -> Integer, username -> Text, password -> Text, } } diesel::table! { user_ai_prefs (id) { id -> Integer, voice -> Nullable, tz_offset_minutes -> Nullable, library -> Nullable, updated_at -> BigInt, display_tz -> Nullable, default_model -> Nullable, default_backend -> Nullable, default_persona_id -> Nullable, reel_span -> Nullable, reel_max_segments -> Nullable, } } diesel::table! { video_preview_clips (id) { id -> Integer, library_id -> Integer, rel_path -> Text, status -> Text, duration_seconds -> Nullable, file_size_bytes -> Nullable, error_message -> Nullable, created_at -> Text, updated_at -> Text, } } diesel::table! { insight_generation_jobs (id) { id -> Integer, library_id -> Integer, file_path -> Text, generation_type -> Text, status -> Text, started_at -> BigInt, completed_at -> Nullable, result_insight_id -> Nullable, error_message -> Nullable, } } diesel::table! { photo_version_display (original_hash) { original_hash -> Text, display_hash -> Text, decided_at -> BigInt, } } diesel::table! { photo_version_references (version_hash, reference_hash) { version_hash -> Text, reference_hash -> Text, } } diesel::table! { photo_versions (version_hash) { version_hash -> Text, original_hash -> Text, kind -> Text, source -> Text, created_at -> BigInt, library_id -> Integer, rel_path -> Text, } } diesel::table! { precomputed_reels (id) { id -> Integer, span -> Text, library_key -> Text, cache_key -> Text, output_path -> Text, title -> Text, media_count -> Integer, render_version -> Integer, tz_offset_minutes -> Integer, voice -> Nullable, generated_at -> BigInt, } } diesel::joinable!(entity_facts -> photo_insights (source_insight_id)); diesel::joinable!(entity_photo_links -> entities (entity_id)); diesel::joinable!(entity_photo_links -> libraries (library_id)); diesel::joinable!(clip_failures -> libraries (library_id)); diesel::joinable!(face_detections -> libraries (library_id)); diesel::joinable!(face_detections -> persons (person_id)); diesel::joinable!(image_exif -> libraries (library_id)); diesel::joinable!(insight_generation_jobs -> libraries (library_id)); diesel::joinable!(personas -> users (user_id)); diesel::joinable!(persons -> entities (entity_id)); diesel::joinable!(photo_insights -> libraries (library_id)); diesel::joinable!(tagged_photo -> tags (tag_id)); diesel::joinable!(video_preview_clips -> libraries (library_id)); diesel::allow_tables_to_appear_in_same_query!( calendar_events, clip_failures, daily_conversation_summaries, enhance_jobs, entities, entity_facts, entity_photo_links, face_detections, favorites, image_exif, insight_generation_jobs, libraries, location_history, persona_chat_conversations, personas, persons, photo_insights, photo_version_display, photo_version_references, photo_versions, precomputed_reels, search_history, tagged_photo, tags, user_ai_prefs, users, video_preview_clips, );