feat: init
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
use crate::models::common::{
|
||||
ChannelKind, ChannelType, ForumLayout, ForumSortOrder, JsonValue, Visibility,
|
||||
};
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
||||
pub struct Channel {
|
||||
pub id: Uuid,
|
||||
pub workspace_id: Uuid,
|
||||
pub repo_id: Option<Uuid>,
|
||||
pub category_id: Option<Uuid>,
|
||||
pub created_by: Uuid,
|
||||
pub name: String,
|
||||
pub topic: Option<String>,
|
||||
pub description: Option<String>,
|
||||
pub channel_type: ChannelType,
|
||||
pub channel_kind: ChannelKind,
|
||||
pub visibility: Visibility,
|
||||
pub position: Option<i32>,
|
||||
pub nsfw: bool,
|
||||
pub archived: bool,
|
||||
pub read_only: bool,
|
||||
pub bitrate: Option<i32>,
|
||||
pub user_limit: Option<i32>,
|
||||
pub rtc_region: Option<String>,
|
||||
pub default_auto_archive_duration: Option<i32>,
|
||||
pub default_reaction_emoji: Option<String>,
|
||||
pub default_sort_order: Option<ForumSortOrder>,
|
||||
pub default_forum_layout: Option<ForumLayout>,
|
||||
pub require_tag: Option<bool>,
|
||||
pub available_tags: Option<JsonValue>,
|
||||
pub default_thread_rate_limit: Option<i32>,
|
||||
pub rate_limit_per_user: Option<i32>,
|
||||
pub parent_channel_id: Option<Uuid>,
|
||||
pub last_message_id: Option<Uuid>,
|
||||
pub last_message_at: Option<DateTime<Utc>>,
|
||||
pub archived_at: Option<DateTime<Utc>>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub updated_at: DateTime<Utc>,
|
||||
pub deleted_at: Option<DateTime<Utc>>,
|
||||
}
|
||||
Reference in New Issue
Block a user