mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复sqlite数据操作类型
This commit is contained in:
+2
-13
@@ -14,7 +14,7 @@ export class Crontab {
|
||||
isDisabled?: 1 | 0;
|
||||
log_path?: string;
|
||||
isPinned?: 1 | 0;
|
||||
labels: Array<string>;
|
||||
labels?: string[];
|
||||
last_running_time?: number;
|
||||
last_execution_time?: number;
|
||||
|
||||
@@ -60,18 +60,7 @@ export const CrontabModel = sequelize.define<CronInstance>('Crontab', {
|
||||
isDisabled: DataTypes.NUMBER,
|
||||
isPinned: DataTypes.NUMBER,
|
||||
log_path: DataTypes.STRING,
|
||||
labels: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
get() {
|
||||
if (this.getDataValue('labels')) {
|
||||
return this.getDataValue('labels').split(',')
|
||||
}
|
||||
},
|
||||
set(value) {
|
||||
this.setDataValue('labels', value.join(','));
|
||||
},
|
||||
},
|
||||
labels: DataTypes.JSON,
|
||||
last_running_time: DataTypes.NUMBER,
|
||||
last_execution_time: DataTypes.NUMBER,
|
||||
});
|
||||
|
||||
@@ -55,9 +55,9 @@ export const DependenceModel = sequelize.define<DependenceInstance>(
|
||||
'Dependence',
|
||||
{
|
||||
name: DataTypes.STRING,
|
||||
type: DataTypes.STRING,
|
||||
type: DataTypes.NUMBER,
|
||||
timestamp: DataTypes.STRING,
|
||||
status: DataTypes.STRING,
|
||||
status: DataTypes.NUMBER,
|
||||
log: DataTypes.JSON,
|
||||
remark: DataTypes.STRING,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user