新增调度任务模块,支持任务的增删改查、启停及手动执行 - 后端添加 schedule_job 模型、服务、路由及调度器工具类 - 前端新增调度任务管理页面 - 修改 flow 相关接口将 id 类型从 String 改为 i64 - 添加 tokio-cron-scheduler 依赖实现定时任务调度 - 初始化时加载已启用任务并注册到调度器
21 lines
590 B
Rust
21 lines
590 B
Rust
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "flows")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i64,
|
|
pub name: Option<String>,
|
|
pub yaml: Option<String>,
|
|
pub design_json: Option<String>,
|
|
// 新增:流程编号与备注
|
|
pub code: Option<String>,
|
|
pub remark: Option<String>,
|
|
pub created_at: DateTimeWithTimeZone,
|
|
pub updated_at: DateTimeWithTimeZone,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {} |