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:14:35 +0900
1
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cbfe2c7739a61f905473604778ed5cdbdfde7200
cbfe2c77
1 parent
bd5f5ee6
Delete profile model
Hide 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 @
bd5f5ee
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
;
송용우
@2019102188
2020-09-26 12:41:26 UTC
Mentioned in commit
859cdf9c
Please
register
or
login
to post a comment