Skip to content

Commit 798c49e

Browse files
committed
feat: add isLogin field in robots model
1 parent 3f88860 commit 798c49e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/src/models/Robot.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ interface RobotAttributes {
4242
google_access_token?: string | null;
4343
google_refresh_token?: string | null;
4444
schedule?: ScheduleConfig | null;
45+
isLogin: boolean;
4546
cookie_storage?: CookieStorage | null;
4647
}
4748

@@ -71,6 +72,7 @@ class Robot extends Model<RobotAttributes, RobotCreationAttributes> implements R
7172
public google_access_token!: string | null;
7273
public google_refresh_token!: string | null;
7374
public schedule!: ScheduleConfig | null;
75+
public isLogin!: boolean;
7476
public cookie_storage!: CookieStorage | null;
7577
}
7678

@@ -117,6 +119,11 @@ Robot.init(
117119
type: DataTypes.JSONB,
118120
allowNull: true,
119121
},
122+
isLogin: {
123+
type: DataTypes.BOOLEAN,
124+
allowNull: false,
125+
defaultValue: false,
126+
},
120127
cookie_storage: {
121128
type: DataTypes.JSONB,
122129
allowNull: true,

0 commit comments

Comments
 (0)