Update models with more functionality
This is a small commit that aims to add some more descriptive functionality to the models. Guest now has more creditcard information such as CCV and an expiration date to bring it in-line with what would be expected. Reservation implemented a very loose cancellation function, this may be moved out. Transaction has a few more tweaks that follows the same goal as guest, however this functionality may be migrated as well.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Ophelias.Models;
|
||||
|
||||
namespace Ophelias.Models
|
||||
{
|
||||
@@ -12,24 +13,35 @@ namespace Ophelias.Models
|
||||
internal string FirstName;
|
||||
internal string LastName;
|
||||
internal string Email;
|
||||
internal string PhoneNumber;
|
||||
internal string? CreditCard;
|
||||
internal string? CCV;
|
||||
internal DateTime CreditCardExpiration;
|
||||
|
||||
internal Guest(int id, string fname, string lname, string email)
|
||||
internal Guest(int id, string fname, string lname, string email, string phone)
|
||||
{
|
||||
Id = id;
|
||||
FirstName = fname;
|
||||
LastName = lname;
|
||||
Email = email;
|
||||
PhoneNumber = phone;
|
||||
}
|
||||
internal Guest(int id, string fname, string lname, string email, string cc)
|
||||
internal Guest(int id, string fname, string lname, string email, string phone, string cc, DateTime expiration, string ccv)
|
||||
{
|
||||
Id = id;
|
||||
FirstName = fname;
|
||||
LastName = lname;
|
||||
Email = email;
|
||||
PhoneNumber = phone;
|
||||
CreditCard = cc;
|
||||
CreditCardExpiration = expiration;
|
||||
}
|
||||
internal void SetCreditCardInformation(string cc, DateTime expiration, string ccv)
|
||||
{
|
||||
CreditCard = cc;
|
||||
CreditCardExpiration = expiration;
|
||||
CCV = ccv;
|
||||
}
|
||||
|
||||
}
|
||||
internal class GuestList
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user