Toggle navigation
Toggle navigation
This project
Loading...
Sign in
송용우
/
oss-Jaksimsamil
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
JJuOn
2020-08-25 17:21:07 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b6930b7ca4de39b95559097c7dacfdc15062bac7
b6930b7c
1 parent
d7addc74
Change column of model/challenge and model/session
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
jaksimsamil-server/src/models/challenge.js
jaksimsamil-server/src/models/session.js
jaksimsamil-server/src/models/challenge.js
View file @
b6930b7
...
...
@@ -8,7 +8,7 @@ const ChallengeSchema=new Schema({
endDate
:
{
type
:
Object
,
required
:
true
},
durationPerSession
:
{
type
:
String
,
required
:
true
},
// '1d' means one day per session, '2w' means 2 weeks per session, '3m' means 3 months per session.
goalPerSession
:
{
type
:
Number
,
required
:
true
},
// number of problems for one session
isOpen
:
{
type
:
Boolean
}
status
:
{
type
:
String
}
},{
collection
:
'challenge'
});
...
...
@@ -37,6 +37,10 @@ ChallengeSchema.methods.getGoalPerSession=function(){
return
this
.
goalPerSession
;
}
ChallengeSchema
.
methods
.
getStatus
=
function
(){
return
this
.
status
;
}
ChallengeSchema
.
methods
.
serialize
=
function
(){
return
this
.
toJSON
();
}
...
...
jaksimsamil-server/src/models/session.js
View file @
b6930b7
...
...
@@ -6,7 +6,7 @@ const SessionSchema = new Schema({
challengeId
:
{
type
:
Schema
.
Types
.
ObjectId
,
ref
:
'Challenge'
},
sessionStartDate
:
{
type
:
Object
},
sessionEndDate
:
{
type
:
Object
},
isOpen
:
{
type
:
Boolean
}
status
:
{
type
:
String
}
},{
collection
:
'session'
});
...
...
@@ -23,8 +23,8 @@ SessionSchema.methods.getSessionEndDate=function(){
return
this
.
sessionEndDate
;
}
SessionSchema
.
methods
.
get
IsOpen
=
function
(){
return
this
.
isOpen
;
SessionSchema
.
methods
.
get
Status
=
function
(){
return
this
.
status
;
}
SessionSchema
.
methods
.
serialize
=
function
(){
...
...
Please
register
or
login
to post a comment