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

27 lines
762 B
Rust

use crate::{DateTimeUtc, ProjectId, RepoId, UserId};
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "repo")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: RepoId,
pub repo_name: String,
pub project: ProjectId,
pub description: Option<String>,
pub default_branch: String,
pub is_private: bool,
pub storage_path: String,
pub created_by: UserId,
pub created_at: DateTimeUtc,
pub updated_at: DateTimeUtc,
#[sea_orm(default)]
pub ai_code_review_enabled: bool,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}