chore: lint

This commit is contained in:
karishmas6
2024-10-09 03:27:19 +05:30
parent 280c493ec2
commit 9d268c3e7f

View File

@@ -3,92 +3,92 @@ import sequelize from '../db/config';
import Robot from './Robot'; import Robot from './Robot';
interface RunAttributes { interface RunAttributes {
id: string; id: string;
recordingId: string; recordingId: string;
status: string; status: string;
name: string; name: string;
startedAt: Date; startedAt: Date;
finishedAt: Date; finishedAt: Date;
browserId: string; browserId: string;
interpreterSettings: object; interpreterSettings: object;
log: string; log: string;
serializableRun: object; serializableRun: object;
binaryRunUrl: string; binaryRunUrl: string;
} }
interface RunCreationAttributes extends Optional<RunAttributes, 'id'> {} interface RunCreationAttributes extends Optional<RunAttributes, 'id'> { }
class Run extends Model<RunAttributes, RunCreationAttributes> implements RunAttributes { class Run extends Model<RunAttributes, RunCreationAttributes> implements RunAttributes {
public id!: string; public id!: string;
public recordingId!: string; public recordingId!: string;
public status!: string; public status!: string;
public name!: string; public name!: string;
public startedAt!: Date; public startedAt!: Date;
public finishedAt!: Date; public finishedAt!: Date;
public browserId!: string; public browserId!: string;
public interpreterSettings!: object; public interpreterSettings!: object;
public log!: string; public log!: string;
public serializableRun!: object; public serializableRun!: object;
public binaryRunUrl!: string; public binaryRunUrl!: string;
} }
Run.init( Run.init(
{ {
id: { id: {
type: DataTypes.UUID, type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4, defaultValue: DataTypes.UUIDV4,
primaryKey: true, primaryKey: true,
},
recordingId: {
type: DataTypes.UUID,
allowNull: false,
references: {
model: Robot,
key: 'id',
},
},
status: {
type: DataTypes.STRING(50),
allowNull: false,
},
name: {
type: DataTypes.STRING(255),
allowNull: false,
},
startedAt: {
type: DataTypes.DATE,
allowNull: false,
},
finishedAt: {
type: DataTypes.DATE,
allowNull: false,
},
browserId: {
type: DataTypes.UUID,
allowNull: false,
},
interpreterSettings: {
type: DataTypes.JSONB,
allowNull: true,
},
log: {
type: DataTypes.TEXT,
allowNull: true,
},
serializableRun: {
type: DataTypes.JSONB,
allowNull: true,
},
binaryRunUrl: {
type: DataTypes.TEXT,
allowNull: true,
},
}, },
recordingId: { {
type: DataTypes.UUID, sequelize,
allowNull: false, tableName: 'run',
references: { timestamps: false,
model: Robot, }
key: 'id',
},
},
status: {
type: DataTypes.STRING(50),
allowNull: false,
},
name: {
type: DataTypes.STRING(255),
allowNull: false,
},
startedAt: {
type: DataTypes.DATE,
allowNull: false,
},
finishedAt: {
type: DataTypes.DATE,
allowNull: false,
},
browserId: {
type: DataTypes.UUID,
allowNull: false,
},
interpreterSettings: {
type: DataTypes.JSONB,
allowNull: true,
},
log: {
type: DataTypes.TEXT,
allowNull: true,
},
serializableRun: {
type: DataTypes.JSONB,
allowNull: true,
},
binaryRunUrl: {
type: DataTypes.TEXT,
allowNull: true,
},
},
{
sequelize,
tableName: 'run',
timestamps: false,
}
); );
export default Run; export default Run;