Skip to content
Clone
27fffe3
25 lines 710 B Rust
use sea_orm::JsonValue;
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "event_outbox")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub subject: String,
pub kind: String,
pub ordering_key: String,
pub envelope: JsonValue,
pub occurred_at: OffsetDateTime,
pub available_at: OffsetDateTime,
#[sea_orm(default_value = 0)]
pub attempts: i32,
pub lease_id: Option<Uuid>,
pub leased_until: Option<OffsetDateTime>,
pub published_at: Option<OffsetDateTime>,
}
impl ActiveModelBehavior for ActiveModel {}