Skip to content
Clone
0e66a41
26 lines 792 B Rust
use sea_orm::JsonValue;
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, 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: DateTimeUtc,
pub published_at: Option<DateTimeUtc>,
#[sea_orm(default_expr = "Expr::current_timestamp()")]
pub available_at: DateTimeUtc,
pub lease_id: Option<Uuid>,
pub leased_until: Option<DateTimeUtc>,
#[sea_orm(default_value = 0)]
pub attempts: i32,
#[sea_orm(column_type = "Text")]
pub last_error: Option<String>,
}
impl ActiveModelBehavior for ActiveModel {}