Adds several core models needed for functionality
This commit includes the following models: - Guest - Reservation - Room - Transaction The guest model is used to represent a guest which will create a unique guest entry represented through its ID. The model also collects represents and reflects a guests first and last name and their personal information including email and credit card, phone number still needs to be included. The reservation model focuses on #9. See the issue for more specific details. The changes made to better define this model include changing the original Cancellation variable to a more meaningful one called Status. The Status variable can either be Active, Changed, or Cancelled and enums are used as a better approach than creating and setting an int value for an int variable. The same approach was used for the reservation types. Furthermore, the original model was missing the StartDate and EndDate, confusing them for the CheckIn and CheckOut date, which can, but is not guaranteed to be identical. NoShow was moved from the transaction model to the reservation model because it made more sense. The Transaction and Room models are currently empty and were created in preperation of work. Transaction, formerly Payments, did have a model built, however git stash did not properly store these changes. Additional changes include the beginning of working on the main Program.cs, however, this was mostly to ensure that the console was outputting and the project was building. Other (less important) notes... A .gitignore has been added for C#, this is modified to include .vs files since they are mostly cache files. If this breaks the project it can always be dropped later. The project file itself has been versioned, it may not play nice on other machines, but ideally should be fine and nothing should go wrong when running the project file.
This commit is contained in:
34
OpheliasOasis/Models/Guest.cs
Normal file
34
OpheliasOasis/Models/Guest.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ophelias.Guest.Models
|
||||
{
|
||||
internal class Guest
|
||||
{
|
||||
internal int Id;
|
||||
internal string FirstName;
|
||||
internal string LastName;
|
||||
internal string Email;
|
||||
internal string? CreditCard;
|
||||
|
||||
internal Guest(int id, string fname, string lname, string email)
|
||||
{
|
||||
Id = id;
|
||||
FirstName = fname;
|
||||
LastName = lname;
|
||||
Email = email;
|
||||
}
|
||||
internal Guest(int id, string fname, string lname, string email, string cc)
|
||||
{
|
||||
Id = id;
|
||||
FirstName = fname;
|
||||
LastName = lname;
|
||||
Email = email;
|
||||
CreditCard = cc;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user