mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
支持定时任务视图筛选条件关系切换
This commit is contained in:
@@ -7,7 +7,8 @@ interface SortType {
|
||||
}
|
||||
|
||||
interface FilterType {
|
||||
type: 'or' | 'and';
|
||||
property: string;
|
||||
operation: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
@@ -18,6 +19,7 @@ export class CrontabView {
|
||||
isDisabled?: 1 | 0;
|
||||
filters?: FilterType[];
|
||||
sorts?: SortType[];
|
||||
filterRelation?: 'and' | 'or';
|
||||
|
||||
constructor(options: CrontabView) {
|
||||
this.name = options.name;
|
||||
@@ -26,6 +28,7 @@ export class CrontabView {
|
||||
this.isDisabled = options.isDisabled || 0;
|
||||
this.filters = options.filters;
|
||||
this.sorts = options.sorts;
|
||||
this.filterRelation = options.filterRelation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,5 +46,6 @@ export const CrontabViewModel = sequelize.define<CronViewInstance>(
|
||||
isDisabled: DataTypes.NUMBER,
|
||||
filters: DataTypes.JSON,
|
||||
sorts: DataTypes.JSON,
|
||||
filterRelation: { type: DataTypes.STRING, defaultValue: 'and' },
|
||||
},
|
||||
);
|
||||
|
||||
@@ -28,6 +28,7 @@ export class Subscription {
|
||||
extensions?: string;
|
||||
sub_before?: string;
|
||||
sub_after?: string;
|
||||
proxy?: string;
|
||||
|
||||
constructor(options: Subscription) {
|
||||
this.id = options.id;
|
||||
@@ -54,6 +55,7 @@ export class Subscription {
|
||||
this.extensions = options.extensions;
|
||||
this.sub_before = options.sub_before;
|
||||
this.sub_after = options.sub_after;
|
||||
this.proxy = options.proxy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,5 +104,6 @@ export const SubscriptionModel = sequelize.define<SubscriptionInstance>(
|
||||
log_path: DataTypes.STRING,
|
||||
schedule_type: DataTypes.STRING,
|
||||
alias: { type: DataTypes.STRING, unique: 'alias' },
|
||||
proxy: { type: DataTypes.STRING, allowNull: true },
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user