2ae9196
ZhenYi
feat(lib/git): add HTTP handler tree with routes and errors across analysis, archives, blobs, branches, commits, conflicts, content, diffs, hooks, lfs, logs, maintenance, packs, patches, pipelines, refs, remotes, repos, signatures, submodules, tags, trees
2ae9196
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "git_commit")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub repo_id: Uuid,
#[sea_orm(primary_key, auto_increment = false)]
pub sha: String,
pub message: String,
pub author_id: Option<Uuid>,
pub author_name: String,
pub author_email: String,
pub authored_at: OffsetDateTime,
pub committer_name: String,
pub committer_email: String,
pub committed_at: OffsetDateTime,
pub created_at: OffsetDateTime,
#[sea_orm(belongs_to, from = "repo_id", to = "id")]
pub repo: BelongsTo<super::super::repo::repos::Entity>,
#[sea_orm(belongs_to, from = "author_id", to = "uid")]
pub author: BelongsTo<Option<super::super::users::user::Entity>>,
}
impl ActiveModelBehavior for ActiveModel {}