Skip to content
Clone
eba4fd1
26 lines 816 B Rust
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 = "ci_environment")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub space_id: Uuid,
pub repo_id: Option<Uuid>,
#[sea_orm(column_type = "JsonBinary")]
pub rules: Option<JsonValue>,
pub name: String,
pub description: Option<String>,
#[sea_orm(column_type = "JsonBinary")]
pub required_labels: JsonValue,
pub created_at: OffsetDateTime,
pub updated_at: OffsetDateTime,
#[sea_orm(belongs_to, from = "space_id", to = "id")]
pub space: BelongsTo<super::super::space::spaces::Entity>,
}
impl ActiveModelBehavior for ActiveModel {}