redux of the worker queue
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
|
||||
#[sea_orm(table_name = "scheduler_state")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i32,
|
||||
#[sea_orm(unique)]
|
||||
pub job_name: String,
|
||||
#[sea_orm(nullable)]
|
||||
pub last_run_at: Option<chrono::NaiveDateTime>,
|
||||
#[sea_orm(nullable)]
|
||||
pub last_result: Option<String>,
|
||||
#[sea_orm(nullable)]
|
||||
pub next_run_at: Option<chrono::NaiveDateTime>,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
Reference in New Issue
Block a user