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