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
송용우
2020-08-21 17:16:57 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
859cdf9c06f4074d3721fe2bd4701cc7de4a3b44
859cdf9c
2 parents
b885b7d5
cbfe2c77
Merge commit '
cbfe2c77
' into develop
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
40 deletions
jaksimsamil-server/src/models/profile.js
jaksimsamil-server/src/models/profile.js
deleted
100644 → 0
View file @
b885b7d
const
mongoose
=
require
(
"mongoose"
);
const
{
Schema
}
=
mongoose
;
const
ProfileSchema
=
new
Schema
({
username
:
{
type
:
String
,
required
:
true
,
unique
:
true
},
userBJID
:
String
,
solvedBJ
:
Object
,
solvedBJ_date
:
Object
,
friendList
:
[
String
],
slackWebHookURL
:
String
,
goalNum
:
Number
,
});
ProfileSchema
.
statics
.
findByUsername
=
function
(
username
)
{
return
this
.
findOne
({
username
});
};
ProfileSchema
.
methods
.
getBJID
=
function
()
{
return
this
.
userBJID
;
};
ProfileSchema
.
methods
.
getBJdata
=
function
()
{
return
this
.
solvedBJ
;
};
ProfileSchema
.
methods
.
getslackURL
=
function
()
{
return
this
.
slackWebHookURL
;
};
ProfileSchema
.
methods
.
getgoalNum
=
function
()
{
return
this
.
goalNum
;
};
ProfileSchema
.
methods
.
getTodaySovled
=
function
()
{
if
(
this
.
solvedBJ_date
)
{
return
this
.
solvedBJ_date
.
presentNum
;
}
};
ProfileSchema
.
methods
.
serialize
=
function
()
{
const
data
=
this
.
toJSON
();
return
data
;
};
const
Profile
=
mongoose
.
model
(
"Profile"
,
ProfileSchema
);
module
.
exports
=
Profile
;
Please
register
or
login
to post a comment