25 lines
815 B
Rust
25 lines
815 B
Rust
use crate::models::common::{JsonValue, Provider, SyncDirection};
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct ImIntegration {
|
|
pub id: Uuid,
|
|
pub workspace_id: Uuid,
|
|
pub provider: Provider,
|
|
pub name: String,
|
|
pub external_workspace_id: Option<String>,
|
|
pub internal_channel_id: Option<Uuid>,
|
|
pub external_channel_id: Option<String>,
|
|
pub bot_token_ciphertext: Option<String>,
|
|
pub webhook_url: Option<String>,
|
|
pub sync_direction: SyncDirection,
|
|
pub user_mapping: Option<JsonValue>,
|
|
pub enabled: bool,
|
|
pub installed_by: Uuid,
|
|
pub last_sync_at: Option<DateTime<Utc>>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
}
|