Skip to content

Commit

Permalink
Merged in thobson-review (pull request kawhyte#1)
Browse files Browse the repository at this point in the history
Tim's Review and suggestions.

* tweaks to data model and directory structure

* new directories

Approved-by: Kenny Whyte <[email protected]>
  • Loading branch information
hoserdude authored and kawhyte committed Jun 24, 2019
1 parent 82d5a84 commit 7e765fe
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 1,602 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
*.log

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 0 additions & 26 deletions logUncaughtExecptions.log

This file was deleted.

1,539 changes: 0 additions & 1,539 deletions logfile.log

This file was deleted.

57 changes: 20 additions & 37 deletions models/tickets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ const Joi = require('joi');

const ticketSchema = new mongoose.Schema({
ticketNumber: {
type: String,
required: true,
minlength: 1
type: Number,
required: true
},
ticketName: {
type: String,
Expand All @@ -14,10 +13,8 @@ const ticketSchema = new mongoose.Schema({
maxlength: 50
},
topPrize: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Number,
required: true
},
topPrizeRemaining: {
type: String,
Expand All @@ -26,28 +23,20 @@ const ticketSchema = new mongoose.Schema({
maxlength: 15
},
ticketCost: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Number,
required: true
},
launchDate: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Date,
required: true
},
endDate: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Date,
required: true
},
redemptionDeadline: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Date,
required: true
},
overallOddsOfWinning: {
type: String,
Expand All @@ -64,26 +53,20 @@ const ticketSchema = new mongoose.Schema({
State: {
type: String,
required: true,
minlength: 1,
maxlength: 15
minlength: 2,
maxlength: 2
},
remainingPrizes: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Number,
required: true
},
totalPrizes: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Number,
required: true
},
prizePercentage: {
type: String,
required: true,
minlength: 1,
maxlength: 15
type: Number,
required: true
}

});
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 7e765fe

Please sign in to comment.