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, pub commit_sha: String, pub path: String, pub line: Option, pub body: String, pub created_at: OffsetDateTime, pub updated_at: Option, #[sea_orm(belongs_to, from = "pull_request_id", to = "id")] pub pull_request: BelongsTo, #[sea_orm(belongs_to, from = "user_id", to = "uid")] pub user: BelongsTo, #[sea_orm(belongs_to, from = "review_id", to = "id")] pub review: BelongsTo>, } impl ActiveModelBehavior for ActiveModel {}