gitdataai/libs/models/repos/repo_commit.rs
2026-04-15 09:08:09 +08:00

28 lines
759 B
Rust

use crate::{DateTimeUtc, RepoId, UserId};
use sea_orm::JsonValue;
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "repo_commit")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i64,
pub repo: RepoId,
pub oid: String,
pub author_name: String,
pub author_email: String,
pub author: Option<UserId>,
pub commiter_name: String,
pub commiter_email: String,
pub commiter: Option<UserId>,
pub message: String,
pub parent: JsonValue,
pub created_at: DateTimeUtc,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}