gitdataai/libs/models/projects/project.rs
2026-04-14 19:02:01 +08:00

25 lines
724 B
Rust

use crate::{DateTimeUtc, ProjectId, UserId, WorkspaceId};
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "project")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: ProjectId,
pub name: String,
pub display_name: String,
pub avatar_url: Option<String>,
pub description: Option<String>,
pub is_public: bool,
pub created_by: UserId,
pub workspace_id: Option<WorkspaceId>,
pub created_at: DateTimeUtc,
pub updated_at: DateTimeUtc,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}