Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mattias J Duffy
schedules
Commits
82570d72
Unverified
Commit
82570d72
authored
Sep 15, 2016
by
Mark Stenglein
Browse files
Merge branch '8-ics-generation' into issue21-ical-npm
There shouldnt be mutiple different branches here
parents
eb6f368f
cc8928d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
schedules/models/Semester.js
View file @
82570d72
// grab the things we need
// grab the things we need
var
mongoose
=
require
(
'
mongoose
'
);
var
mongoose
=
require
(
'
mongoose
'
);
var
Schema
=
mongoose
.
Schema
;
var
Schema
=
mongoose
.
Schema
;
var
sectionSchema
=
require
(
'
./sectionSchema
'
);
// create a schema
// create a schema
var
semesterSchema
=
new
Schema
({
var
semesterSchema
=
new
Schema
({
school
:
{
type
:
String
,
required
:
true
},
school
:
{
type
:
String
,
required
:
true
},
semester
:
{
type
:
String
,
required
:
true
},
semester
:
{
type
:
String
,
required
:
true
},
slug
:
{
type
:
String
,
required
:
true
},
slug
:
{
type
:
String
,
required
:
true
},
classes
:
[
classes
:
[
sectionSchema
]
{
crn
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
title
:
{
type
:
String
,
required
:
true
},
section
:
{
type
:
String
,
required
:
true
},
campus
:
{
type
:
String
,
required
:
true
},
session_templates
:
[
{
date_range
:
{
type
:
String
,
required
:
true
},
days
:
{
type
:
String
},
time
:
{
type
:
String
},
location
:
{
type
:
String
,
required
:
true
},
class_type
:
{
type
:
String
,
required
:
true
},
instructors
:
{
type
:
String
,
required
:
true
},
}
],
notification
:
{
type
:
String
,
required
:
true
}
}
]
});
});
semesterSchema
.
set
(
'
redisCache
'
,
true
);
semesterSchema
.
set
(
'
redisCache
'
,
true
);
...
...
schedules/models/sectionSchema.js
0 → 100644
View file @
82570d72
// grab the things we need
var
mongoose
=
require
(
'
mongoose
'
);
var
Schema
=
mongoose
.
Schema
;
// create a schema
var
sectionSchema
=
new
Schema
({
crn
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
title
:
{
type
:
String
,
required
:
true
},
section
:
{
type
:
String
,
required
:
true
},
campus
:
{
type
:
String
,
required
:
true
},
session_templates
:
[
{
date_range
:
{
type
:
String
,
required
:
true
},
days
:
{
type
:
String
},
time
:
{
type
:
String
},
location
:
{
type
:
String
,
required
:
true
},
class_type
:
{
type
:
String
,
required
:
true
},
instructors
:
{
type
:
String
,
required
:
true
},
}
],
notification
:
{
type
:
String
,
required
:
true
}
});
sectionSchema
.
set
(
'
redisCache
'
,
true
);
// make this available to our users in our Node applications
module
.
exports
=
sectionSchema
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment