Skip to content

Commit

Permalink
Merge pull request #129 from TogetherCrew/add-connectedAt-field
Browse files Browse the repository at this point in the history
Add connectedAt field to platform schema
  • Loading branch information
cyri113 authored Nov 22, 2023
2 parents 94afd08 + e7a6ef9 commit a0b0671
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@togethercrew.dev/db",
"version": "3.0.15",
"version": "3.0.16",
"description": "All interactions with DB",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/Platfrom.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface IPlatform {
metadata?: Record<string, any>; // dynamic object since structure can change
disconnectedAt?: Date | null;
isInProgress?: boolean;
connectedAt?: Date;
}

export interface IPlatformUpdateBody {
Expand Down
4 changes: 4 additions & 0 deletions src/models/schemas/Platform.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const platformSchema = new Schema<IPlatform, PlatformModel>(
type: Date,
default: null,
},
connectedAt: {
type: Date,
default: new Date(),
},
isInProgress: {
type: Boolean,
default: true,
Expand Down

0 comments on commit a0b0671

Please sign in to comment.