feat: include userId

This commit is contained in:
karishmas6
2024-10-21 20:39:42 +05:30
parent bbffd90e84
commit 7cce881653

View File

@@ -19,6 +19,7 @@ interface RobotWorkflow {
interface RobotAttributes {
id: string;
userId: string;
recording_meta: RobotMeta;
recording: RobotWorkflow;
google_sheet_email?: string | null;
@@ -32,6 +33,7 @@ interface RobotCreationAttributes extends Optional<RobotAttributes, 'id'> { }
class Robot extends Model<RobotAttributes, RobotCreationAttributes> implements RobotAttributes {
public id!: string;
public userId!: string;
public recording_meta!: RobotMeta;
public recording!: RobotWorkflow;
public google_sheet_email!: string | null;
@@ -48,6 +50,10 @@ Robot.init(
defaultValue: DataTypes.UUIDV4,
primaryKey: true,
},
userId: {
type: DataTypes.UUID,
allowNull: false,
},
recording_meta: {
type: DataTypes.JSONB,
allowNull: false,