72b2d17
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "pull_request_comment")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub pull_request_id: Uuid,
pub user_id: Uuid,
pub review_id: Option<Uuid>,
pub commit_sha: String,
pub path: String,
pub line: Option<i32>,
pub body: String,
pub created_at: OffsetDateTime,
pub updated_at: Option<OffsetDateTime>,
#[sea_orm(belongs_to, from = "pull_request_id", to = "id")]
pub pull_request: BelongsTo<super::pull_requests::Entity>,
#[sea_orm(belongs_to, from = "user_id", to = "uid")]
pub user: BelongsTo<super::super::user::users::Entity>,
#[sea_orm(belongs_to, from = "review_id", to = "id")]
pub review: BelongsTo<Option<super::pull_request_review::Entity>>,
}
impl ActiveModelBehavior for ActiveModel {}