Skip to content

Instantly share code, notes, and snippets.

@sferoze
Last active November 17, 2015 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sferoze/5029bfea5b03694e087c to your computer and use it in GitHub Desktop.
Save sferoze/5029bfea5b03694e087c to your computer and use it in GitHub Desktop.
Schemas For Stridepost
###### FAMILIES SCHEMA ########
###### EACH FAMILY HAS ONE DOCUMENT ######
Schemas.Family = new SimpleSchema(
name:
type: String
adults:
type: [Object]
'adults.$.userId':
type: String
children:
type: [Object]
'children.$.userId':
type: String
optional: true
'children.$.activateOnlineRewards':
type: Boolean
optional: true
'children.$.allowOnlineRewardSearching':
type: Boolean
optional: true
'children.$.useKidSafeFilter':
type: Boolean
optional: true
adminUserIds:
type: [String]
activeUntil:
type: Date
settings:
type: Object
optional: true
'settings.didPrepopulate':
type: Object
optional: true
'settings.didPrepopulate.todos':
type: Boolean
optional: true
'settings.didPrepopulate.rewards':
type: Boolean
optional: true
'settings.autoApprove':
type: Boolean
optional: true
'familyPhotos':
type: [String]
optional: true
)
###### CALENDAR EVENTS SCHEMA ########
Schemas.CalendarEvents = new SimpleSchema(
description:
type: String
location:
type: String
optional: true
notes:
type: String
optional: true
allDay:
type: Boolean
who:
type: [String]
familyId:
type: String
repeat:
type: Boolean
durationHrs:
type: Number
min: 0
startDate:
type: Date
endDate:
type: Date
rule:
type: Object
optional: true
blackbox: true
addedByChild:
type: Boolean
defaultValue: false
optional: true
imported:
type: Boolean
optional: true
feedId:
type: String
optional: true
uid:
type: String
optional: true
excludeUniqueRepeatEvents:
type: [Object]
optional: true
'excludeUniqueRepeatEvents.$.startDate':
type: Date
optional: true
'excludeUniqueRepeatEvents.$.endDate':
type: Date
optional: true
###### TODOS SCHEMA ########
Schemas.Todos = new SimpleSchema(
todo:
type: String
effort:
type: Number
min: 0
max: 5
timeOfDay:
type: String
allowedValues: ['Anytime', 'Morning', 'Afternoon', 'Evening']
dueDate:
type: Date
who:
type: [String]
familyId:
type: String
repeat:
type: Boolean
rule:
type: Object
optional: true
blackbox: true
###### REWARDS SCHEMA ########
Schemas.Rewards = new SimpleSchema(
description:
type: String
points:
type: Number
min: 0
availableTo:
type: [String]
wishlist:
type: [String]
familyId:
type: String
productInfo:
type: Object
optional: true
'productInfo.url':
type: String
optional: true
'productInfo.itemId':
type: String
optional: true
'productInfo.title':
type: String
optional: true
'productInfo.imageURL':
type: String
optional: true
'productInfo.amountCents':
type: null
optional: true
rewardType:
type: String
allowedValues: ['Family', 'Online']
)
###### REWARDS REQUESTS SCHEMA ########
###### WHENEVER A CHILD REQUESTS A REWARD, A DOCUMENT IS INSERTED INTO THIS COLLECTION ######
Schemas.Reward_Requests = new SimpleSchema(
description:
type: String
points:
type: Number
min: 0
requestedOn:
type: Date
requestedBy:
type: String
familyId:
type: String
status:
type: String
allowedValues: ['Approved', 'Denied', 'Needs Approval']
rewardType:
type: String
allowedValues: ['Family', 'Online']
requestFulfilled:
type: Boolean
optional: true
productInfo:
type: Object
optional: true
'productInfo.url':
type: String
optional: true
'productInfo.itemId':
type: String
optional: true
'productInfo.title':
type: String
optional: true
'productInfo.imageURL':
type: String
optional: true
rewardId:
type: String
)
###### APPROVE TODO REQUEST SCHEMA ########
###### WHENEVER AN ACTION IS TAKEN ON A CHILD TODO, A DOCUMENT IS INSERTED INTO THIS COLLECTION ######
Schemas.ApproveTodo_Requests = new SimpleSchema(
todoId:
type: String
dueDate:
type: Date
completedBy:
type: String
familyId:
type: String
status:
type: String
allowedValues: ['Needs Approval', 'Approved', 'Denied', 'Redo', 'Skipped']
photoURL:
type: String
optional: true
transactionCompleted:
type: Boolean
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment