29 lines
788 B
Rust
29 lines
788 B
Rust
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use sqlx::FromRow;
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, FromRow)]
|
|
pub struct PullRequestModel {
|
|
pub id: Uuid,
|
|
pub repo: Uuid,
|
|
pub number: i64,
|
|
pub title: String,
|
|
pub body: Option<String>,
|
|
pub state: String,
|
|
pub draft: bool,
|
|
pub author: Uuid,
|
|
pub source_repo: Uuid,
|
|
pub source_branch: String,
|
|
pub source_sha: String,
|
|
pub target_branch: String,
|
|
pub target_sha: String,
|
|
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>>,
|
|
}
|