feat: move gsheet metadata to robot
This commit is contained in:
@@ -19,6 +19,10 @@ interface RobotAttributes {
|
||||
id: string;
|
||||
recording_meta: RobotMeta;
|
||||
recording: RobotWorkflow;
|
||||
google_sheets_email?: string | null;
|
||||
google_sheet_id?: string | null;
|
||||
google_access_token?: string | null;
|
||||
google_refresh_token?: string | null;
|
||||
}
|
||||
|
||||
interface RobotCreationAttributes extends Optional<RobotAttributes, 'id'> { }
|
||||
@@ -27,6 +31,10 @@ class Robot extends Model<RobotAttributes, RobotCreationAttributes> implements R
|
||||
public id!: string;
|
||||
public recording_meta!: RobotMeta;
|
||||
public recording!: RobotWorkflow;
|
||||
public google_sheets_email!: string | null;
|
||||
public google_sheet_id?: string | null;
|
||||
public google_access_token!: string | null;
|
||||
public google_refresh_token!: string | null;
|
||||
}
|
||||
|
||||
Robot.init(
|
||||
@@ -44,6 +52,22 @@ Robot.init(
|
||||
type: DataTypes.JSONB,
|
||||
allowNull: false,
|
||||
},
|
||||
google_sheets_email: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
google_sheet_id: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
google_access_token: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
google_refresh_token: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
|
||||
Reference in New Issue
Block a user