32 lines
928 B
Rust
32 lines
928 B
Rust
use crate::models::common::State;
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct PullRequest {
|
|
pub id: Uuid,
|
|
pub repo_id: Uuid,
|
|
pub author_id: Uuid,
|
|
pub number: i64,
|
|
pub title: String,
|
|
pub body: Option<String>,
|
|
pub state: State,
|
|
pub source_repo_id: Uuid,
|
|
pub source_branch: String,
|
|
pub target_repo_id: Uuid,
|
|
pub target_branch: String,
|
|
pub base_commit_sha: Option<String>,
|
|
pub head_commit_sha: String,
|
|
pub merge_commit_sha: Option<String>,
|
|
pub draft: bool,
|
|
pub locked: bool,
|
|
pub merged_by: Option<Uuid>,
|
|
pub merged_at: Option<DateTime<Utc>>,
|
|
pub closed_by: Option<Uuid>,
|
|
pub closed_at: Option<DateTime<Utc>>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
pub deleted_at: Option<DateTime<Utc>>,
|
|
}
|