1 00:00:00,970 --> 00:00:04,570 Now that you've seen the goal of this application we're going to spend a couple of videos to go over 2 00:00:04,570 --> 00:00:06,330 the design of this app. 3 00:00:06,370 --> 00:00:10,300 We're going to first begin by discussing the different pieces of data that we're going to have to store 4 00:00:10,480 --> 00:00:12,480 in order to implement this thing. 5 00:00:12,490 --> 00:00:16,410 So in total I think we are going to have four different types of resources. 6 00:00:16,570 --> 00:00:23,260 We're going to first have some table or collection some storage of users as you guessed this is going 7 00:00:23,260 --> 00:00:27,490 to store all the different users who sign up to our application and presumably along with each user 8 00:00:27,490 --> 00:00:30,310 We'll store their email and password. 9 00:00:30,310 --> 00:00:36,580 That's pretty much it for each user will then have some collection or table of tickets and each of these 10 00:00:36,580 --> 00:00:43,570 records are going to represent one single ticket that someone is trying to buy or sell for every ticket. 11 00:00:43,640 --> 00:00:49,670 We're going to allow it to have a title that's gonna be a string a price which will be a number a user 12 00:00:49,670 --> 00:00:56,480 I.D. reference which is going to be a reference to the user who is trying to sell the ticket and a reference 13 00:00:56,480 --> 00:00:58,440 to some order. 14 00:00:58,520 --> 00:01:04,880 Let's give you our order I.D. and that order I.D. reference is going to be the kind of purchase attempt 15 00:01:04,910 --> 00:01:11,090 to actually get at this ticket or they're going to have a collection or table of orders. 16 00:01:11,090 --> 00:01:16,120 So for each order that gets created we're going to store the user I.D. of the person who is creating 17 00:01:16,120 --> 00:01:18,690 this Order the status of the order. 18 00:01:19,090 --> 00:01:24,550 So whether it is canceled whether we are waiting for payment to come in whether it is 100 percent complete 19 00:01:24,610 --> 00:01:32,060 and some new person owns the ticket we're going to store the ticket I.D. and the time at which the order 20 00:01:32,060 --> 00:01:32,650 expires. 21 00:01:32,660 --> 00:01:38,210 Because remember people only have 15 minutes or so or some configurable amount of time to actually purchase 22 00:01:38,240 --> 00:01:39,590 a ticket. 23 00:01:39,590 --> 00:01:40,760 Just be really clear. 24 00:01:40,760 --> 00:01:48,290 This order represents the attempt to purchase a ticket so the instant that a user clicks on that purchase 25 00:01:48,290 --> 00:01:53,600 button right there we're going to create this order object in the order object represents the intent 26 00:01:53,630 --> 00:01:59,300 to purchase the ticket that expires that will represent the 15 minutes. 27 00:01:59,300 --> 00:02:03,560 And as soon as the person actually enters in their credit card or what have you we will update the order 28 00:02:03,560 --> 00:02:09,410 status to complete it or awaiting payment or something like that. 29 00:02:09,460 --> 00:02:12,120 And then finally we're going to have a charge object. 30 00:02:12,190 --> 00:02:17,770 This charge is going to represent our ability to actually charge some person's credit card and get some 31 00:02:17,770 --> 00:02:23,100 money out of them so on the charge object will have a reference to the order that a user is trying to 32 00:02:23,100 --> 00:02:25,610 pay for the status of the charge. 33 00:02:25,620 --> 00:02:31,380 So whether it is created failed or completed the amount of money tied to the charge and we also have 34 00:02:31,440 --> 00:02:35,200 too little maintenance fields or kind of administrative fields on here as well. 35 00:02:35,260 --> 00:02:36,960 Ones could be a stripe I.D.. 36 00:02:37,080 --> 00:02:42,000 Again we're going to be using stripe to handle payments stripe I.D. is going to be a reference to some 37 00:02:42,090 --> 00:02:45,090 object over in the stripe J.S. or the stripe world. 38 00:02:45,110 --> 00:02:48,280 There's going to be us trying to actually Bill someone's credit card. 39 00:02:48,290 --> 00:02:50,870 We're also going to the ability to refund tickets as well. 40 00:02:50,880 --> 00:02:55,460 So we're going to have something called the stripe refund idea on here too at this point. 41 00:02:55,470 --> 00:02:58,100 I'm sure a lot of these different objects look completely foreign. 42 00:02:58,110 --> 00:03:01,110 You might be saying what is the difference between a ticket and an order. 43 00:03:01,110 --> 00:03:03,060 What's the difference between ordering and charge. 44 00:03:03,090 --> 00:03:06,350 Don't worry over time you're going to see the purpose of each of these different objects. 45 00:03:06,360 --> 00:03:11,790 Right now I just want to get these pieces of terminology out there and get you thinking about them. 46 00:03:11,790 --> 00:03:13,290 Yes that's little design talk. 47 00:03:13,290 --> 00:03:17,790 Number one we're going to go through another couple of videos just like these to give you some big overall 48 00:03:17,790 --> 00:03:18,510 picture. 49 00:03:18,510 --> 00:03:21,510 Give you an idea of how we're going to put this thing together so quick pause. 50 00:03:21,540 --> 00:03:22,650 Next one in just a moment.