use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use sqlx::FromRow;
use uuid::Uuid;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, FromRow)]
pub struct RepoProtectModel {
    pub id: Uuid,
    pub repo: Uuid,
    pub pattern: String,
    pub require_pull_request: bool,
    pub required_approvals: i32,
    pub require_status_checks: bool,
    pub required_status_contexts: String,
    pub enforce_admins: bool,
    pub allow_force_pushes: bool,
    pub allow_deletions: bool,
    pub created_at: DateTime<Utc>,
    pub updated_at: DateTime<Utc>,
}
