chore: import MCTF services
- Added all seven issued service trees without omissions. - Preserved the supplied runtime configuration, binaries, and assets.
This commit is contained in:
commit
13f936bee9
1222 files changed
+21280
No files matched your search
Executable
+65
@@ -0,0 +1,65 @@
|
||||
use chrono::NaiveDateTime;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "server", derive(sqlx::FromRow))]
|
||||
pub struct Workspace {
|
||||
pub id: Uuid,
|
||||
pub title: String,
|
||||
pub description: Option<String>,
|
||||
pub created_at: NaiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "server", derive(sqlx::Type))]
|
||||
#[cfg_attr(
|
||||
feature = "server",
|
||||
sqlx(type_name = "role", rename_all = "snake_case")
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum Role {
|
||||
User,
|
||||
WorkspaceAdmin,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "server", derive(sqlx::FromRow))]
|
||||
pub struct User {
|
||||
pub id: Uuid,
|
||||
pub username: String,
|
||||
pub workspace_id: Option<Uuid>,
|
||||
pub role: Role,
|
||||
pub created_at: NaiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "server", derive(sqlx::FromRow))]
|
||||
pub struct Session {
|
||||
pub user_id: Uuid,
|
||||
pub cookie: String,
|
||||
pub expires_at: NaiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "server", derive(sqlx::FromRow))]
|
||||
pub struct File {
|
||||
pub id: Uuid,
|
||||
pub name: String,
|
||||
pub filename: String,
|
||||
pub owner_id: Uuid,
|
||||
pub workspace_id: Option<Uuid>,
|
||||
pub size: i64,
|
||||
pub created_at: NaiveDateTime,
|
||||
pub is_public: bool,
|
||||
pub owner: String,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "server", derive(sqlx::FromRow))]
|
||||
pub struct AuthPolicy {
|
||||
pub id: Uuid,
|
||||
pub name: String,
|
||||
pub filename: String,
|
||||
pub workspace_id: Uuid,
|
||||
}
|
||||
Reference in new issue
Block a user