Updated and added various models
This commit includes functionality for many of the models that the program will use. The transaction model, rate, and room model have been implemented, but still need further review to determine if they are finished. The same applies to guest and reservation. Currently all models include a simple list class, the decision to use a database or a serialized object (JSON, array, list, etc). These lists are currently a placeholder and are not guaranteed to land in main.
This commit is contained in:
@@ -3,8 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Ophelias.Models;
|
||||
|
||||
namespace Oasis.Reservation.Models
|
||||
namespace Ophelias.Models
|
||||
{
|
||||
internal class Reservation
|
||||
{
|
||||
@@ -47,13 +48,22 @@ namespace Oasis.Reservation.Models
|
||||
CheckOut = null;
|
||||
DateChanged = null;
|
||||
}
|
||||
internal void ChangeReservation(ReservationType type)
|
||||
{
|
||||
Status = ReservationStatus.Changed;
|
||||
Type = type;
|
||||
}
|
||||
internal void CancelReservation()
|
||||
{
|
||||
Status = ReservationStatus.Cancelled;
|
||||
}
|
||||
}
|
||||
|
||||
internal enum ReservationStatus
|
||||
{
|
||||
Active,
|
||||
Changed,
|
||||
Cancelled,
|
||||
Ended,
|
||||
}
|
||||
internal enum ReservationType
|
||||
{
|
||||
@@ -62,4 +72,13 @@ namespace Oasis.Reservation.Models
|
||||
Incentive,
|
||||
SixtyDayAdvance,
|
||||
}
|
||||
internal class ReservationList
|
||||
{
|
||||
internal List<Reservation> Reservations;
|
||||
|
||||
internal ReservationList()
|
||||
{
|
||||
Reservations = new List<Reservation>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user