feat: add delete route

This commit is contained in:
2024-06-28 00:14:39 +08:00
parent c0a1460ad8
commit 60653a5ba8
16 changed files with 2760 additions and 200 deletions

View File

@@ -8,6 +8,7 @@ export type RouterCode = {
active: boolean;
project: string;
code: string;
exec: string;
type: RouterCodeType;
middleware: string[];
next: string;
@@ -25,6 +26,7 @@ export class RouterCodeModel extends Model {
declare active: boolean;
declare project: string;
declare code: string;
declare exec: string;
declare type: RouterCodeType;
declare middleware: string[];
declare next: string; // 如果是中间件,不存在
@@ -57,6 +59,10 @@ RouterCodeModel.init(
type: DataTypes.STRING,
defaultValue: '',
},
exec: {
type: DataTypes.STRING, // 对代码进行编译后的代码
defaultValue: '',
},
type: {
type: DataTypes.ENUM(RouterCodeType.route, RouterCodeType.middleware),
defaultValue: RouterCodeType.route,