//! `SeaORM` Entity, manually maintained

use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "site_settings")]
pub struct Model {
    pub created_at: DateTimeWithTimeZone,
    pub updated_at: DateTimeWithTimeZone,
    #[sea_orm(primary_key)]
    pub id: i32,
    pub site_name: Option<String>,
    pub site_short_name: Option<String>,
    pub site_url: Option<String>,
    pub site_title: Option<String>,
    pub site_description: Option<String>,
    pub hero_title: Option<String>,
    pub hero_subtitle: Option<String>,
    pub owner_name: Option<String>,
    pub owner_title: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub owner_bio: Option<String>,
    pub owner_avatar_url: Option<String>,
    pub social_github: Option<String>,
    pub social_twitter: Option<String>,
    pub social_email: Option<String>,
    pub location: Option<String>,
    #[sea_orm(column_type = "JsonBinary", nullable)]
    pub tech_stack: Option<Json>,
    #[sea_orm(column_type = "JsonBinary", nullable)]
    pub music_playlist: Option<Json>,
    pub music_enabled: Option<bool>,
    pub maintenance_mode_enabled: Option<bool>,
    #[sea_orm(column_type = "Text", nullable)]
    pub maintenance_access_code: Option<String>,
    pub ai_enabled: Option<bool>,
    pub paragraph_comments_enabled: Option<bool>,
    pub comment_turnstile_enabled: Option<bool>,
    pub subscription_turnstile_enabled: Option<bool>,
    pub comment_verification_mode: Option<String>,
    pub subscription_verification_mode: Option<String>,
    pub web_push_enabled: Option<bool>,
    #[sea_orm(column_type = "Text", nullable)]
    pub turnstile_site_key: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub turnstile_secret_key: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub web_push_vapid_public_key: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub web_push_vapid_private_key: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub web_push_vapid_subject: Option<String>,
    pub ai_provider: Option<String>,
    pub ai_api_base: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub ai_api_key: Option<String>,
    pub ai_chat_model: Option<String>,
    pub ai_image_provider: Option<String>,
    pub ai_image_api_base: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub ai_image_api_key: Option<String>,
    pub ai_image_model: Option<String>,
    #[sea_orm(column_type = "JsonBinary", nullable)]
    pub ai_providers: Option<Json>,
    pub ai_active_provider_id: Option<String>,
    pub ai_embedding_model: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub ai_system_prompt: Option<String>,
    pub ai_top_k: Option<i32>,
    pub ai_chunk_size: Option<i32>,
    pub ai_last_indexed_at: Option<DateTimeWithTimeZone>,
    pub media_storage_provider: Option<String>,
    pub media_r2_account_id: Option<String>,
    pub media_r2_bucket: Option<String>,
    pub media_r2_public_base_url: Option<String>,
    pub media_r2_access_key_id: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub media_r2_secret_access_key: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub seo_favicon_url: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub seo_default_og_image: Option<String>,
    pub seo_default_twitter_handle: Option<String>,
    pub seo_wechat_share_qr_enabled: Option<bool>,
    #[sea_orm(column_type = "Text", nullable)]
    pub notification_webhook_url: Option<String>,
    pub notification_channel_type: Option<String>,
    pub notification_comment_enabled: Option<bool>,
    pub notification_friend_link_enabled: Option<bool>,
    pub subscription_popup_enabled: Option<bool>,
    pub subscription_popup_title: Option<String>,
    #[sea_orm(column_type = "Text", nullable)]
    pub subscription_popup_description: Option<String>,
    pub subscription_popup_delay_seconds: Option<i32>,
    #[sea_orm(column_type = "JsonBinary", nullable)]
    pub search_synonyms: Option<Json>,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}
