a06673b
use sea_orm::JsonValue;
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "repo_webhook")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub repo_id: Uuid,
pub url: String,
pub secret: String,
pub events: JsonValue,
pub is_active: bool,
pub created_by: Option<Uuid>,
pub created_at: OffsetDateTime,
#[sea_orm(belongs_to, from = "repo_id", to = "id")]
pub repo: BelongsTo<super::super::repo::repos::Entity>,
#[sea_orm(belongs_to, from = "created_by", to = "uid")]
pub creator: BelongsTo<Option<super::super::user::users::Entity>>,
}
impl ActiveModelBehavior for ActiveModel {}