M7 T1 E3 Writing The Model File

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Writing Model File

Now you have a brief idea about the problem statement. If you divide the problem statement into
entities, then you will have the following:

• Participants: Member, Event Host


• Assets: Ticket, Ticket Listing, Event
• Transactions: Create Event, Sell Ticket, Resell Ticket, Use Ticket

Now, write the model file for all the entities as defined with following structure:

Participants:

There are two types of participants: Member and Event Host. The following data is included for these
participants. This also includes the data types for the model file. You can use the same as specified.

Buyer:

First Name of the Member: The buyer provides his name, which is used to track the buyer details.
Datatype: String
Last Name of the Member: The buyer provides his last name, which is used to track the buyer details.
Datatype: String
Email of the Member: The buyer provides his email ID, which can be used to track the buyer details.
Datatype: String

Note: You can also add in the Identification of the member mentioned above, which can be taken into
any one of the following in the form of an alphanumeric string or an integer. For our case study, we
are not taking in the identity:

● Passport
● Identity proof
● Driving license
● SSN
● Any other identification proof

Event Host:

First Name of the Event Host: The event host provides his name, which is used to track the host details.
Datatype: String
Last Name of the Event Host: The event host provides his last name, which is used to track the host
details.
Datatype: String
Email of the Event Host: The event host provides his email ID, which can be used to track the buyer
details.
Datatype: String
Note: You can also add in the Identification of the member mentioned above, which can be taken into
any one of the following in the form of an alphanumeric string or an integer. For our case study, we
are not taking in the identity:

● Passport
● Identity proof
● Driving license
● SSN
● Any other identification proof

Assets:

We are going to have three types of assets in the case study: one to maintain the events, another to
maintain the tickets and final one to maintain the ticket listings for sale.

Event:

Event ID: This is a unique ID for each event stored in the business network. It also acts as a primary
key and is used to track the event details.
Datatype: String
Date: This is the date on which the event is going to happen.
Datatype: String
Description: This is the description about the event.
Datatype: String
Venue: This is the venue where the event is going to take place..
Datatype: String
EventType: This is a flag used to define whether the event is “Reserved” or “Open_Seating”.
Datatype: EventType(Defined as an enum)
Number of Tickets: Total number of tickets which are available for the event.
Datatype: Integer
Market price: This is the market price for the events that are registered over the network.
Datatype: Integer
Host: This is the person who is hosting the event.
Datatype: Event Host (Defined as a participant)

Ticket listing:

Ticket listing ID: This is a unique ID for each event listed in the business network. It also acts as a
primary key and is used to track the event listing details.
Datatype: String
State: This is the address of the state where the event is taking place.
Datatype: String
Listing price: This is the price of the ticket that is listed for sale over the network.
Datatype: Integer
Ticket: This defines the individual ticket which are shared over the network
Datatype: Ticket (Defined as an asset)
Ticket:

Ticket ID: This is a unique ID for each ticket stored in the business network. It also acts as a primary
key and is used to track the event details.
Datatype: String
Seat ID: This is the seat allocated for the ticket.
Datatype: String
Ticket State: This is the state of the ticket which is used for tracking the current process at hand. This
is defined as “UNSOLD”, “SALE”, “RESALE” and “USED”
Datatype: Ticket State (Defined as enum)
Face Value: This is the face value of the ticket.
Datatype: Double
Sale Price: This is the sale price of the ticket. This can be taken as optional as the listing price is also
defined with Ticket Listing
Datatype: Double
Event: This is the event for which the ticket is provided.
Datatype: Event (Defined as an asset)
Owner: This is the current owner of the ticket over the network.
Datatype: Member (Defined as a participant)
Last Ower: This is the last owner of the ticket over the network.
Datatype: Member (Defined as a participant)

Transactions:

The business network will contain processes to handle the tickets. The class project will involve
transactions to create new events, sell the tickets, resell the tickets to new owners and use the tickets.
The transactions will be defined as follows:

Create Event:

Event ID: This is a unique ID for each event stored in the business network. It also acts as a primary
key and is used to track the event details.
Datatype: String
Date: This is the date on which the event is going to happen.
Datatype: String
Description: This is the description about the event.
Datatype: String
Venue: This is the venue where the event is going to take place.
Datatype: String
EventType: This is a flag used to define whether the event is “Reserved” or “Open_Seating”.
Datatype: EventType(Defined as an enum)
Number of Tickets: Total number of tickets which are available for the event.
Datatype: Integer
Face Value: This is the face value for the events that are registered over the network.
Datatype: Integer
Host: This is the reference to the person who is hosting the event.
Datatype: Event Host (Defined as a participant)

Sell Ticket:

Sale Price: This is the selling price of the ticket over the network.
Datatype: String
Buyer: This is the reference to the member who is purchasing the ticket.
Datatype: Member (Defined as a participant)
Ticket: This is a reference to the asset ticket defined for the event.
Datatype: Ticket (Defined as an asset)

Resell Ticket:

Sale Price: This is the selling price of the ticket over the network.
Datatype: String
Buyer: This is the reference to the member who is purchasing the ticket.
Datatype: Member (Defined as a participant)
Listing: This is a reference to the asset ticket listing defined for the event.
Datatype: Ticket Listing(Defined as an asset)

Use Ticket:

Ticket: This is a reference to the ticket which is available in the network. The flag will be modified to
use here:
Datatype: Ticket (Defined as an asset)

Following the definitions defined above, you would be able to code the Model File for "Concert Ticket
Booking Application." Do add the assumptions as comments with the model file.

The next part is to define the transaction processor file; the guidelines for the same will be provided,
make sure you learn about the transaction processor functions before coding for the next part of the
project. You can keep on adding the code to a gradual approach.

You might also like