feat(flows): 新增流程编辑器基础功能与相关组件
feat(backend): 添加流程模型与服务支持 feat(frontend): 实现流程编辑器UI与交互 feat(assets): 添加流程节点图标资源 feat(plugins): 实现上下文菜单和运行时插件 feat(components): 新增基础节点和侧边栏组件 feat(routes): 添加流程相关路由配置 feat(models): 创建流程和运行日志数据模型 feat(services): 实现流程服务层逻辑 feat(migration): 添加流程相关数据库迁移 feat(config): 更新前端配置支持流程编辑器 feat(utils): 增强axios错误处理和工具函数
This commit is contained in:
40
backend/migration/src/m20220101_000014_create_flows.rs
Normal file
40
backend/migration/src/m20220101_000014_create_flows.rs
Normal file
@ -0,0 +1,40 @@
|
||||
use sea_orm_migration::prelude::*;
|
||||
|
||||
#[derive(DeriveMigrationName)]
|
||||
pub struct Migration;
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl MigrationTrait for Migration {
|
||||
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||
manager
|
||||
.create_table(
|
||||
Table::create()
|
||||
.table(Flows::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(Flows::Id).string_len(64).not_null().primary_key())
|
||||
.col(ColumnDef::new(Flows::Name).string().null())
|
||||
.col(ColumnDef::new(Flows::Yaml).text().null())
|
||||
.col(ColumnDef::new(Flows::DesignJson).text().null())
|
||||
.col(ColumnDef::new(Flows::CreatedAt).timestamp().not_null().default(Expr::current_timestamp()))
|
||||
.col(ColumnDef::new(Flows::UpdatedAt).timestamp().not_null().default(Expr::current_timestamp()))
|
||||
.to_owned()
|
||||
)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||
manager.drop_table(Table::drop().table(Flows::Table).to_owned()).await
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Iden)]
|
||||
enum Flows {
|
||||
Table,
|
||||
Id,
|
||||
Name,
|
||||
Yaml,
|
||||
DesignJson,
|
||||
CreatedAt,
|
||||
UpdatedAt,
|
||||
}
|
||||
Reference in New Issue
Block a user