mirror of
https://github.com/whyour/qinglong.git
synced 2026-04-29 00:45:11 +08:00
Agent-Logs-Url: https://github.com/whyour/qinglong/sessions/3db54913-03d2-4721-b720-8ccbf8d0f00e Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
32 lines
768 B
TypeScript
32 lines
768 B
TypeScript
import { sequelize } from '.';
|
|
import { DataTypes, Model } from 'sequelize';
|
|
|
|
export class CronLog {
|
|
id?: number;
|
|
cron_id: number;
|
|
cron_name: string;
|
|
start_time: number;
|
|
duration: number;
|
|
|
|
constructor(options: CronLog) {
|
|
this.cron_id = options.cron_id;
|
|
this.cron_name = options.cron_name;
|
|
this.start_time = options.start_time;
|
|
this.duration = options.duration;
|
|
}
|
|
}
|
|
|
|
export interface CronLogInstance extends Model<CronLog, CronLog>, CronLog {}
|
|
export const CronLogModel = sequelize.define<CronLogInstance>(
|
|
'CronLog',
|
|
{
|
|
cron_id: DataTypes.NUMBER,
|
|
cron_name: DataTypes.STRING,
|
|
start_time: DataTypes.NUMBER,
|
|
duration: DataTypes.NUMBER,
|
|
},
|
|
{
|
|
indexes: [{ fields: ['cron_id'] }, { fields: ['start_time'] }],
|
|
},
|
|
);
|