feat: rename to Robot

This commit is contained in:
karishmas6
2024-10-09 03:59:31 +05:30
parent 6acde9d958
commit 3baeb09d60

View File

@@ -2,7 +2,7 @@ import { Model, DataTypes, Optional } from 'sequelize';
import sequelize from '../db/config'; import sequelize from '../db/config';
import Run from './Run'; import Run from './Run';
interface RecordingMeta { interface RobotMeta {
name: string; name: string;
id: string; id: string;
createdAt: Date; createdAt: Date;
@@ -11,7 +11,7 @@ interface RecordingMeta {
params: object[]; params: object[];
} }
interface Recording { interface Robot {
workflow: Array<{ workflow: Array<{
where: { where: {
url: string; url: string;
@@ -29,8 +29,8 @@ interface RobotAttributes {
createdAt: Date; createdAt: Date;
updatedAt: Date; updatedAt: Date;
pairs: number; pairs: number;
recording_meta: RecordingMeta; recording_meta: RobotMeta;
recording: Recording; recording: Robot;
} }
interface RobotCreationAttributes extends Optional<RobotAttributes, 'id'> { } interface RobotCreationAttributes extends Optional<RobotAttributes, 'id'> { }
@@ -41,8 +41,8 @@ class Robot extends Model<RobotAttributes, RobotCreationAttributes> implements R
public createdAt!: Date; public createdAt!: Date;
public updatedAt!: Date; public updatedAt!: Date;
public pairs!: number; public pairs!: number;
public recording_meta!: RecordingMeta; public recording_meta!: RobotMeta;
public recording!: Recording; public recording!: Robot;
} }
Robot.init( Robot.init(