Skip to content

Commit

Permalink
set default value for createdDatetime
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaYu927 committed Oct 31, 2023
1 parent 9a7bfb9 commit 64f6c41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/team.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { Schema } = mongoose;
const team = new Schema({
teamName: { type: 'String', required: true },
isActive: { type: 'Boolean', required: true, default: true },
createdDatetime: { type: Date },
createdDatetime: { type: Date, default: Date.now() },
modifiedDatetime: { type: Date, default: Date.now() },
members: [
{
Expand Down

0 comments on commit 64f6c41

Please sign in to comment.