29 lines
811 B
Rust
29 lines
811 B
Rust
use crate::RepoId;
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "repo_branch_protect")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i64,
|
|
#[sea_orm(column_name = "repo_uuid")]
|
|
pub repo: RepoId,
|
|
pub branch: String,
|
|
pub forbid_push: bool,
|
|
pub forbid_pull: bool,
|
|
pub forbid_merge: bool,
|
|
pub forbid_deletion: bool,
|
|
pub forbid_force_push: bool,
|
|
pub forbid_tag_push: bool,
|
|
pub required_approvals: i32,
|
|
pub dismiss_stale_reviews: bool,
|
|
pub require_linear_history: bool,
|
|
pub allow_fork_syncing: bool,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|