scheduled tasks
This commit is contained in:
parent
0fa627ca6d
commit
937827d08b
17 changed files with 1445 additions and 136 deletions
|
|
@ -7,15 +7,20 @@ pub struct Model {
|
|||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: Uuid,
|
||||
pub goal: String,
|
||||
pub status: String,
|
||||
#[sea_orm(column_type = "Text")]
|
||||
pub logs: String,
|
||||
#[sea_orm(column_type = "Text", nullable)]
|
||||
pub answer: Option<String>,
|
||||
pub cron: Option<String>,
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
pub enum Relation {
|
||||
#[sea_orm(has_many = "super::task_run::Entity")]
|
||||
TaskRuns,
|
||||
}
|
||||
|
||||
impl Related<super::task_run::Entity> for Entity {
|
||||
fn to() -> RelationDef {
|
||||
Relation::TaskRuns.def()
|
||||
}
|
||||
}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue