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

38 lines
1.2 KiB
Rust

use crate::{DateTimeUtc, RepoId, UserId};
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "pull_request_review_comment")]
pub struct Model {
#[sea_orm(primary_key)]
pub repo: RepoId,
#[sea_orm(primary_key)]
pub number: i64,
#[sea_orm(primary_key)]
pub id: i64,
/// Optional reviewer association.
pub review: Option<UserId>,
/// File path for inline comments.
pub path: Option<String>,
/// "LEFT" or "RIGHT" for side-by-side positioning.
pub side: Option<String>,
/// Line number in the new (right) file.
pub line: Option<i64>,
/// Line number in the old (left) file.
pub old_line: Option<i64>,
pub body: String,
pub author: UserId,
/// Whether this comment thread has been resolved.
pub resolved: bool,
/// ID of the parent comment this replies to (null = root comment).
pub in_reply_to: Option<i64>,
pub created_at: DateTimeUtc,
pub updated_at: DateTimeUtc,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}